QMAIL installation and setting

xiaoxiao2021-03-06  111

Personal qmail installation and setup process, I hope to use it for everyone

1. How to get QMAIL? You can download qmail-1.03.tar.gz by accessing www.qmail.org or mirror sites, and get more QMAIL information.

2 After installing qmail to get QMAIL-1.03.tar.gz, use tar command to unpack #TAR XzVF qmail-1.03.tar.gz

After entering the qmail directory, read the ReadMe and Install file carefully. Then start compiling QMAIL.

2.1 Construction / VAR / QMAIL Directory: #mkdir / var / qmail

2.2 Establish QMAIL users and groups in the middle of install.ids:

# 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

2.3 Make Setup CHECK 2.4 Read Install.CTL and FAQ, configure qmail, the easiest way is #. / Config or #. / Config-fast your.full.home.name

2.5 Establishing system alias # (CD ~ Alias; touch .qmail-postmaster .qmail-mailer-daem "qmail-root) # chmod 644 ~ alias / .qmail *

2.6 Replication / VAR / QMAIL / BOOT / PROC to / VAR / QMAIL / RC # CP / VAR / QMAIL / BOOT / PROC / VAR / QMAIL / RC

2.7 Start testing QMAIL delivery procedure

Start qmail: # csh -cf '/ var / qmail / rc &'

First look at / var / log / maillog, search QMail: status: local 0/10 Remote 0/20 qmail-send usually output "status" or "cannot start" if it is not normal to start.

Use the PS to monitor the qmail daemon, there should be five related processes: qmail-send, run qmail-lspawn with qmails users, run qmail-rspawn with root users, run qmail-clean with qmailr users, run SPLogger with qmailq users, QMAILL user runs

Local Mail Test:% echo to: me | / var / qmail / bin / qmail-inject Note: Use your username instead of me Mail should immediately appear in your mailbox ./var/log/maillog should have Record: qmail: new MSG 53 QMail: Info MSG 53: Bytes 246 from QP 20345 UID 666 QMAIL: Starting Delivery 1: MSG 53 To Local Me @ Domain QMAIL: Status: Local 1/10 Remote 0/20 QMAIL: Delivery 1 : Success: DID_1 0 0 / Qmail: Status: Local 0/10 Remote 0/20 qmail: End MSG 5353 is the Inode number, 20345 is the process number, your figures should vary.

Local error test:

Give a local user who does not exist:% echo to: nonexistent | / var / qmail / bin / qmail-inject qmail: new MSG 53 QMAIL: Info MSG 53: BYtes 246 from QP 20351 UID 666 QMAIL: Starting Delivery 2: Msg 53 to local nonexistent @ domain qmail: status: local 1/10 Remote 0/20 qmail: Delivery 2: failure: no_such_address .__ # 5.1.1_ / qmail: status: local 0/10 Remote 0/20 qmail: Bounce MSG 53 QP 20357 qmail: new msg 54 qmail: info msg 54: Bytes 743 from <> QP 20357 UID 666 QMAIL: Starting Delivery 3: MSG 54 To local me @ domain qmail: status: local 1/10 Remote 0/20 qmail: Delivery 3: Success: DID_1 0 0 / Qmail: Status: Local 0/10 Remote 0/20 qmail: End MSG 54 You will immediately receive a pop-back letter.

Remote delivery test: Issue to you on other machines:% echo to: me @ wherever | / var / qmail / bin / qmail-inject qmail: new msg 53 qmail: info msg 53: Bytes 246 from qp 20372 uid 666 QMAIL: STARTING DELIVERY 4: MSG 53 To Remote Me @ Wherever qmail: Status: Local 0/10 Remote 1/20 QMAIL: Delivery 4: Success: 1.2.3.4_accepted_message. / ... qmail: status: local 0/10 Remote 0/20 qmail: END MSG 53 Delivery process will have a break in Starting Delivery and Success, SMTP transfer is relatively slow and then check if me @ wherever receives Email. There are three tests, respectively. Local Postmaster, bounce back Mail and execute commands through mail. The specific method can be found in Test.Deliver.

2.8 Transfer from Sendmail icon.

2.8.1 First find the starter of Sendmail, which is usually seen in the /etc/rc.d directory: sendmail -bd -q15m comment out.

2.8.2 Kill the Sendmail process. If the sendmail has a child process, you can use -stop and -cont signal repeatedly until you use -Term after add -cont to kill after you have no child.

2.8.3 Check if there is a letter in the mail queue. If it is considered necessary to send them out, you can run sendmail.bak -q until you will be emptied until the queue is emptied in a queue.

