Title: Qmail Notes Subject: File layout and other setup notes Check The Log: http://www.pingpackets.com/mirrors/qmail/man/man5/qmail-log.html I might be wrong, but I think it looks like this: =============================================================== qmail | vpop | ---------------------------------------------- | | | | qmailadmin sqwebmail curior-imap POP/APOP client | | | ----------- IMAP client | ----------------------- | | apache with mod_ssl openssl | | ----------------------- | secure webmail client =============================================================== ucspi-tcp-0.88-1.src.rpm - http://em.ca/~bruceg/rpms/ucspi-tcp/ daemontools-0.70-2.src.rpm - http://em.ca/~bruceg/rpms/daemontools/ supervise-scripts-3.3-1.src.rpm - http://em.ca/~bruceg/supervise-scripts/ qmail-1.03+patches-18.src.rpm - http://em.ca/~bruceg/qmail+patches/ vmailmgr-0.96.6-1.src.rpm - http://em.ca/~bruceg/vmailmgr/ courier-imap-0.31.tar.gz - http://www.inter7.com/courierimap/ -rw-rw-r-- 1 jstile jstile 1064610 Jan 13 02:08 courier-imap-1.3.0.tar.gz -rw-rw-r-- 1 jstile jstile 39558 Jan 13 02:06 daemontools-0.70-2.src.rpm -rw-rw-r-- 1 jstile jstile 33747 Jan 13 02:03 dot-forward-0.51-1.src.rpm -rw-rw-r-- 1 jstile jstile 961 Jan 13 02:01 index.html -rw-rw-r-- 1 jstile jstile 271738 Jan 13 02:03 qmail-1.03+patches-18.src.rpm -rw-rw-r-- 1 jstile jstile 1068267 Jan 13 02:09 sqwebmail-1.2.0.tar.gz -rw-rw-r-- 1 jstile jstile 15507 Jan 13 02:06 supervise-scripts-3.3-1.src.rpm -rw-rw-r-- 1 jstile jstile 83704 Jan 13 02:00 ucspi-tcp-0.88-1.src.rpm -rw-rw-r-- 1 jstile jstile 470921 Jan 14 13:14 vmailmgr-0.96.9-1.i386.rpm -rw-rw-r-- 1 jstile jstile 364096 Jan 14 13:14 vmailmgr-0.96.9-1.src.rpm -rw-rw-r-- 1 jstile jstile 45876 Jan 14 13:13 vmailmgr-cgi-0.96.9-1.i386.rpm -rw-rw-r-- 1 jstile jstile 23846 Jan 14 13:15 vmailmgr-courier-imap-0.96.9-1.i386.rpm Features of VMailMgr: password checking interface between qmail-popup and qmail-pop3d which replaces the usual checkpassword, as well as an authentication module for Courier IMAP, that provide access to the virtual mailboxes by one of three methods: IP-based virtual server access (invisible to the POP3 user) username-based access (username-virtualuser) hostname-based access (virtualuser@virtual.host or virtualuser:virtual.host) CDB-based password tables to speed up access for domains of any size. Tools to setup a virtual domain, add and delete individual virtual users and aliases, and to change passwords. CGI programs to accomplish the above tasks from a set of web pages. A native PHP library to compliment or replace the CGIs. A daemon process that securely directs the operation of the CGIs and PHP code. A separate delivery agent that automatically deals with any address inside a virtual domain from a single .qmail-default file. ================================================================ Compiling SRC.RPM's rpm --rebuild ucspi-tcp-0.88-1.src.rpm rpm --rebuild daemontools-0.70-2.src.rpm rpm --rebuild supervise-scripts-3.3-1.src.rpm ls -laF /usr/src/redhat/RPMS/i386/ -rw-rw-r-- 1 root root 42144 Jan 13 02:11 daemontools-0.70-2.i386.rpm -rw-rw-r-- 1 root root 99412 Jan 13 02:10 ucspi-tcp-0.88-1.i386.rpm ls -laF /usr/src/redhat/RPMS/noarch/ -rw-rw-r-- 1 root root 16633 Jan 13 02:18 supervise-scripts-3.2-1.noarch.rpm -rw-rw-r-- 1 root root 16703 Jan 13 02:14 supervise-scripts-3.3-1.noarch.rpm ================================================================ Installing RPM's rpm -ivh /usr/src/redhat/RPMS/i386/ucspi-tcp-0.88-1.i386.rpm rpm -ivh /usr/src/redhat/RPMS/i386/daemontools-0.70-2.i386.rpm rpm -ivh /usr/src/redhat/RPMS/noarch/supervise-scripts-3.3-1.noarch.rpm ================================================================= Install Qmail with RPMS, Compiling SRC.RPM's rpm -i ucspi-unix-0.34-1.i386.rpm rpm --rebuild qmail-1.03+patches-18.src.rpm ls -laF /usr/src/redhat/RPMS/i386/ -rw-rw-r-- 1 root root 337842 Jan 13 02:25 qmail-1.03+patches-18.i386.rpm ================================================================= Installing RPM's rpm -ivh /usr/src/redhat/RPMS/i386/qmail-pop3d-1.03+patches-12.i386.rpm error: failed dependencies: ucspi-unix is needed by qmail-1.03+patches-18 Download from : http://rpmfind.net/linux/RPM/contrib/libc6/i386/ucspi-unix-0.34-1.i386.html rpm -i ucspi-unix-0.34-1.i386.rpm rpm -ivh /usr/src/redhat/RPMS/i386/qmail-1.03+patches-18.i386.rpm qmail ################################################## Read /usr/share/doc/README.service for instructions on starting and stopping qmail services. ================================================================= Remove Sendmail rpm -e fetchmail rpm -e mutt rpm -e sendmail removal of /usr/sbin/sendmail failed: No such file or directory cannot remove /etc/smrsh - directory not empty cannot remove /etc/mail - directory not empty ================================================================== Install Courier-imap * note start * - This errors out if you compile as root, but if your not root you wont have permissions to /usr/src/redhat. - You will want to build as a non-root user, so create a ".rpmmacros" file (for rpm v3 and later) in - your home directory containing the line "%_topdir /path/to/home/redhat". - Then create your own "redhat" directory containing all the subdirs that - /usr/src/redhat contains. - You should never build RPMs as root unless you have to. * note end as non-root-user, echo '%_topdir /home/jstile/redhat' >> ~/.rpmmacros mkdir ~/redhat/BUILD ~/redhat/RPMS ~/redhat/SOURCES ~/redhat/SPECS ~/redhat/SRPMS -p cd /usr/local/download/MailServer/Qmail_VMailMgr_Courier-Imap/ rpm -ta courier-imap-1.3.0.tar.gz ls -laF /home/jstile/redhat/RPMS/i386/ total 276 drwxr-xr-x 2 jstile jstile 4096 Jan 14 13:04 ./ drwxrwxr-x 3 jstile jstile 4096 Jan 14 13:04 ../ -rw-rw-r-- 1 jstile jstile 258294 Jan 14 13:04 courier-imap-1.3.0-1.7.0.i386.rpm -rw-rw-r-- 1 jstile jstile 1695 Jan 14 13:04 courier-imap-ldap-1.3.0-1.7.0.i386.rpm -rw-rw-r-- 1 jstile jstile 1719 Jan 14 13:04 courier-imap-mysql-1.3.0-1.7.0.i386.rpm rpm -ivh /home/jstile/redhat/RPMS/i386/courier-imap-1.3.0-1.7.0.i386.rpm courier-imap ################################################## =================================================================== Install VMailMgr with Installing RPM's I know thay want me to rebuild all rpms, but I'm going to try the courier-imap one, and see if it works. rpm -ivh vmailmgr-courier-imap-0.96.9-1.i386.rpm didn't do much so I'm building it. rpm --rebuild vmailmgr-0.96.9-1.src.rpm Error 2 Run it as non-root-user rpm --rebuild vmailmgr-0.96.9-1.src.rpm Error 2 install the rpm as root, forget about the other stuff, and get on with life. su rpm -hvi vmailmgr-0.96.9-1.i386.rpm vmailmgr ################################################## rpm -qa |grep vmail vmailmgr-0.96.9-1 vmailmgr-courier-imap-0.96.9-1 =================================================================== Basic Qmail config 1. Add your domains to /var/qmail/control/virtualdomains file in qmail+VMailMgr format: echo 'webber.stilen.com:users1' >> /var/qmail/control/virtualdomains IM GOING TO THE SITE FOR VMAILMGR TO READ THIS http://www.vmailmgr.org/docs/HOWTO.html 3. Setup 3.1 Setting Up a Virtual Domain 1.Set up a DNS entry for the domain, such that a 'nslookup IP' returns the hostname the machine. ? 2.Set up a base user for the domain. All the users in the virtual domain will be stored under this user's home directory. 3.Configure qmail to recognize the domain. To `/var/qmail/control/rcpthosts` : add the line `mydomain.org`. To `/var/qmail/control/virtualdomains` : add the line `mydomain.org:myuser`. 4.Configure qmail-popup/qmail-pop3d to use `checkvpw` as the password checker. Replace `checkpassword` in the command you use to invoke qmail-popup/qmail-pop3d (either in `/etc/inet.conf` or in a `tcpserver` command) with `checkvpw`. And/Or at the prompt type: `echo checkvpw > /var/qmail/control/checkpassword` 5.Set up the vmailmgr files: Either change user to the user you just created (for example, type `su - myuser`) Set up the base vmailmgr files by running `vsetup`. Use the included programs to add users and aliases. For our example, we would type the following commands: vadduser me vaddalias myself me vaddalias myname me 3.5 Starting the daemons Start Qmail daemons /etc/rc.d/init.d/qmail start /etc/rc.d/init.d/pop3d start /etc/rc.d/init.d/smtp start /etc/rc.d/init.d/qmqpd start (optional) /etc/rc.d/init.d/qmtpd start (optional) Start VMailMgr daemon /etc/rc.d/init.d/vmailmgrd start Start Courier-imap damon /etc/rc.d/init.d/courier-imap start 3.7 Web-based interfaces for vmailmgr There are currently a few working solutions to administrate your vmailmgr system via a web interface. Only requirement is that the vmailmgrd daemon is running, and that you have a webserver on your system. 1.For Python fans, there is vpyadmin by Bruce Guenter. The files can be downloaded at http://em.ca/~bruceg/vpyadmin/, development code is online at http://bruce-guenter.dyndns.org/cgi-bin/vpyadmin/ (sample.org / samplevm). 2.And if you like PHP, you can use oMail-admin by Olivier Müller: Project homepage: http://omail.omnis.ch. Online demo: http://admin.omnis.ch/omail/ (test.com / test). 3.And there are also C-based CGI scripts in the cgi directory of the vmailmgr distribution. http://www.vmailmgr.org/docs/FAQ.html 2.4 How do I setup VMmailMgr IMAP support? VMailMgr supports Courier-IMAP, but Courier-IMAP does not auto detect VMailMgr. This means that some minor work is required for making the two work together. cp /usr/local/bin/authvmailmgr /usr/lib/courier-imap/libexec/authlib/authvmailmgr 2. Tell Qmail to use VMailMgr for authentication: By default qmail uses checkpassword for authentication, To tell Qmail to use VMailMgr for authentication type the following command: echo checkvpw > /var/qmail/control/checkpassword 3.