Sie sind auf Seite 1von 14

1 Qmail 2 Ucspi-Tcp 3 Deamon Tool 4 Ezmlm 5 Atuoresponder 6 Vpopmail With Mysql Support 7 Vqadmin 8 Pcre 9 Maildrop 10 Qmailadmin 11 Finalizing

Qmail 12 Removing Sendmail,Postfix,Exim 13 Starting Qmail 14 Courier IMAP+ Courierpassed 15 Squirrel Mail 16 ClamAV 17 Spamassassin 18 DCC,Razor,Pyzor 19 MailWatch 20 Mailscanner 21 Mail Queue Watcher Net Qmail Directory with Wbitt

1 download qmailrocs from wget http://www.qmailrocks.org/downloads/qmailrocks.tar.gz


mkdir /downloads cd /downloads tar zxvf qmailrocks.tar.gz

Run the below script

/downloads/qmailrocks/scripts/install/qmr_install_linux-s1.script /downloads/qmailrocks/scripts/util/qmail_big_patches.script

===>Now we build Qmail...


cd /usr/src/qmail/qmail-1.03 make man && make setup check

./config-fast your_fqdn_hostname (ex: ./config-fast mail.mydomain.com)


rm -f /var/qmail/control/locals touch /var/qmail/control/locals chmod 644 /var/qmail/control/locals chown root.root /var/qmail/control/locals cat /var/qmail/control/locals
make cert (When you run the above command you will be asked a series of questions regarding the generation of your certificate) (Here's a sample of my cert cert configs. Don't be an idiot. Substitute in your own information.) (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) Now we set the right ownership for the newly create cert... chown -R vpopmail:qmail /var/qmail/control/clientcert.pem /var/qmail/control/servercert.pem Now we build ucspi-tcp...

cd /usr/src/qmail/ucspi-tcp-0.88/ patch < /downloads/qmailrocks/patches/ucspi-tcp-0.88.errno.patch

make && make setup check

cd /package/admin/daemontools-0.76/src patch < /downloads/qmailrocks/patches/daemontools-0.76.errno.patch cd /package/admin/daemontools-0.76

./package/install

ps aux | grep svscan vi /etc/inittab in last SV:123456:respawn:/command/svscanboot

mkdir /downloads/qmailnew cd /downloads/qmailnew wget http://cr.yp.to/software/ezmlm-0.53.tar.gz wget http://www.ezmlm.org/archive/5.1.1/ezmlm-idx-5.1.1.tar.gz tar xzf ezmlm-0.53.tar.gz tar xzf ezmlm-idx-5.1.1.tar.gz cp -r /downloads/qmailnew/ezmlm-idx-5.1.1/* /downloads/qmailnew/ezmlm-0.53 --reply=yes In Suse --reply=yes------> -f cd /downloads/qmailnew/ezmlm-0.53 patch < idx.patch Configure various config files: vi conf-etc /usr/local/etc/ezmlm vi conf-bin /usr/local/bin/ezmlm vi conf-qmail /var/qmail Edit the conf-sub, and change the storage from standard file location to mysql. vi conf-sub mysql Choose a subscription database support. Available supports are: * std (Default) filesystem * mysql MySQL database

* pgsql Postgres database You will need the mysql-devel package to be installed on the system before compiling this software. vi sub_mysql/conf-sqlcc -I/usr/include/mysql Time to compile. make clean make make man make setup You may want to create a ezmlm MySQL Database at this point.
mysqladmin -u root password 'password'

mysql -u root -p create database ezmlm; GRANT select,insert,update,delete,create,drop ON ezmlm.* TO ezmlmuser@localhost IDENTIFIED BY 'redhat';

AUTORESPONDER: -------------autorespond-2.0.5.tar.gz is provided by the QMR package. This is the latest version on the net too. So let's follow it. cd /downloads/qmailrocks tar zxvf autorespond-2.0.5.tar.gz cd autorespond-2.0.5 make && make install