2.8.4 Remove Sendmail and other files setuid bit # chmod 0 / usr / lib / sendmail # chmod 0 / usr / sbin / sendmail # chmod 0 /usr/lib/sendmail.mx

2.8.5 # mv / usr / lib / sendmail /usr/lib/sendmail.bak # mv / usr / sbin / sendmail /usr/sbin/sendmail.bak

2.8.6 Add CSH-CF '/ VAR / QMAIL / RC &' to the startup file.

2.8.7 Installing QMAIL Sendmail Shell: # ln -s / var / qmail / bin / sendmail / usr / lib / sendmail # ln -s / var / qmail / bin / sendmail / usr / sbin / sendmail

2.8.8 Set qmail-smtpd in /etc/inetd.conf: (is a line) SMTP stream TCP NOWAIT qmails / var / qmail / bin / TCP-ENV TCP-ENV / VAR / QMAIL / BIN / QMAIL-SMTPD

2.8.9 Restably inetd, kill inetd with the -HUP signal and can.

2.9.1 Using qmail's maildir (this question is troublesometed for a few days)

Each user directory: / var / qmail / bin / maildirmake / home / $ loginname / maildir

2.9.2 This step is not good as add a line to "/ home / u user name / .bash_profile" mail = / home / $ loginname / maildir / export mail 2.9.3 pop3 go to www.qmail.org to download Checkpassword, (this qmail does not stand up) and compile in inet.conf POP-3 POP-3 Stream TCP NOWAIT qmails / var / qmail / bin / qmail-popup mydomain.com / bin / checkpassword / var / qmail / bin / qmail-pop3d (in one line) 2.9.4 RC file cp / var / qmail / boot / home / var / qmail / rc modified RC file becomes Exec Env - pat = "/ var / qmail / bin: $ PATH" / Qmail-start ./mail/ splogger qmail

3 QMAIL some special formulation

3.1 How to set smart host: # echo ": you.smart.host"> / var / qmail / control / smtproutes

3.2 Transmission to other hosts

Add 21cn.com 163.com on / var / qmail / control / rcpthosts

3.3 Set multiple domains of the host

Add / var / qmail / control / local, / var / qmail / control / rcpthosts / var / qmail / control / me

3.4 alias

The transfers in this unit are forwarded, such as WebMaster@my.com (WebMaster users do not exist) forward to user1@my.com (user1 is local user) method: Echo "User1"> / var / qmail / alias /. Qmail-Webmaster or Echo "User1@21cn.com"> / var / qmail / alias / .qmail-webmaster complete email address

3.5 Group Mailist

If you send a letter to list@my.com, you can edit / vmail/qmail/alias/.qmail-List Add user1 user2 user3 uu@21cn.com ss@163.net 3.6 Local users expand

User1, q1, q2, qq are local users USER1-S1, USER1-S2, USER1-XXX is not local user settings to q1, user1-s2 is converted to Q2, USER1-21 is converted to DD @ 21cn.com, User1-List is converted to DD @ 21cn.com, Q1, Q2, QQ USER1-XXX (XXX indicates other names) to QQ, ECHO "Q1"> / home / user1 / .qmail-s1 echo " QD@21cn.com "> / home / user1 / .qmail-21 echo" q2 "> / home / user1 / .qmail-s2 echo" qq "> / home / user1 / .qmail-default editing / home / user1 / .qmail-list content is dd@21cn.com Q1 Q2 QQ

3.7 How to set the virtual host, such as: WebMaster@ttt.com to set the local user TTTWeb setting help@ttt.com to the field user help@ther.com Set other @ ttt.com to the local User TTTother method: (1) Add the virtual host TTT.com to / var / qmail / control / local and / var / qmail / control / rpthosts (2) and add Your.Virtual in / var / qmail / control / virtterialdomains. Domains: TTTCOM (3) Add a user TTTCOM AddUser TtTcom All sent to me@ttt.com will be sent to Testcom-me@test.com, (4) Echo "TttWeb"> / Home / Testcom / .qmail-webmaster echo "help@other.com"> / home / testcom / .qmail-help echo "tttother"> / home / testcom / .qmail-default (5) from the new boot QMAIL 3.8 Cc, send a letter User1@red.lx, simultaneous copy to user2, DD @ 21cn.com method: Editing /Home/User1/.qamil content is as follows ./mAildir/ | Forward user2 dd@21cn.com3.9 Transfer USER1@red.lx Steering DD@163.net method: Editing /Home/User1/.qamil content The following dd@163.net 3.10 How to set qmail as the external SMTP server? (Remove the transfer and sending the restriction) Remove / var / qmail / control / rcpthosts file

转载请注明原文地址:https://www.9cbs.com/read-101448.html

New Post(0)