Complete Webmail solution installation based on QMail _php Foundation

Source: Internet
Author: User
Tags chmod qmail
Installation platform: Linux,solaris
Version: qmail-1.03
Installed machine: mail.mydomain.com


Package:
qmail-1.03 QMail Basic System
ucspi-tcp-0.88 Tcpsever Service Program
daemontools-0.70 Monitoring Tools
checkpassword-0.81 POP3 Verify user's program
ezmlm-0.53 Mail Forwarding
Vpopmail-4.9.6-1 virtual domain user POP3 support
qmailadmin-0.35 Virtual domain Web Management
autorespond-1.0.0 Automatic Reply program
sqwebmail-1.2.0 Webmail
vqsignup-0.4 Web-mode user Registration
Source of software:
http://www.qmail.org
Http://www.inter7.com/qmail
Be sure to read the install and FAQs carefully before each package is installed, and many questions have solutions in the FAQ.


Installation steps:

1. #mkdir/var/qmail

2. # 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

3. #tar XZVF qmail-1.03.tar.gz
After entering the QMail directory, read the Readme and install files carefully. Then start compiling 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 it./mailbox becomes./maildir, as follows:

#!/bin/sh
# Using Splogger to send the log through syslog.
# Using qmail-local to deliver messages to ~/maildir by default.
EXEC env-path= "/var/qmail/bin: $PATH"
Qmail-start./maildir Splogger Q

The Splogger qmail instruction is used to record documents in/.
Build a model
$/var/qmail/bin/maildirmake/etc/skel/maildir
$ echo./maildir/> ~/.qmail
Note that Maildir must be owned by the user, can chown changes, and set permissions chmod 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 the/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 execution file Checkpassword will be installed in the/bin
If you do not open mail to users in/etc/passwd, you do not need to install Checkpassword, just 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 the/usr/local/bin

After you install this tool, you can use the
# Mkdir/var/run/qmail
# SUPERVISE/VAR/RUN/QMAIL/VAR/QMAIL/RC
To start qmail, you can use SVC to turn off live qmail, Svstat Monitor qmail operation, (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
* * * * */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 SendMail Service
# killall-term SendMail (Linux)
Then replace the original sendmail with the SendMail Libraby of QMail
# 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 SendMail setting in the inetd.conf and the SendMail boot file under/ETC/RC.D/INIT.D. (Linux)


12. Start QMail SMTP, POP3 daemon system Services

To establish an SMTP letter of transfer rule
Establish/ETC/TCP.SMTP content as
: Allow
This is to accept any transmittal letter sent by any client side
To reject the relay from some IP, change the/ETC/TCP.SMTP to the following
1.2.3.4:allow,relayclient= ""
127.:allow, relayclient= ""
Thus, all addresses except 1.2.3.4 and 127.* will be refused to be forwarded to the letter.
   
Next, the conversion tcp.smtp becomes the CDB format.
#/usr/local/bin/tcprules/etc/tcp.smtp.cdb/etc/tcp.smtp.tmp </ETC/TCP.SMTP

Note: If there are any changes to the TCP.SMTP, it must undergo tcprules conversion to become CDB will not take effect.
In addition, if the TCP.SMTP is blank, all forwarding is rejected because the preset rule is deny.
At this point, the forwarding rules have been established and QMAIL-SMTPD will be started later in accordance with this rule.

Set SMTP and POP3 daemon startup
Please remove the SMTP and POP3 settings in the inetd.conf (plus #)
Edit/etc/services and change to 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 &

Where the UID and GID are the User IDs of the qmaild of the newly added QMail system account, and the Nofiles group ID.
The/var/qmail/bin/splogger line will write the log file in/var/log/maillog.

Start POP3:
Edit the boot file to add the following settings:
Tcpserver-h-R 0 POP3
/var/qmail/bin/qmail-popup mail.mydomain.com
/home/vpopmail/bin/vchkpw/var/qmail/bin/qmail-pop3d Maildir &


The document QMail is established under/ETC/RC.D/INIT.D, and the contents are as follows:
-------------------------------------------
#! /bin/sh

Case "$" 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 mode Management qmail

1 ezmlm
$ make
$ Make Mans
# Make Setup

2 Autorespond
Gcc-wall-o Autorespond AUTORESPOND.C
CP Autorespond/usr/local/bin/autorespond

3 Qmailadmin

3.1. There are a few things to consider before you start.
A. Do you have a Vpopmail user and have installed the VCHKPW
B. Location of your CGI bin directory
C. The location of your EZMLM directory
D. The location of your Autorespond directory
If these parts you have ignored, then pause to continue, let's take care of these first!!


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 (When I make the error can not find db.h,cp/usr/include/db1/db.h/usr/include/db.h)
# 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

Follow install installation

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.