VPOPMAIL with MySQL support: ----------------------------vpopmail-5.4.13.tar.gz is supplied with QMR package. Whereas version 5.4.22 is available on inter7's sourceforge page: http://sourceforge.net/project/showfiles.php?group_id=85937 Lets download this new version: cd /downloads/qmailnew wget http://optusnet.dl.sourceforge.net/sourceforge/vpopmail/vpopmail-5.4.22.tar.gz tar xzf vpopmail-5.4.28.tar.gz cd /downloads/qmailnew/vpopmail-5.4.28 Let's do the preparation first. We already have created a user vpopmail and vchkpw earlier. mkdir ~vpopmail/etc chown vpopmail:vchkpw ~vpopmail/etc echo "localhost|0|vpopmailuser|redhat|vpopmail" > ~vpopmail/etc/vpopmail.mysql Create vpopmail Database: mysql -u root -p CREATE DATABASE vpopmail; GRANT select,insert,update,delete,create,drop ON vpopmail.* TO vpopmailuser@localhost IDENTIFIED BY 'redhat'; cd /downloads/qmailnew/vpopmail-5.4.28

./configure --enable-logging=p --enable-auth-module=mysql --disable-clear-passwd --disablemany-domains --enable-sql-logging --enable-mysql-replication --enable-valias --enableroaming-users --enable-spamassassin --enable-mysql-limits

SUSE Myql-devel-----./configure --enable-logging=p --enable-auth-module=mysql --disable-clear-passwd --disablemany-domains --enable-sql-logging --enable-mysql-replication --enable-valias --enableroaming-users --disable-spamassassin --enable-mysql-limits --enable-incdir=/var/lib/mysql/ make && make install-strip

