Qmail Installation

advertisement
Qmail Installation
Build Qmail







tar zxvf qmailrocks.tar.gz
Edit and Run :
/test/qmailrocks/scripts/install/qmr_install_linux-s1.script
Edit and Run :
/test/qmailrocks/scripts/util/qmail_big_patches.script
cd /usr/src/qmail/qmail-1.03
make man && make setup check
./config-fast your_fqdn_hostname (ex: ./config-fast
mail.mydomain.com)
make cert
Build Qmail
Country Name (2 letter code) [GB]:US
State or Province Name (full name)
[Berkshire]:Georgia
Locality Name (eg, city) [Newbury]:Atlanta
Organization Name (eg, company) [My
Company Ltd]:qmailrocks.org
Organizational Unit Name (eg, section) []:mail
Common Name (eg, your name or your server's
hostname) []:mail.qmailrocks.org
Email Address []:postmaster@thisdomain.org
Build ucspi-tcp




chown -R vpopmail:qmail
/var/qmail/control/clientcert.pem
/var/qmail/control/servercert.pem
cd /usr/src/qmail/ucspi-tcp-0.88/
patch < /downloads/qmailrocks/patches/ucspi-tcp0.88.errno.patch
make && make setup check
Build Mdaemontools





cd /package/admin/daemontools-0.76
cd /package/admin/daemontools-0.76/src
patch < /downloads/qmailrocks/patches/daemontools0.76.errno.patch
cd /package/admin/daemontools-0.76
package/install
Check Svscanboot
Build Ezmlm




cd /downloads/qmailrocks/
tar zxvf ezmlm-0.53-idx-0.41.tar.gz
cd ezmlm-0.53-idx-0.41
make && make setup
Build Autoresponder




cd /downloads/qmailrocks
tar zxvf autorespond-2.0.5.tar.gz
cd autorespond-2.0.5
make && make install
Build Vpopmail





cd /downloads/qmailrocks
tar zxvf vpopmail-5.4.13.tar.gz
cd vpopmail-5.4.13
./configure --enable-logging=p
make && make install-strip
Build Vqadmin






cd /downloads/qmailrocks
tar zxvf vqadmin-2.3.6.tar.gz
cd vqadmin-2.3.6
./configure --enable-cgibindir=/path/to/your/cgi-bin -enable-htmldir=/path/to/your/html/directory
(Example: ./configure --enable-cgibindir=/var/www/cgibin --enable-htmldir=/var/www/html )
make && make install-strip
Build Vqadmin

Now you will need to add the following to your server's
Apache configuration file (usually httpd.conf)
<Directory "/path/to/your/cgi-bin/vqadmin">
deny from all
Options ExecCGI
AllowOverride AuthConfig
Order deny,allow
</Directory>
In addition, within the Apache master config file you will
want to set the "AllowOveride" option to "All". Example:
AllowOverride All
Build Vqadmin


cd /path/to/your/cgi-bin/vqadmin
vi .htaccess
AuthType Basic
AuthUserFile
/path/to/where/you/want/to/store/the/password/file/.ht
passwd
AuthName vQadmin
require valid-user
satisfy any
Build Vqadmin




chown apache .htaccess (you may need to change the
chown to either "nobody", "apache" or "www" etc.,
depending on what user your installation of Apache is
running as)
chmod 644 .htaccess
htpasswd -bc
/path/to/where/you/want/to/store/the/password/file/.ht
passwd admin admin_password
chmod 644
/path/to/where/you/want/to/store/the/password/file/.ht
passwd
Build Vqadmin



apachectl stop
apachectl start
If all has gone well, you should now be able to browse
(in your web browser) to:
http://www.yourdomain.com/cgibin/vqadmin/vqadmin.cgi
Build Maildrop





cd /downloads/qmailrocks
tar zxvf maildrop-1.6.3.tar.gz
cd maildrop-1.6.3
./configure --prefix=/usr/local --execprefix=/usr/local --enable-maildropuid=root --enable-maildrop-gid=vchkpw -enable-maildirquota
make && make install-strip && make
install-man
Build Qmailadmin





cd /downloads/qmailrocks
tar zxvf qmailadmin-1.2.9.tar.gz
cd qmailadmin-1.2.9
./configure --enable-cgibindir=/path/to/your/cgi-bin -enable-htmldir=/path/to/your/html/directory
make && make install-strip
Finalizing Qmail



Edit and Run :
/test/qmailrocks/scripts/finalize/linux/finalize_linux.script
vi /var/qmail/supervise/qmail-pop3d/run
Find "mail.example.com" and change it to your server's
hostname. For example: mail.mydomain.com
vi /var/qmail/supervise/qmail-smtpd/run
Find "mail.example.com" and change it to your server's
hostname. For example: mail.mydomain.com
Finalizing Qmail



qmailctl stop
echo '127.:allow,RELAYCLIENT="“' >> /etc/tcp.smtp
qmailctl cdb
Finalizing Qmail





echo some_address > /var/qmail/alias/.qmail-root
echo some_address > /var/qmail/alias/.qmailpostmaster
echo some_address > /var/qmail/alias/.qmail-mailerdaemon
ln -s /var/qmail/alias/.qmail-root
/var/qmail/alias/.qmail-anonymous
chmod 644 /var/qmail/alias/.qmail*
Removing Sendmail



rpm -qa | grep sendmail
/etc/rc.d/init.d/sendmail stop (to stop Sendmail)
rpm -e --nodeps sendmail-x.x.x.x
Removing PostFix





rpm -qa | grep postfix
/etc/rc.d/init.d/postfix stop
rpm -e --nodeps postfix-x.x-x
ln -s /var/qmail/bin/sendmail /usr/lib/sendmail
ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail
Starting Qmail

Run :
/test/qmailrocks/scripts/util/qmr_inst_check
qmailctl stop
qmailctl start

qmailctl stat


Starting Qmail

service/qmail-send: up (pid 29956) 2 seconds
/service/qmail-send/log: up (pid 29960) 2 seconds
/service/qmail-smtpd: up (pid 29963) 2 seconds
/service/qmail-smtpd/log: up (pid 29968) 2 seconds
/service/qmail-pop3d: up (pid 29971) 2 seconds
/service/qmail-pop3d/log: up (pid 29972) 2 seconds
messages in queue: 0
messages in queue but not yet preprocessed: 0
Testing Qmail

Telnet to localhost 110
Trying 192.168.1.10...
Connected to 192.168.1.10.
Escape character is '^]'.
+OK <16658.1054485137@yourserver.com>
user postmaster@mydomain.com (enter your
username here. remember to use the full e-mail
address)
+OK
pass your_password
+OK
quit
+OK
Connection closed by foreign host.
Testing Qmail

Telnet to localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 somewhere.anywhere.com ESMTP
ehlo localhost
250-somewhere.anywhere.com
250-AUTH LOGIN CRAM-MD5 PLAIN
250-AUTH=LOGIN CRAM-MD5 PLAIN
250-STARTTLS
250-PIPELINING
250 8BITMIME
starttls
220 ready for tls
quit
quit
Connection closed by foreign host.
[root@somewhere control]#
Testing Qmail

Testing on Microsoft Outlook
FINISH
> Continue to webmail
configuration <
Download