QMail Vpopmail SQWwebmail is a very good Web Mail solution. This article will detail the specific installation process, hoping to help you implement the Web Mail system.
I. Install the environment
Installation platform: redhat Linux
Installed machine: mail.mydomain.com
Software package:
QMAIL-1.03 QMAIL basic system
UCSPI-TCP-0.88 TC
Psever and other service programs
DAEMONTOOLS-0.70 Monitoring Tool
Checkpass
Word-0.81 POP3 verifies the user's program
EZMLM-0.53 Mail list management
VPOPMAIL-4.9.6-1 Virtual domain user POP3 support
QMAILADMIN-0.35 Virtual Domain Web Management
AutoRespond-1.0.0 automatic reply program
SQwarebmail-1.2.0 Webmail
VQSIGNUP-0.4 web way user registration
Soft Source:
http://www.qmail.org
http://www.inter7.com/qmail
Note: Read Install and FAQ carefully before each package installation, many problems have a solution in FAQ.
Second. Installation steps
1. Install qmail
1) Create a QMAIL installation directory
#mkdir / var / qmail
2) Add QMAIL necessary users and groups
#groupadd nofiles
# useradd -g nofiles -d / var / qmail / alias alias
# uSERADD -G NOFILES -D / VAR / QMAIL qmails
# 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) Unzip, unpack, and compile
(Suppose these packages
Download to / VAR / TMP directory)
#CD / VAR / TMP
#TAR XZVF qmail-1.03.tar.gz
#CD qmail-1.03
After entering the qmail directory, read the ReadMe and Install files carefully. Then start compiling QMAIL
#make setup check
4) Configuration
#. / config
5) Establish system alias
# (CD ~ Alias; Touch .qmail-postmaster .qmail-mailer-daemon .qmail-root)
#CHMOD 644 ~ Alias / .qmail *
You can specify management users in these alias files to accept these system messages, such as
#echo 'admin'> ~ alias / .qmail *
6) Establish a launch file and user's maildir
#CP / VAR / QMAIL / BOOT / HOME / VAR / QMAIL / RC
#CHMOD 755 / VAR / QMAIL / RC
Edit / VAR / QMAIL / RC
Modify it ./mailbox into ./maildir to support the POP recipient of maildir, as follows:
#! / bin / sh
# Using splogger to send the log through syslog.
# @ @ XiL-local to deliver messages to ~ / maildir by Default.
Exec env - path = "/ var / qmail / bin: $ path" /
qmail-start ./maildir splogger qmail
Where the SPLogger QMAIL directive is used to record the log files /.
Establishing Maildir: $ / var / qmail / bin / maildirmake / etc / skel / maildir
$ Echo ./mAildIr/> ~ / .qmail
Note that maildir must be all of the user, can change CHOWN, and set permissions with CHMOD 700 MAILDIR.
2. 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.
3. Install Checkpass
Word
#TAR ZXVF Checkpassword-0.81.tar.gz
#CD Checkpassword-0.81
#make
#make setup check
#CHMOD OG-RX / BIN / Checkpassword
The execution file Checkpassword will be installed in / bin.
If you don't open Mail for users in / etc / passwd, you don't need to install checkpassword, and you will do it as soon as you have VPopmail.
4. An BDaemontools
#tar zxvf daemontools-0.70.tar.gz
#CD daemOLS-0.70
#make
#make setup check
The execution file will be installed in / usr / local / bin.
You can use this tool after installing this tool
#mkdir / var / run / qmail
#supervise / var / run / qmail / var / qmail / rc
To start QMAIL, you can also use SVC to turn off or restart qmail, monitor QMAIL operation with SVSTAT. (See Qmail FAQ)
2. 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.
3. Install Checkpass
Word
#TAR ZXVF Checkpassword-0.81.tar.gz
#CD Checkpassword-0.81
#make
#make setup check
#CHMOD OG-RX / BIN / Checkpassword
The execution file Checkpassword will be installed in / bin.
If you don't open Mail for users in / etc / passwd, you don't need to install checkpassword, and you will do it as soon as you have VPopmail.
4. An BDaemontools
#tar zxvf daemontools-0.70.tar.gz
#CD daemOLS-0.70
#make
#make setup check
The execution file will be installed in / usr / local / bin.
You can use this tool after installing this tool
#mkdir / var / run / qmail
#supervise / var / run / qmail / var / qmail / rc
To start QMAIL, you can also use SVC to turn off or restart qmail, monitor QMAIL operation with SVSTAT. (See Qmail FAQ)
5. Install vpopmail
#groupadd vchkpw
# useradd -g vchkpw vpopmail
#mkdir ~ vpopmail / etc
#echo ":: a"> ~ vpopmail / etc / tcp.smtp
#TAR ZVFZ VPOPMAIL-4.9.6-1.tar.gz
#CD VPOPMAIL-4.9.6-1
#. / configure --enable-roaming-users = y --Nable-default-domain = mydomain.com --enable-passwd = n (Note: - Enable-roaming-users = y indicates that the user is allowed to use Mail system)
#make
#make install-strip
#crontab -e (edit the cron file, as follows)
40 * * * * / home / vpopmail / bin / clearopensmtp 2> & 1> / dev / null
#CD / Home / vpopmail / bin
#. / vedddomain mydomain.com mydomain
Add Mydomain.com to / VAR / QMAIL / Control / RCPTHOSTS.
6. Stop Sendmail service
#killall -9 sendmail (Linux)
Then replaced the original Sendmail with qmail's Sendmail LibRaby
#mv / usr / lib / sendmail /usr/lib/sendmail.old
#mv / usr / sbin / sendmail /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 launcher, taking Linux as an example:
Remove the setmail settings in inetd.conf, and the Sendmail startup file under /etc/rc.d/init.d. (Linux)
7. Start QMail SMTP, POP3 DAEMON system service
1) Establish a SMTP transfer rule
Establish /tc/tcp.smtp hot smoke
: Allow
This is accepting any CL
IENT transmission letter issued
To refuse some of the Relay sent by some IP, modify /etc/tcp.smtp as follows
1.2.3.4:Allow, RELAYCL
IENT = ""
127.:Allow, relayclient = ""
As such, all addresses other than 1.2.3.4 and 127. * will be rejected.
2) Convert TCP.SMTP to become CDB format
# / usr / local / bin / tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp
Note: If you have any changes to TCP.smtp, you will have to turn into a CDB file through TCPRules.
In addition, if tcp.smtp is blank, it means the rejecting all the transfer, because the preset rule is DENY.
At this point, the transfer rule has been established, and will start QMAIL-SMTPD later according to this rule.
3) Set the startup of SMTP and POP3 Daemon
Remove the settings of SMTP and POP3 in inetd.conf (plus ##)
Edit / etc / service, change to the following settings:
SMTP25 / TCPMAIL
# POP-3 110 / TCP #POP Version 3
# POP-3 110 / UDP
POP3110 / TCP
POP3110 / UDP
Start SMTP:
/ usr / local / bin / tc
PServer -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 &
Where uid and gid are the new QMAIL system account qmails, and the Group ID of Nofiles. / VAR / QMAIL / BIN / SPLogger The line will write the log file in / var / log / maillog.
Edit the startup file Add the following settings:
TC
PSERVER -H -R 0 POP3 /
/ var / qmail / bin / qmail-popup mail.mydomain.com /
/ home / vpopmail / bin / vchkpw / var / qmail / bin / qmail-pop
3D MAildir &
Create a file qmail under /etc/rc.d/init.d, 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
(Note: The startup file here is not written)
8. qmailadmin - Web mode management qmail
1) EZMLM installation
$ Make
$ Make Man
#make setup
2) Installation of AutoRespond
GCC-Wall -o Autorespond AutoRespond.c
CP AutoRespond / USR / local / bin / autorespond
3) QMAILADMIN installation
First, consider meeting the following requirements before installation:
a. Do you have a vPopmail user vchkpw
B.cgi-bin directory location
C.EZMLM directory location
The location of the D.AutoRespond directory
If you can reach the above requirements, you can continue to install
#. / configure
#make
#make install-strip
Detect whether the installation is correct:
Open the path in the browser http://mail.mydomain.com/cgi-bin/qmailadmin,
Whether it can be successfully logged in according to the user and password set up.
9. SQWwebmail - a webmail solution
1) Install sqwebmail
#TAR XVFZ SQWWebmail-1.2.0.tar.gz
#CD SQWebmail-1.2.0
#. / configure --without-authpam --without-authuserdb --enable-webpass = no / - welHout-authpwd --without-authshadow
#make configure-check
#make (When I am Make, I can't find DB.H, cp /usr/include/db1/db.h /usr/include/db.h)
#make check
#make install-strip
#make install-configure
Detecting whether the installation is correct: Open the path in the browser http://mail.mydomain.com/cgi-bin/sqwebmail
2) Install VQSIGNUP
#TAR XVFZ vqsignup-0.4.tar.gz
#CD VQSIGNUP-4.0
Install (?) According to Install (?)
Install this
The package may be more troublesome and require some patience.
a. Modify the Makefile file:
Flags = -i / home / vpopmail / incn
Modify -i / home / vpopmail / include to the real vpopmail / incline directory
Modify this line below
$ (CC) $ (FLAGS) -O $ (BIN) $ (OBJS) -L / Home / vpopmail / lib --lvpopmail -lcrypt
Modify -L / Home / vpopmail / lib for the real VPopmail lib directory
b. Compilation
#make
c. Installation
Copy Signup.cgi and Signup.conf files to cgi-bin directory
Switching directory to the CGI-BIN directory
#Chown vpopmail signalup.cgi
#chgrp vchkpw signalup.cgi
#CHMOD UG S Signup.cgi
#CHMOD UGO R Signup.conf
Copy the vqsignup_html directory to the CGI-bin directory, confident that all users can read
Copy the vqsignup.html file to the DocumentRoot directory, confident that you can access.
Edit the vqsignup.conf file under the CGI-bin directory
Modify all lines of "add_domain", plus your real domain, delete other rows
Change the vqsignup_text / *. Html file, the path to the row containing "Result_ *" to the correct whole road.
Modify all the files in the vqsignup_text directory so that they only contain the domain you want to support, and you can customize these pages to make them more well.
Modify the vqsignup.html file in the documentroot directory so that it only contains the domain you want, you can customize this page to make it better.
d. test
Use you
The browser visits http: // your web server / your sub Dir / vqsignup.htm, try to register new users, if successful,
So congratulations. If there is an error, return to the installation step to carefully view the permissions of the file and whether the value in vqsignup.html is correct.