VQADMIN: -------QMR package provides vqadmin-2.3.6.tar.gz . The homepage of vqadmin ( http://www.inter7.com/vqadmin/ ) provides us vqadmin-2.3.7.tar.gz . Lets use that. cd /downloads/qmailnew/ wget http://www.inter7.com/vqadmin/vqadmin-2.3.7.tar.gz tar xzf vqadmin-2.3.7.tar.gz cd /downloads/qmailnew/vqadmin-2.3.7 ./configure --enable-cgibindir=/var/www/cgi-bin --enable-htmldir=/var/www/html make && make install-strip Edit the Apache config file and add the following : <Directory "/var/www/cgi-bin/vqadmin"> deny from all Options ExecCGI AllowOverride AuthConfig Order deny,allow </Directory> vi /var/www/cgi-bin/vqadmin/.htaccess AuthType Basic AuthUserFile /etc/httpd/conf/vqadmin.passwd AuthName vQadmin require valid-user satisfy any chown apache /var/www/cgi-bin/vqadmin/.htaccess chmod 640 /var/www/cgi-bin/vqadmin/.htaccess # The QMR guide suggests 644 , which is too lax I think. htpasswd -bc /etc/httpd/conf/vqadmin.passwd admin redhat chown apache /etc/httpd/conf/vqadmin.passwd # This step is not in QMR. chmod 640 /etc/httpd/conf/vqadmin.passwd service httpd restart Open the following link in web browser: http://qmail.isb.ots.com/cgi-bin/vqadmin/vqadmin.cgi Add a domain "isb.ots.com" in vqadmin . Created Domain Domain postmaster added (password: redhat)

MAIL DROP QMR provides maildrop-1.6.3.tar.gz . Where as the latest is: maildrop-2.0.4.tar.bz2 cd /downloads/qmailnew wget http://prdownloads.sourceforge.net/courier/maildrop-2.0.4.tar.bz2 tar xjf maildrop-2.0.4.tar.bz2

cd maildrop-2.0.4 ./configure --prefix=/usr/local --exec-prefix=/usr/local --enable-maildrop-uid=root --enable-maildrop-gid=vchkpw --enable-maildirquota make && make install-strip && make install-man

QMAIL ADMIN If u get with err when u compiling qmailadmin u jus upgrade ur pkg. of vpopmail vpopmail 5.4.28

cd /downloads/qmailrocks tar zxvf qmailadmin-1.2.9.tar.gz cd qmailadmin-1.2.9 ./configure --enable-cgibindir=/var/www/cgi-bin --enable-htmldir=/var/www/html make && make install-strip http://dommain/cgi-bin/qmailadmin

Finalizing Qmail
/downloads/qmailrocks/scripts/finalize/linux/finalize_linux.script This script can be viewed online at: http://www.qmailrocks.org/downloads/scripts/finalize/linux/finalize_linux.script I will use the actual content of the script to get the tasks done manully. # First Copy all supervise scripts to their proper locations.: cp /downloads/qmailrocks/scripts/finalize/linux/pop3d_run /var/qmail/supervise/qmailpop3d/run cp /downloads/qmailrocks/scripts/finalize/linux/pop3d_log /var/qmail/supervise/qmail-pop3d/log/run cp /downloads/qmailrocks/scripts/finalize/linux/smtpd_run /var/qmail/supervise/qmailsmtpd/run cp /downloads/qmailrocks/scripts/finalize/linux/smtpd_log /var/qmail/supervise/qmail-smtpd/log/run cp /downloads/qmailrocks/scripts/finalize/linux/send_run /var/qmail/supervise/qmailsend/run cp /downloads/qmailrocks/scripts/finalize/linux/send_log /var/qmail/supervise/qmailsend/log/run

# Next: Copy rc and qmailctl scripts to proper locations: cp /downloads/qmailrocks/scripts/finalize/rc /var/qmail/ cp /downloads/qmailrocks/scripts/finalize/qmailctl /var/qmail/bin/ # Setup needed permisions: chmod 755 /var/qmail/rc /var/qmail/bin/qmailctl chmod 751 /var/qmail/supervise/qmail-pop3d/run chmod 751 /var/qmail/supervise/qmail-pop3d/log/run chmod 751 /var/qmail/supervise/qmail-smtpd/run chmod 751 /var/qmail/supervise/qmail-smtpd/log/run chmod 751 /var/qmail/supervise/qmail-send/run chmod 751 /var/qmail/supervise/qmail-send/log/run # Setup default values to various control files: echo ./Maildir > /var/qmail/control/defaultdelivery echo 255 > /var/qmail/control/concurrencyremote chmod 644 /var/qmail/control/concurrencyremote echo 30 > /var/qmail/control/concurrencyincoming chmod 644 /var/qmail/control/concurrencyincoming # Create symbolic links: ln -s /var/qmail/bin/qmailctl /usr/bin ln -s /var/qmail/supervise/qmail-send /var/qmail/supervise/qmail-smtpd /var/qmail/supervise/qmail-pop3d /service Next edit the run scripts and adjust a few values: vi /var/qmail/supervise/qmail-pop3d/run Find "mail.example.com" and change it to your server's hostname. For example: qmail.isb.ots.com. vi /var/qmail/supervise/qmail-smtpd/run Find "mail.example.com" and change it to your server's hostname. For example: qmail.isb.ots.com Next: qmailctl stop echo '127.:allow,RELAYCLIENT=""' >> /etc/tcp.smtp qmailctl cdb Now we create the common system aliases. These aliases are going to tell Qmail what to do with common server-generated mails. echo postmaster@isb.ots.com > /var/qmail/alias/.qmail-root echo postmaster@isb.ots.com > /var/qmail/alias/.qmail-postmaster echo postmaster@isb.ots.com > /var/qmail/alias/.qmail-mailer-daemon ln -s /var/qmail/alias/.qmail-root /var/qmail/alias/.qmail-anonymous chmod 644 /var/qmail/alias/.qmail*

REMOVE SENDMAIL, POSTFIX , EXIM from System:

If you have not removed these pakages before, you can do it now. rpm -e sendmail sendmail-cf postfix exim nodeps

Create artificial sendmail path: ln -s /var/qmail/bin/sendmail /usr/lib/sendmail ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail

START QMAIL:

/downloads/qmailrocks/scripts/util/qmr_inst_check The script is long and there is no advantage running it command by command/ manually. When you run the script, it will check for some key required files and folders and will also check permissions and owership settings on many key items. It a needed file does not exist or if the ownership/permissions settings are wrong on a key file, it will tell you and then make a suggestion as to how to correct the error. This script does NOT check the CONTENT or SYNTAX of your scripts, but only for the scripts' existence and their ownership/permissions settings. If you've screwed up the syntax of on the run scripts, this tool will not detect it. Lets run it: [root@qmail ~]# /downloads/qmailrocks/scripts/util/qmr_inst_check Congratulations, your Qmailrocks.org Qmail installation looks good! [root@qmail ~]# Start Qmail: qmailctl stop qmailctl start Then: qmailctl stat

COURIER IMAP + COURIERPASSD --------------------------Courier-imap is the preferred IMAP server to install because it has built in support the vchkpw mail user setup that Vpopmail utilizes. In short, Courier IMAP works with Vpopmail and virtual domains. In addition to installing Courier-imap, we're going to install Courierpassd. Courierpassd is a utility that allows users to change their mailbox passwords remotely. We are going to use latest releases from http://www.courier-mta.org/download.php . QMR provides courier-authlib-0.55.tar.bz2 . Latest is courier-authlib-0.59.3.tar.bz2 . Also QMR package provides courier-imap-4.0.2.tar.bz2 . Whereas the latest is courier-imap-4.1.3.tar.bz2 . Also QMR provides courierpassd-1.1.0-RC1 , whereas latest is courierpassd-1.1.2.tar.gz . cd /downloads/qmailnew

wget http://prdownloads.sourceforge.net/courier/courier-authlib-0.59.3.tar.bz2 wget http://prdownloads.sourceforge.net/courier/courier-imap-4.1.3.tar.bz2 wget http://www.arda.homeunix.net/store/courierpassd-1.1.2.tar.gz tar xjf courier-authlib-0.59.3.tar.bz2 tar xjf courier-imap-4.1.3.tar.bz2 tar xzf courierpassd-1.1.2.tar.gz cd /downloads/qmailnew/courier-authlib-0.59.3 ./configure --prefix=/usr/local --exec-prefix=/usr/local --with-authvchkpw --without-authldap --without-authmysql --disable-root-check --with-ssl --with-authchangepwdir=/usr/local/libexec/authlib --with-redhat
make && make check make install-strip && make install-configure vi /etc/rc.local Add following lines in this file /usr/local/sbin/authdaemond start /etc/init.d/mysqld start /etc/init.d/httpd start /etc/rc.d/init.d/imap start /etc/rc.d/init.d/imaps start /etc/rc.d/init.d/spamassassin start /etc/init.d/clamd start if ur getting err compiling couriour authlib..jus go to wbitt..giude whit md. Kamran.

Compile Courier IMAP:Adding User For Installation useradd qadmin g wheel cd /downloads/qmailnew/courier-imap-4.1.3 chown qadmin:wheel /downloads/qmailnew/courier-imap-4.1.3 -R su qadmin ./configure --prefix=/usr/local --exec-prefix=/usr/local --with-authvchkpw --without-authldap --without-authmysql --disable-root-check --with-ssl --with-authchangepwdir=/usr/local/libexec/authlib --with-redhat make && make check exit # exit from su make install-strip && make install-configure Now let's create an SSL certificate for the IMAP-SSL server... /usr/local/sbin/mkimapdcert vi /usr/local/etc/imapd.cnf change email address to postmaster@isb.ots.com.

vi /usr/local/etc/imapd Make sure that the following configuration exists: IMAPDSTART=YES vi /usr/local/etc/imapd-ssl Make sure that the following configuration exists: IMAPDSSLSTART=YES Make sure that the following configuration exists: TLS_CERTFILE=/usr/local/share/imapd.pem Save and exit the file. vi /usr/local/etc/authlib/authdaemonrc Around like 27, you should see the "authmodulelist" setting. Make sure that "authvchkpw" is the only module listed. Like so: authmodulelist="authvchkpw" Save and exit the file. Now we create the startup scripts... 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 /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 Also add these to /etc/rc.local

Install Courierpassd cd /downloads/qmailnew/courierpassd-1.1.2 ./configure make && make install Make sure we have xinetd installed : rpm -q xinetd xinetd-2.3.14-10.el5 vi /etc/xinetd.d/courierpassd service courierpassd { port = 106 socket_type = stream protocol = tcp user = root server = /usr/local/sbin/courierpassd server_args = -s imap wait = no only_from = 127.0.0.1

instances = 4 disable = no } Then: echo "courierpassd 106/tcp" >> /etc/services service xinetd restart Try changing the password now: telnet localhost 106 [root@qmail courierpassd-1.1.2]# telnet localhost 106 Trying 127.0.0.1... Connected to localhost.localdomain (127.0.0.1). Escape character is '^]'. 200 courierpassd v1.1.2 hello, who are you? user postmaster@isb.ots.com 200 Your password please. pass redhat 200 Your new password please. newpass tiger 200 Password changed, thank-you. quit 200 Bye. Connection closed by foreign host.

SQUIRRELMAIL: Download the latest stable version from www.squirrelmail.org . cd /downloads/qmailnew wget http://jaist.dl.sourceforge.net/sourceforge/squirrelmail/squirrelmail-1.4.11.tar.bz2 cd /var/www/ tar xjf squirrelmail-1.4.11.tar.bz2 ln -s /var/www/squirrelmail-1.4.11 /var/www/webmail chown apache:apache /var/www/squirrelmail-1.4.11 -R # perms dont get changed if use /var/www/webmail in chown command cd /var/www/webmail/config ./conf.pl Server Settings General ------1. Domain : isb.ots.com 2. Invert Time : false 3. Sendmail or SMTP : SMTP A. Update IMAP Settings : localhost:143 (other)

B. Update SMTP Settings : localhost:25 IMAP Settings -------------4. IMAP Server : localhost 5. IMAP Port : 143 6. Authentication type : login 7. Secure IMAP (TLS) : false 8. Server software : other 9. Delimiter : detect SMTP Settings ------------4. SMTP Server : localhost 5. SMTP Port : 25 6. POP before SMTP : false 7. SMTP Authentication : none 8. Secure SMTP (TLS) : false 9. Header encryption key : General Options 1. Data Directory : /var/www/webmail/data/ 2. Attachment Directory : /var/www/webmail/attach/ mkdir /var/www/webmail/attach chown apache:apache /var/www/squirrelmail-1.4.11 -R Get the squirrelmail change_passwd plugin: cd /downloads/qmailnew wget http://www.squirrelmail.org/countdl.php?fileurl=http%3A%2F%2Fwww.squirrelmail.org%2Fplu gi ns%2Fchange_pass-2.7a-1.4.x.tar.gz cd /var/www/webmail/plugins/ tar xzf /downloads/qmailnew/change_pass-2.7a-1.4.x.tar.gz Run the conf.pl program again. And add this plugin to Installed plugins. Plugins Installed Plugins 1. abook_take 2. administrator 3. change_pass 4. calendar 5. delete_move_next 6. filters 7. fortune 8. info 9. listcommands 10. mail_fetch 11. message_details

12. newmail 13. sent_subfolders 14. spamcop 15. squirrelspell 16. translate Available Plugins: 17. bug_report 18. demo 19. test vi /etc/httpd/conf.d/squirrelmail.conf Alias /webmail /var/www/webmail service httpd restart Log on to http://domain/webmail

Das könnte Ihnen auch gefallen