


Detailed installation of complete WEBMAIL solution based on qmail_PHP tutorial
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 tool
checkpassword-0.81 pop3 user verification 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 user registration
Software source:
http ://www.qmail.org
http://www.inter7.com/qmail
Be sure to read the INSTALL and FAQ carefully before installing each package. Many problems 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, carefully read the README and INSTALL files. Then start compiling qmail
#make setup check
4. #cd qmail-1.03
#./config
5. Create 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 to ~/Maildir by default.
exec env - PATH="/var/qmail/bin:$PATH"
qmail-start ./Maildir splogger q
The splogger qmail command is used to record the log file in /.
Create a template
$ /var/qmail/bin/maildirmake /etc/skel/Maildir
$ echo ./Maildir/ > ~/.qmail
Note that Maildir must be owned by the user. You can chown changes and set permissions 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 executable 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 executable checkpassword file will be installed in /bin
If mail is not open to users in /etc/passwd, there is no need to install checkpassword, just vpopmail
9. Install daemontools
# tar zxvf daemontools-0.70.tar.gz
After installing this tool in
in bin, you can use
# mkdir /var/run/qmail
# supervise /var/run/qmail /var/qmail/rc
to start qmail, you can Use svc to close and restart qmail, and use svstat to monitor the operation of qmail, (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 use qmail’s sendmail libraby to replace the original sendmail
# 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 sendmail Start the program, taking Linux as an example:
Remove the sendmail settings in inetd.conf and the sendmail startup file under /etc/rc.d/init.d. (Linux)
12. Start qmail SMTP, POP3 daemon system service
Create SMTP forwarding rules
Create /etc/tcp.smtp with the content
:allow
This is to accept forwarding letters sent by any client
If you want to reject Relay sent by certain IPs, change /etc/tcp.smtp to the following
1.2.3.4:allow,RELAYCLIENT=" "
127.:allow, RELAYCLIENT=""
In this case, all addresses except 1.2.3.4 and 127.* will be refused to forward letters.
Next, convert tcp.smtp to cdb format.
# /usr/local/bin/tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp
Note: If there is any problem with tcp.smtp Any changes must be converted into cdb by tcprules to take effect.
In addition, if tcp.smtp is blank, it means rejecting all transfers because the default rule is deny.
At this point, the forwarding rule has been created, and qmail-smtpd will be started according to this rule later.
Set up the startup of SMTP and POP3 daemon
Please remove the smtp and pop3 settings in inetd.conf (add # sign)
Edit /etc/services and change to the following settings Defined:
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 &
The UID and GID are the User ID of qmaild of the new qmail system account mentioned above, and the group ID of nofiles .
The line /var/qmail/bin/splogger will write the log file in /var/log/maillog.
Start POP3:
Edit the startup file and 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 &
Create the 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 management qmail
1 ezmlm
$ make
$ make man
# 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 vpopmail user and has installed vchkpw
b. The location of your cgi bin directory
c. The location of your ezmlm directory
d. The location of your autorespond directory
If you have ignored these parts , then pause and continue, let’s get these done first! !
3.2 install
# ./configure
# make
# make install-strip
Open the path http://mail in the browser .mydomain.com/cgi-bin/qmailadmin
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, I get an error that db.h cannot be found, cp /usr/include/db1/db.h /usr/include/db.h)
# make check
# make install-strip
# make install-configure
Open the path http://mail.mydomain.com/cgi-bin/sqwebmail
vqsignup
# tar xvfz vqsignup-0.4.tar.gz
# cd vqsignup-4.0
Follow INSTALL to install

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



How to use Docker Desktop? Docker Desktop is a tool for running Docker containers on local machines. The steps to use include: 1. Install Docker Desktop; 2. Start Docker Desktop; 3. Create Docker image (using Dockerfile); 4. Build Docker image (using docker build); 5. Run Docker container (using docker run).

Troubleshooting steps for failed Docker image build: Check Dockerfile syntax and dependency version. Check if the build context contains the required source code and dependencies. View the build log for error details. Use the --target option to build a hierarchical phase to identify failure points. Make sure to use the latest version of Docker engine. Build the image with --t [image-name]:debug mode to debug the problem. Check disk space and make sure it is sufficient. Disable SELinux to prevent interference with the build process. Ask community platforms for help, provide Dockerfiles and build log descriptions for more specific suggestions.

Docker process viewing method: 1. Docker CLI command: docker ps; 2. Systemd CLI command: systemctl status docker; 3. Docker Compose CLI command: docker-compose ps; 4. Process Explorer (Windows); 5. /proc directory (Linux).

Docker uses Linux kernel features to provide an efficient and isolated application running environment. Its working principle is as follows: 1. The mirror is used as a read-only template, which contains everything you need to run the application; 2. The Union File System (UnionFS) stacks multiple file systems, only storing the differences, saving space and speeding up; 3. The daemon manages the mirrors and containers, and the client uses them for interaction; 4. Namespaces and cgroups implement container isolation and resource limitations; 5. Multiple network modes support container interconnection. Only by understanding these core concepts can you better utilize Docker.

VS Code system requirements: Operating system: Windows 10 and above, macOS 10.12 and above, Linux distribution processor: minimum 1.6 GHz, recommended 2.0 GHz and above memory: minimum 512 MB, recommended 4 GB and above storage space: minimum 250 MB, recommended 1 GB and above other requirements: stable network connection, Xorg/Wayland (Linux)

The reasons for the installation of VS Code extensions may be: network instability, insufficient permissions, system compatibility issues, VS Code version is too old, antivirus software or firewall interference. By checking network connections, permissions, log files, updating VS Code, disabling security software, and restarting VS Code or computers, you can gradually troubleshoot and resolve issues.

VS Code To switch Chinese mode: Open the settings interface (Windows/Linux: Ctrl, macOS: Cmd,) Search for "Editor: Language" settings Select "Chinese" in the drop-down menu Save settings and restart VS Code

VS Code is the full name Visual Studio Code, which is a free and open source cross-platform code editor and development environment developed by Microsoft. It supports a wide range of programming languages and provides syntax highlighting, code automatic completion, code snippets and smart prompts to improve development efficiency. Through a rich extension ecosystem, users can add extensions to specific needs and languages, such as debuggers, code formatting tools, and Git integrations. VS Code also includes an intuitive debugger that helps quickly find and resolve bugs in your code.
