Installation Platform: Linux, Solaris
Version: qmail-1.03
Installed machine: mail.mydomain.com
Software Package:
Qmail-1.03 qmail Basic System
Ucspi-tcp-0.88 tcpsever Service Program
Daemontools-0.70 monitoring tools
Checkpassword-0.81 pop3 USER verification program
Ezmlm-0.53 Email Forwarding
Vpopmail-4.9.6-1 virtual domain user pop3 support
Qmailadmin-0.35 virtual domain web Management
Autorespond-1.0.0 auto-reply Program
Web mail sqwebmail-1.2.0
Vqsignup-0.4 web-based user registration
Software Source:
Http://www.qmail.org
Http://www.inter7.com/qmail
You must carefully read the INSTALL and FAQ before installing each package. You can solve many problems in the FAQ.
Installation steps:
1. # mkdir/var/qmail
2. # groupadd nofiles
# Useradd-g nofiles-d/var/qmail/alias
# Useradd-g nofiles-d/var/qmail qmaild
# Useradd-g nofiles-d/var/qmail qmaill
# Useradd-g nofiles-d/var/qmail qmailp
# Groupadd qmail
# Useradd-g qmail-d/var/qmail qmailq
# Useradd-g qmail-d/var/qmail qmailr
# Useradd-g qmail-d/var/qmail qmails
3. # tar xzvf qmail-1.03.tar.gz
Go to the qmail directory, read the README and INSTALL files carefully, and then compile qmail.
# Make setup check
4. # cd qmail-1.03
#./Config
5. Create a system alias
# (Cd ~ Alias; touch. qmail-postmaster. qmail-mailer-daemon. qmail-root)
# Chmod 644 ~ Alias/. qmail *
6. # cp/var/qmail/boot/home/var/qmail/rc
# Chmod 755/var/qmail/rc
Edit/var/qmail/rc
Modify./Mailbox to./Maildir as follows:
#! /Bin/sh
# Using splogger to send the log through syslog.
# Using qmail-local to deliver messages ~ /Maildir by default.
Exec env-PATH = "/var/qmail/bin: $ PATH"
Qmail-start./Maildir splogger q
The splogger qmail command is used to record recorded files in.
Create a template
$/Var/qmail/bin/maildirmake/etc/skel/Maildir
$ Echo./Maildir/> ~ /. Qmail
Note that Maildir must be owned by this user. You can change the value of chown and set the permission with chmod 700 Maildir.
7. Install ucspi-tcp-0.88
# Tar zxvf ucspi-tcp-0.88.tar.gz
# Cd ucspi-tcp-0.88
# Make
# Make setup check
The execution file will be installed in/usr/local/bin.
8. Install checkpassword
# Tar zxvf checkpassword-0.81.tar.gz
# Cd checkpassword-0.81
# Make
# Make setup check
# Chmod og-rx/bin/checkpassword
The checkpassword of the execution file will be installed in/bin.
If you do not open mail to users in/etc/passwd, you do not need to install checkpassword. You only need to install vpopmail.
9. Install daemontools
# Tar zxvf daemontools-0.70.tar.gz
# Cd daemontools-0.70
# Make
# Make setup check
The execution file will be installed in/usr/local/bin.
After installing this tool, you can use
# Mkdir/var/run/qmail
# Supervise/var/run/qmail/var/qmail/rc
To start qmail, you can use svc to disable live restart qmail, and use svstat to monitor qmail running status (qmail FAQ)
10. Install vpopmail
# Groupadd vchkpw
# Useradd-g vchkpw vpopmail
# Mkdir ~ Vpopmail/etc
# Echo ": allow"> ~ Vpopmail/etc/tcp. smtp
# Tar zvfz vpopmail-4.9.6-1.tar.gz
# Cd vpopmail-4.9.6-1
#./Configure -- enable-roaming-users = y -- enable-default-domain = mydomain.com -- enable-passwd = n
# Make
# Make install-strip
# Crontab-e
40 ***/home/vpopmail/bin/clearopensmtp 2> & 1>/dev/null
# Cd/home/vpopmail/bin
#./Vadddomain mydomain.com mydomain
Append mydomain.com to/var/qmail/control/rcpthosts
11. Stop the sendmail service.
# Killall-TERM sendmail (Linux)
Then replace the original sendmail with the sendmail libraby of qmail.
# Mv/usr/lib/sendmail. old
# Mv/usr/sbin/sendmail. old
# Ln-s/var/qmail/bin/sendmail/usr/lib/sendmail
# Ln-s/var/qmail/sbin/sendmail/usr/sbin/sendmail
Remove the sendmail Startup Program. Take Linux as an example:
Remove the sendmail setting in inetd. conf and the sendmail Startup File under/etc/rc. d/init. d. (Linux)
12. Start qmail SMTP and POP3 daemon system services
Create SMTP forwarding rules
Set/etc/tcp. smtp
: Allow
This is to accept the transfer letter from any Client.
To reject the Relay from some IP addresses, change to/etc/tcp. smtp as follows:
1.2.3.4: allow, RELAYCLIENT = ""
127.: allow, RELAYCLIENT = ""
In this way, all addresses except 1.2.3.4 and 127. * will be rejected.
Next, convert tcp. smtp to the cdb format.
#/Usr/local/bin/tcprules/etc/tcp. smtp. cdb/etc/tcp. smtp. tmp </etc/tcp. smtp
Note: any changes to tcp. smtp must be converted to cdb by tcprules.
In addition, if tcp. smtp is blank, all transfers are rejected because the preset rule is deny.
Now, the forwarding rule has been set up and qmail-smtpd will be started according to this rule later.
Set the start of SMTP and POP3 daemon
Remove smtp and pop3 settings in inetd. conf ()
Edit/etc/services with the following settings:
Smtp 25/tcp mail
# Pop-3 110/tcp # pop version 3
# Pop-3 110/udp
POP3. 110/tcp
Pop3 110/udp
Start SMTP:
/Usr/local/bin/tcpserver-v-x/etc/tcp. smtp. cdb
-U UID-g GID 0 smtp/var/qmail/bin/qmail-smtpd 2> & 1
|/Var/qmail/bin/splogger smtpd 3 &
UID and GID are the User ID of qmaild added to the qmail SYSTEM account and the group ID of nofiles.
The/var/qmail/bin/splogger line will write the log file in/var/log/maillog.
Start POP3:
Add the following settings to edit the Startup file:
Tcpserver-H-R 0 pop3
/Var/qmail/bin/qmail-popup mail.mydomain.com
/Home/vpopmail/bin/vchkpw/var/qmail/bin/qmail-pop3d Maildir &
Create a file qmail under/etc/rc. d/init. d. The content is as follows:
-------------------------------------------
#! /Bin/sh
Case "$1" in
Start)
Echo-n "start qmail :"
/Var/qmail/rc &
Echo "."
Echo-n "start smtp service :"
/Usr/local/bin/tcpserver-v-x/etc/tcp. smtp. cdb
-U UID-g GID 0 smtp/var/qmail/bin/qmail-smtpd 2> & 1
|/Var/qmail/bin/splogger smtpd 3 &
Echo "."
Echo-n "start pop3 service :"
Tcpserver-H-R 0 pop3
/Var/qmail/bin/qmail-popup mail.mydomain.com
/Home/vpopmail/bin/vchkpw/var/qmail/bin/qmail-pop3d Maildir &
Echo "."
Stop)
Echo-n "stop qmail :"
Echo "."
*)
Exit 1
Esac
Exit 0
-----------------------------------------------------
# Cd ../rc3.d
# Ln-s ../init. d/qmail S98qmail
Qmailadmin WEB-based qmail Management
1 ezmlm
$ Make
$ Make man
# Make setup
2 autorespond
Gcc-Wall-o autorespond. c
Cp autorespond/usr/local/bin/autorespond
3 qmailAdmin
3.1. There are several things to consider before you start.
A. Do you have a vpopmail user and have installed vchkpw?
B. Location of your cgi bin directory
C. Location of your ezmlm directory
D. Location of your autorespond directory
If you ignore these parts, pause them and proceed !!
3.2 install
#./Configure
# Make
# Make install-strip
Open Path http://mail.mydomain.com/cgi-bin/qmailadmin in browser
User postmaster; domain mydomain.com; Password: mydomain
WebMail -- SqWebmail
# Tar xvfz sqwebmail-1.2.0.tar.gz
# Cd sqwebmail-1.2.0
#./Configure -- without-authpam -- without-authuserdb -- enable-webpass = no -- without-authpwd -- without-authshadow
# Make configure-check
# Make (db. h, cp/usr/include/db1/db. h/usr/include/db. h cannot be found when I make)
# Make check
# Make install-strip
# Make install-configure
Open Path http://mail.mydomain.com/cgi-bin/sqwebmail in browser
Vqsignup
# Tar xvfz vqsignup-0.4.tar.gz
# Cd vqsignup-4.0
INSTALL