QMail mail Server installation process

Source: Internet
Author: User
Tags auth base64 exit chmod mail touch domain qmail
   Software list:
checkpassword-0.90 (POP3 authentication user program)
Cmd5checkpw-0.22.tar.gz
ucspi-tcp-0.88 (TCPServer and other service programs)
qmail-smtpd-auth-0.30.tar.gz (SMTP patch)
Qmail-1.03.tar.gz (qmail basic System Package)
vpopmail-5.2.1.tar.gz (virtual domain user POP3 support)
EZMLM-0.53.TAR.GZ (mailing list management software)
AUTORESPOND.TAR.GZ (Automatic recovery program)
Qmailadmin-1.0.6.tar.gz (virtual domain Web mode management)
All of the above software can be downloaded from the URL: http://www.qmail.org
Http://www.inter7.com/qmail Pre-Installation preparation work:   

new QMail installation directory

# Mkdir/var/qmail:

users and groups required to add QMail

# Groupadd Nofiles
# useradd-g Nofiles-d/var/qmail/alias 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

Installation QMail basic system:
Install checkpassword-0.90 (/bin)# CD/USR/LOCAL/SRC
# tar XZVF checkpassword-0.90.tar.gz
# CD checkpassword-0.90
# PATCH-P1. /patch/checkpassword-0.90.errno.patch
# make
# Make Setup CheckInstallation cmd5checkpw-0.22.tar.gz# tar zxvf cmd5checkpw-0.22.tar.gz
# Mkdir/usr/man
# MKDIR/USR/MAN/MAN8
# CD cmd5checkpw-0.22
# make
# Make InstallInstall ucspi-tcp-0.88 (/usr/local/bin)# CD/USR/LOCAL/SRC
# tar XZVF ucspi-tcp-0.88.tar.gz
# CD ucspi-tcp-0.88
# Patch-p1 < ... /patch/ucspi-tcp-0.88.a_record.patch
# Patch-p1 < ... /patch/ucspi-tcp-0.88.errno.patch
# Patch-p1 < ... /patch/ucspi-tcp-0.88.nodefaultrbl.patch
# make
# Make Setup Checkinstall QMail (qmail-1.03.tar.gz)# tar XZVF qmail-1.03.tar.gzSMTP patches and other patches:# tar ZXVF qmail-smtpd-auth-0.30.tar.gz
# CD qmail-smtpd-auth-0.30
# CP base64.c Base64.h Readme.auth. /qmail-1.03/
# patch-d. /qmail-1.03 < Auth.patch
# CD qmail-1.03
# Patch-p1 < ... /patch/qmail-103.patch
# Patch-p1 < ... /patch/qmailqueue-patch
# Patch-p1 < ... /patch/qmail-maildir++.patch
# Patch-p1 < ... /patch/qmail-1.03.errno.patch
# Patch-p1 < ... /patch/qmail-1.03.qmail_local.patch
# VI QMAIL-SMTPD.C//change 451 of function Straynewline to 553
Changing 451 to 553 is to avoid your server getting stuck in a circular response when other servers send you messages that are not in a valid format.
# Make Setup Check
#./config-fast test.com
     To Create a system alias:
# CD ~alias;touch. Qmail-postmaster. Qmail-mailer-daemon. Qmail-root
# echo test.com >/var/qmail/control/helohost \ Host name (address Sina rejected mail issue)
# chmod 644 ~alias/.qmail*
# echo "127.0.0.1:allow,relayclient=" "" >/etc/tcp.smtp
# chmod 4755/bin/checkpassword
# sed ' s/mailbox/maildir\//'/var/qmail/boot/home >/VAR/QMAIL/RC
(Modify/VAR/QMAIL/RC to/mailbox./maildir/use Maildir POP3 receiving method)
# chmod 755/VAR/QMAIL/RC
Stop SendMail Service:
#/etc/rc.d/init.d/sendmail Stop # rpm–e–nodeps SendMail
Qmail Web Management system:

Install virtual domain

# Groupadd VCHKPW
# useradd-g VCHKPW Vpopmail
# mkdir ~vpopmail/etc
# echo "127.0.0.:allow,relayclient=\" \ "" "> ~vpopmail/etc/tcp.smtp
# echo ': Allow ' >/etc/tcp.smtp
#/usr/local/bin/tcprules/etc/tcp.smtp.cdb/etc/tcp.smtp.tmp </ETC/TCP.SMTP
# CD/USR/LOCAL/SRC
# tar XZVF vpopmail-5.2.1.tar.gz

# CD vpopmail-5.2.1
#./configure--enable-roaming-users=y--enable-default-domain=test.com--enable-passwd=n
# make
# Make Install-strip

# crontab–e
* * * * */HOME/VPOPMAIL/BIN/CLEAROPENSMTP 2>&1 >/dev/null
# Cd/home/vpopmail/bin
#./vadddomain test.com Eitop
#./vadduser test@test.com test
# chmod 6755/HOME/VPOPMAIL/BIN/VCHKPW

Install mailing list

# tar XZVF ezmlm-0.53-idx-0.41.tar.gz
# CD ezmlm-0.53-idx-0.41
# make
# Make Mans
# Make Setup

Install the Auto-reply program

# tar ZXVF autorespond.tar.gz
# make (Gcc-wall-o autorespond autorespond.c)
# make install (CP Autorespond/usr/local/bin/autorespond)

Install virtual domain Web mode management

# tar XZVF qmailadmin-1.0.6.tar.gz
# CD qmailadmin-1.0.6
#./configure--enable-htmldir=/www/web1--enable-cgibindir=/usr/local/apache2/cgi-bin
# make
# Make Install-strip

Build qmail startup file

# Vi/etc/rc.d/init.d/qmail

#!/bin/sh

Case "$" in

start)

echo-n "Start qmail:"

/VAR/QMAIL/RC &

echo "."

 

echo-n "Start SMTP Service:"

 

/usr/local/bin/tcpserver-h-r-l 0-t 1-c 100-x/etc/tcp.smtp.cdb-u 512-g 505 0 smtp/var/qmail/bin/qmail-smtpd T Est.com/home/vpopmail/bin/vchkpw/bin/true/bin/md5checkpw/bin/true &

echo "."

 

echo-n "Start POP3 Service:"

/usr/local/bin/tcpserver-l Test.com-u-C 100-h-R 0 Pop3/var/qmail/bin/qmail-popup test.com/home/vpopmail/bin/v Chkpw/var/qmail/bin/qmail-pop3d Maildir &

echo "."

;;

stop)

echo-n "Stop qmail:"

echo "."

;;

*)

Exit 1

;;

Esac

 

Exit 0

# chmod 755/etc/rc.d/init.d/qmail
#/etc/rc.d/init.d/qmail Start

The user group in the startup file is the Vpopmail user group

If QMail cannot be started, execute Touch/etc/dnsrewrite

Test:
SMTP Authentication Test su-qmaild-c "/var/qmail/bin/qmail-popup localhost/home/vpopmail/bin/vchkpw pwd"
Su-qmaild-c "/var/qmail/bin/qmail-popup localhost/bin/checkpassword pwd"user testpasstest A response is entered after entering a user password, SMTP succeeds if the test user's home directory appears, and SMTP fails if prompted: "-err authorization Failed"
Web Management Test: Open http://localhost/cgi-bin/qmailadmin, enter domain test.com and password, enter admin interface, create new mailbox user and mailing list. Mail test:The main test intranet users to send e-mail, more than with the external network e-mail. please contact the site, timely note your name. Contact Email: edu#chinaz.com (change # to @).



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.