[Home] [Credit Search] [Category Browser] [Staff Roll Call] | The LINUX.COM Article Archive |
Originally Published: Monday, 20 August 2001 | Author: Henry Chen |
Published to: enhance_articles_sysadmin/Sysadmin | Page: 3/4 - [Printable] |
Install and Test Qmail with POP, IMAP and WebMail
Kill Sendmail? Are you kidding me? Well, no. In this first run original article Henry Chen provides us with free detailed step-by-step instructions for installing Qmail with Redhat 7.1, an alternative open source solution to your mail management needs.
|
<< Page 3 of 4 >> | |
Install Courier IMAPYou have downloaded the tarball earlier. You are now yourself (NOT root). From your home directory: cd Courier-IMAP 1.3.9 ./configure --without-authdaemon --without-authldap --mandir=/usr/local/man make make check su umask 022 make install make install-configure You have just made the Couried IMAP binaries from the sources. Now you need to configure it so that it will start up right. ConfigureIf you happen to read Courier IMAP's web page, you will see some discussion on virtual mailboxes, authdaemon, and Courier's POP. We have a dedicated e-mail server here so we did not bother with virtual mailboxes. As for authdaemon, this requires another process to be running in the background and we did not particularly feel like running another process. We also like Qmail's POP better. You are now root. You need to edit the IMAP configuration file: There are only a few things that need to be changed. I am listing the lines that we changed: ADDRESS=IP Address of your server AUTHMODULES="authpam" IMAP_CHECK_ALL_FOLDERS=1 IMAP_MOVE_EXPUNGE_TO_TRASH=1 Leave the other lines as default. Only the ln -s /usr/lib/courier-imap/libexec/imapd.rc /etc/init.d/imapd ln -s ../init.d/imapd /etc/rc0.d/K31imapd ln -s ../init.d/imapd /etc/rc1.d/K31imapd ln -s ../init.d/imapd /etc/rc2.d/S81imapd ln -s ../init.d/imapd /etc/rc3.d/S81imapd ln -s ../init.d/imapd /etc/rc4.d/S81imapd ln -s ../init.d/imapd /etc/rc5.d/S81imapd ln -s ../init.d/imapd /etc/rc6.d/K31imapd We made the counter in the /etc/init.d/imapd start /etc/init.d/imapd stop TestingStartup Courier IMAP and test it. From any IMAP client (I use
Outlook Express), once you set it up, it will look for IMAP folders from your
server. In After you have created some IMAP folders, you can check to see what your Install Relay-CtrlNow that SMTP, POP and IMAP all functions, we need to add the ability for Qmail to selectively relay e-mail for our customers so that they can set their incoming and outgoing e-mail server to be the same thing. To accomplish this, we picked relay-ctrl from Bruce Guenter. It is well written and simple to use. You are still the root user. cd ~$username tar -xzf relay-ctrl-2.5.tar.gz cd relay-ctrl-2.5 Before we make the binaries, we have to make some changes to correspond
relay-ctrl to our prior installations. Do const char* rulesdir = "/etc"; const char* smtprules = "tcp.smtp"; const char* smtpcdb = "tcp.smtp.cdb"; const char* tcprules = "/usr/local/bin/tcprules"; To make and install the binaries: make make root-install Now we edit the pop3d file by #!/bin/sh exec /usr/local/bin/softlimit -m 2000000 \ /usr/local/bin/tcpserver -v -R -H -l 0 0 110 /var/qmail/bin/qmail-popup \ FQDN /bin/checkpassword /usr/sbin/relay-ctrl-allow \ /var/qmail/bin/qmail-pop3d Maildir 2>&1 Note where we inserted relay-ctrl. Then, we change one line in the imapd file by AUTHMODULES="authpam relay-ctrl-allow" Then, we setup a cron job to check the relay list every 3 minutes by */3 * * * * /usr/sbin/relay-ctrl-age Lastly, we create the proper links and directories ln -s /usr/sbin/relay-ctrl-allow /usr/lib/courier-imap/libexec/authlib mkdir /var/spool/relay-ctrl TestingNow you are able to make Qmail relay e-mail if you authenticate first
through either POP or IMAP. You should try this out with the POP and
IMAP accounts that you have already setup. When you authenticate, you
should see a file with a filename of the IP address of your "remote" host show up
in the
| |
<< Page 3 of 4 >> |