How To Install QMAIL Mail Server Configuration On CentOS
How To Install QMAIL Mail Server Configuration On CentOS
Qmail put together to provide a free and open resource for anyone needing help with the
installation and configuration.
Qmail is an incredibly fast, stable and secure mail solution suitable for almost any
environment.
Qmailrocks.org continues to grow and improve because of the generous contributions from
devoted qmail fans across the world.
John Simpsons massive qmail patch, which includes (among others) qmailqueue, smtp?auth
and TLS smtp encryption.
EZmlm ? A fast and easy to use mailing list manager that works through qmail.
Vpopmail ? Enables virtual e?mail hosting for multiple domains. Available with or without
mysql integration.
Vqadmin ? A web based interface to manage Vpopmail virtual domains on your qmail server.
Qmailadmin ? A web based interface for managing vpopmail virtual e?mail accounts.
Squirrelmail ? A web based mail client with a boat load of cool plugins available
1
Php
Perl
Gcc
Mysql
Openssl
Wget
Postfix
Install QMAIL Mail Server Configuration on CentOS/RHEL/ Scientific /Oracle Linux 6/5
wget http://www.qmailrocks.org/downloads/qmailrocks.tar.gz
mkdir /downloads
cd /downloads
tar zxvf qmailrocks.tar.gz
[]:mail.techbrown.com
Email Address []:[email protected]
Step-III(EZmlm)
#
#
#
#
cd /downloads/qmailrocks/
tar zxvf ezmlm-0.53-idx-0.41.tar.gz
cd ezmlm-0.53-idx-0.41
make && make setup
Step-IV(Autoresponder)
#
#
#
#
cd /downloads/qmailrocks
tar zxvf autorespond-2.0.5.tar.gz
cd autorespond-2.0.5
make && make install
Step-V(Vpopmail)
#
#
#
#
#
cd /downloads/qmailrocks
tar zxvf vpopmail-5.4.5.tar.gz
cd vpopmail-5.4.5
./configure --enable-logging=p
make && make install-strip
Step-VI(Vqadmin)
#
#
#
#
#
cd /downloads/qmailrocks
tar zxvf vqadmin-2.3.6.tar.gz
cd vqadmin-2.3.6
./configure --enable-cgibindir=/var/www/cgi-bin --enablehtmldir=/var/www/html/
make && make install-strip
Now you will need to add the following to your servers Apache configuration file
(usually httpd.conf)
<Directory "/var/www/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: AllowOveride All
# cd /var/www/cgi-bin/vqadmin
# vi .htaccess
AuthType Basic
AuthUserFile /usr/local/apache/conf/vqadmin.passwd
AuthName vQadmin
require valid-user
satisfy any
# chown apache .htaccess
# htpasswd -bc /usr/local/apache/conf/vqadmin.passwd admin admin
# chmod 644 /usr/local/apache/conf/vqadmin.passwd
# apachectl stop
# apachectl start
# http://mail.galaxy.com/cgi-bin/vqadmin/vqadmin.cgi
Step-VII(Maildrop)
# cd /downloads/qmailrocks
# tar zxvf maildrop-1.6.3.tar.gz
# cd maildrop-1.6.3
# ./configure --prefix=/usr/local --exec-prefix=/usr/local --enablemaildropuid=root --enable-maildrop-gid=vchkpw --enablemaildirquota
# make && make install-strip && make install-man
Step-VIII(Qmailadmin)
#
#
#
#
#
cd /downloads/qmailrocks
tar zxvf qmailadmin-1.2.1.tar.gz
cd qmailadmin-1.2.1
./configure --enable-cgibindir=/var/www/cgi-bin --enablehtmldir=/var/www/html/
make && make install-strip
Step-IX(Finalizing Qmail)
# /downloads/qmailrocks/scripts/finalize/linux/finalize_linux.script
Next, well kill any running qmail processes so that we can implement some final
configurations.
# qmailctl stop
Removing Sendmail
#
#
#
#
#
#
#
#
# mv /usr/sbin/sendmail /usr/sbin/sendmail.old
# chmod 0 /usr/lib/sendmail.old /usr/sbin/sendmail.old
Removing Postfix
#
#
#
#
#
#
Step-X(Starting qmail)
# /downloads/qmailrocks/scripts/util/qmr_inst_check
# qmailctl stop
# qmailctl start
# qmailctl stat
# telnet localhost 110
Trying 192.168.1.10...
Connected to 192.168.1.10.
Escape character is '^]'.
+OK <[email protected]>
user [email protected] (enter your username here remember to use the full
e-mail address)
+OK
pass galaxy
+OK
quit
+OK
Connection closed by foreign host.
Now we will exit out of our NON-ROOT USER and go back to being root
#
#
#
#
#
#
#
#
#
Exit
make install-strip && make install-configure
/usr/local/sbin/mkimapdcert
vi /usr/local/etc/imapd.cnf
vi /usr/local/etc/imapd
vi /usr/local/etc/imapd-ssl
vi /usr/local/etc/authlib/authdaemonrc authmodulelist="authvchkpw
cp /usr/local/libexec/imapd.rc /etc/rc.d/init.d/imap
cp /usr/local/libexec/imapd-ssl.rc /etc/rc.d/init.d/imaps
Now lets start up Authdaemond, IMAP and IMAPS. To be safe well stop each
service before starting it
# /usr/local/sbin/authdaemond stop
# /usr/local/sbin/authdaemond start
# /etc/rc.d/init.d/imap stop
# /etc/rc.d/init.d/imaps stop
# /etc/rc.d/init.d/imap start
# /etc/rc.d/init.d/imaps start
# telnet localhost 143
Trying 192.168.1.10...
Connected to 192.168.1.10.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT
THREAD=REFERENCES SORT QUOTA IDLE STARTTLS] Courier-IMAP ready. Copyright 19982003 Double Precision, Inc. See COPYING for distribution information.
a login [email protected] techbrown
a OK LOGIN Ok. (successful login!)
a logout (logs you out)
* BYE Courier-IMAP server shutting down
a OK LOGOUT completed
Connection closed by foreign host.
Note: Courierpassd will require that port 106 be open to at least local traffic (traffic
from 127.0.0.1)
#
#
#
#
#
#
cd /downloads/qmailrocks
tar zxvf courierpassd-1.1.0-RC1.tar.gz
cd courierpassd-1.1.0-RC1
./configure
make && make install
cd /etc/xinetd.d
}
# vi /etc/services
# /etc/rc.d/init.d/xinetd restart
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
200 courierpassd v0.30 hello, who are you?
user [email protected]
200 Your password please.
pass galaxy
200 Your new password please.
newpass galaxy
200 Password changed, thank-you.
quit
200 Bye.
Connection closed by foreign host.
# telnet localhost 106
Step-XII(Installing Squirrelmail)
# cd /downloads/qmailrocks
# tar xvzf squirrelmail-1.4.8.tar.gz
mkdir /var/sqattachements
chown -R apache:apache /var/sqattachements
cdwebmail
chown -R apache:apache data
cd config
./conf.pl
I edit the httpd.conf Apache configuration file and add the following block:
<VirtualHost 172.25.25.4:80>
ServerName mail.techbrown.com
ServerAlias mail.*
ServerAdmin [email protected]
DocumentRoot /var/www/webmail
</VirtualHost>
http://mail.techbrown.com
Well sign in with the postmaster account under the domain you should have created
earlier using Vqadmin
Username: [email protected]
Password: techbrown
/etc/rc.d/init.d/imap start
/etc/rc.d/init.d/imaps start
# qmailctl restart
# qmailstat
Congratulation You have Installed QMAIL Mail Server Configuration on CentOS/RHEL 6/5