Qmail + Webmail on Linux9 installation full process

zhaozj2021-02-16  55

A project made by the front, now sorted, and shared with everyone.

Qmail Installation Guide Author: Lupeng Lockbox @ @ @ @ qp @ q

163.com version: v1.1 2004-6-27 qmail is an excellent MTA (Mail Transport Agent) written by Dan Bernstein Why qmail:.... * Security qmail is secure * Speed ​​qmail is capable of handing millions of deliveries per ... day on a moderate system * Reliability qmail writes mail to disk before it announces success * Extremely easy virtual domain administration * User-controlled mailing lists using ezmlm * Intuitive, straightforward, and simple administration Requirements:... * You must be . running UNIX or a UNIX-like operating system * You must have a working DNS, and your system must have a DNS name * You must have a working C compiler Install file list:.. * netqmail-1.05.tar.gz * ucspi -tcp-0.88.tar.gz * daemontools-0.76.tar.gz * vpopmail-5.4.0.tar.gz * mysql-standard-4.0.20-pc-linux-i686.tar.gz * apache_1.3.31.tar .gz * php-4.3.7.tar.gz * autorespond-2.0.4.tar.gz * ezmlm-0.53.tar.gz * ezmlm-idx-0.40.tar.gz * qmailadmin-1.2.0.tar.gz * sqwebmail-3.5.3.tar.gz patches: * ezmlm-idx-0.53.400.Unified_ 41.patch Scripts: * qmailctl * inst_check * qmailadmin_zh * zh-cn / * * images / webmail / * Preparation:. Login the system as root mkdir -p / usr / local / src mkdir -p / package Move the files of installation , patches and scripts except daemontools-0.76.tar.gz to / usr / local / src Move daemontools-0.76.tar.gz to / package chmod 1755 / package Start installation: cd / usr / local / src tar -xvzf netqmail-1.05 .tar.gz cd Netqmail-1.05 ./collate.sh # important desencept !!!

Cd .. tar -xvzf ucspi-tcp-0.88.tar.gz rm * .tar # optional, unless space is very tight cd / package tar -xvzf daem 0 0 0 # Optional, Again ## ################################################################################################################################################################################# ############### MKDIR / VAR / QMAIL MKDIR / ETC / QMAIL LN -S / etc / qmail / var / qmail / control # create users and groups userdel alias Userdel qmails Userdel qmaill Userdel qmailp userdel qmailq userdel qmailr userdel qmails groupdel nofiles groupdel 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 useeradd -g qmail -d / var / qmail qmailr uSeradd -g qmail -d / var / qmail qmails CD / USR / local / src / netqmail-1.05 / netqmail-1.05 make setup check # If your DNS is configured properly, this script should be all you need at this point:. ./config # Or you can configure your domain ./config-fast mail.m Yqmail.com ###################################################################################################################################################################################################################################################################################################### ####################### usr/local/src/ucspi-tcp-0.88 patch

/usr/local/src/netqmail-1.05/other-patches/daemontools-0.76.rrno.patch cd .. package / install # start qmail script vi / var / qmail / rc ######## Write the Following Section to file: / var / qmail / rc ######## #! / bin / sh # using stdout for logging # Using control / defaultdelivery from qmail-local to deliver messages by default exec env - path = "/ VAR / QMAIL / BIN: $ PATH "/ qmail-start" `cat / var / qmail / control / defaultdelivery`" ####### End ####### CHMOD 755 / VAR / QMAIL / RC MKDIR / VAR / log / qmail echo ./mails /> / var / qmail / limited / defaultdelivery mv / usr / local / src / qmailctl / var / qmail / bin / chmod 755 / var / qmail / bin / qmailctl ln - S / var / qmail / bin / qmailctl / usr / bin # create the supervise mkdir -p / var / qmail / supervise / qmail-send / log mkdir -p / var / qmail / supervise / qmail-smtpd / log vi / var / qmail / supervise / qmail-send / run ######## Write the fol / qmail / supervise / qmail-send / run ######## #! / bin / SH EXEC / VAR / QMAIL / RC ######## End ######## vi / var / qmail / supervise / qmail-send / log / run ######## WRITE The fol / qmail / super file: / var / qmail / supervise / qmail-send / log / run ######## #! / bin / sh exec / usr / local / bin / setuidgid qmaill / usr / local / bin / multiLog t / var / log / qmail ######## end ######## vi / var / qmail / supervise / qmail-smtpd / run ####### w # # FOLLOWING Section to file: / var / qmail / super ######## #! / bin / sh qmailduid = `ID --U qmails` NOFILESGID =` ID -G qmailsgid = `ID =` Cat / var / qmail / control / concurrencyincoming` Local = `Head -1 / var / qmail / control / me` if [-z" $ qmailduid "-o -z" $ maxsmtpd "-o" $ maxsmtpd "-o -z "$ local"];

THEN Echo Qmailduid, Nofilesgid, Maxsmtpd, or Local ISET IN ECHO / VAR / QMAIL / SuperVISE / QMAIL-SMTPD / RUN EXIT 1 FI IF [! -f / var / qmail / control / rcpthosts]; the echo "no / var / qmail / control / rcpthosts! "echo" refusing to start smtp listener because it'll create an open corre "exit 1 fi EXEC / USR / local / bin / softlimit -m 2000000 / / usr / local / bin / tcpserver -v -R -l "$ local" -x /etc/tcp.smtp.cdb -c "$ maxsmtpd" / -u "$ qLDUID" -g "$ nofilesgid" 0 SMTP / VAR / QMAIL / BIN / QMAIL-SMTPD 2 > & 1 ######## end ######## echo 20> / var / qmail / control / concurrencyincoming chmod 644 / var / qmail / control / concurrencyincoming vi / var / qmail / supervise / qmail- SMTPD / LOG / RUN ######## write the fol / qmail / super file: / var / qmail / supervise / qmail-smtpd / log / run ######## #! / bin / sh exec / USR / local / bin / setuidgid qmaill / usr / local / bin / multilog t / var / log / qmail / smtpd ####### End ####### chmod t / var / qmail / Supervise / qmail-send chmod t / var / qmail / supervise / qmail-smtpd chmod 755 / var / qmail / supervise / qmail-send / Run CHMOD 755 / VA R / QMAIL / SuperVise / qmail-send / log / run chmod 755 / var / qmail / supervise / qmail-smtpd / run chmod 755 / var / qmail / supervise / qmail-smtpd / log / run mkdir -P / var / log / qmail / smtpd chown qmaill / var / log / qmail / var / log / qmail / SMTPD ln -s / var / qmail / super logs / * / service / # allow the local host to incject mail via smtp: echo '127 .: Allow, relayclient = "" >>

/etc/tcp.smtp qmailctl cdb # stop and disable the installed mta: /etc/init.d/sendmail stop /sbin/init.d/sendmail stop /etc/rc.d/init.d/sendmail stop # uninstall the sendmail: rpm -e --nodeps sendmail # Verify that nothing is listening to the SMTP port (25): netstat -a | grep smtp # If something is running, make sure it's not qmail by doing: qmailctl stop # The repeat the netstat Check: netstat -a | grep smtp # replace any existing / usr / lib / sendmail with the qmail version: mv / usr / lib / sendmail /usr/lib/sendmail.old # ignore errors mv / usr / sbin / sendmail / usr /sbin/sendmail.old # ignore errors chmod 0 /usr/lib/sendmail.old /usr/sbin/sendmail.old # ignore errors ln -s / var / qmail / bin / sendmail / usr / lib ln -s / var / qmail / bin / sendmail / usr / sbin # create these aliases "stone": echo stone> /var/qmail/alias/.qmail-root echo stone> /var/qmail/alias/.qmail-postmaster ln -s. QMail-Postmaster /Var/qmail/alias/.qmail-mailer-daemon chmod 644 /var/qmail/alias/.qmail-root /var/qmail/Alias/.qmail-postmast er # Start qmail service:. qmailctl start # Now qmail should now be running You can run "qmailctl stat" to verify that the services are up and running: # qmailctl stat # And run "qmailctl cdb" to reload the / etc / tcp .smtp # qmailctl CDB MKDIR / VAR / QMAIL / SuperVise / qmail-pop3d vi / var / qmail / supervise / qmail-pop3d / run ####### Write the Following Section to file: / var / qmail / supervise / qmail-pop3d / run ####### #! / bin / sh exec / usr / local / bin / softwarelimit -m 3000000 / / usr / local / bin / tcpserver -v -r -h -l 0 0 110 / var / qmail / bin / qmail-popup / mail.myqmail.com / home / vpopmail / bin / vchkpw / var / qmail / bin / qmail-pop3d maildir 2> &

1 ######## End ######## mkdir / var / qmail / supervise / qmail-pop3d / log vi / var / qmail / supervise / qmail-pop3d / log / run #### #### write the fol / qmail / supervise / qmail-pop3d / log / run ######## #! / Bin / sh exec / usr / local / bin / setuidgid qmaill / USR / local / BIN / MULTILOG T / / VAR / LOG / QMAIL / POP3D ######## End ######## MKDIR / VAR / log / qmail / pop3d chown qmaill / var / log / QMAIL / POP3D CHMOD 755 / VAR / QMAIL / SuperVise / qmail-pop3d / run chmod 755 / var / qmail / supervise / qmail-pop3d / log / supervise / qmail-pop3d / service vi / VAR / QMAIL / BIN / QMAILCTL ######## add the following section to "start" part of the file: / var / qmail / bin / qmailctl ####### i svok / service / qmail -POP3D; THEN SVC -U / Service / qmail-pop3d / service / qmail-pop3d / log else echo qmail-pop3d supervise not running fi ######## End ####### ### ##### add the following section to "stop" part of the file: / var / qmail / bin / qmailctl ####### Echo "qmail-pop3d" svc -d / service / qmail-pop3d / Service / qmail-pop3d / log ######## End ####### # ######## add the folowing section to "stat" part of the file: / var / qmail / bin / qmailctl ####### svstat / service / qmail-pop3d svstat / service / qmail -POP3D / LOG ######## End ######## ######## add the following section "PAUSE" Part of the file: / var / qmail / bin / qmailctl ######## echo "pausing qmail-pop3d" svc -p / service / qmail-pop3d ######### ####### ######## add The Following Section To "Cont" Part of the file: / var / qmail / bin / qmailctl ######## echo "Continuing qmail-pop3d" svc -c / service / qmail-pop3d ###### ## End ######## ######## add the following section to "rest" part of the file: / var / qmail / bin / qmailctl ######## echo " * Restarting qmail-pop3d. "

SVC -T / Service / qmail-pop3d / service / qmail-pop3d / log ################################################################################################ Everything Looks Right, Inst_Check Will Report: # congratulation, your lq installation look! ######################################################################################################################################################################################################################################################################### Install mysql ######################### Groupadd mysql useradd -g mysql mysql cd / usr / local tar -xvzf / USR / local / src / mysql-standard-4.0.20-pc-linux-i686.tar.gz ln -s mysql-standard-4.0.20-pc-linux-i686 mysql cd mysql scripts / mysql_install_db cd .. chown - R root.mysql mysql-standard-4.0.20-pc-linux-i686 chmod -r 640 mysql chmod -r u x, g x mysql chmod -r ug x mysql / bin chmod -r g w mysql / Data chmod -r u x mysql / scripts cp /usr/local/mysql/support-files/my-medium.cnf /usr/local/mysql/data/my.cnf chgrp mysql / usr / local / mysql / data / My.cnf cd / usr / local / mysql bin / safe_mysqld --user = mysql & # set the root password / usr / local / mysql / bin / mysqladmin-u root password 'secret' # configure mysql so it is running all the Tim e from bootup onwards cp /usr/local/mysql/support-files/mysql.server /etc/rc.d/init.d/mysql chmod 744 /etc/rc.d/init.d/mysql chkconfig --Add MySQL ######################## # @STALL APACHE ############### ################# CD / usr / local / src chown -r root.root apache_1.3.31.tar.gz tar -xvzf apache_1.3.31.tar.gz GroupAdd WWW UserAdd -g www www cd /usr/local/src/apache_1.3.31 ./configure / --prefix = / usr / local / apache / --enable-module = so / --enable-module = REWRITE / --ENABLE- Shared = REWRITE / --SERVER-UID = WWW / --SERVER-GID =

WWW make make install ##################### # install php ########### ##################### CD / usr / local / src tar -xvzf php-4.3.7.tar.gz chown -r root.root php-4.3. 7.Tar.gz CD PHP-4.3.7 ./configure / --with-mysql = / usr / local / mysql / --with-apxs = / usr / local / apache / bin / apxs make make install CP PHP. Ini-dist /usr/local/lib/php.ini vi /usr/local/lib/php.ini ######## Modify the/usr/local/lib/php.ini file and make Sure IT Contains the following commands. ######## max_execution_time = 60 memory_limit = 10M post_max_size = 8M upload_max_filesize = 8M file_uploads = On log_errors = On error_log = / usr / local / apache / logs / php_error_log ######## End ######## chown -r root.ww / usr / local / lib / php chmod -r GW, O-RWX / USR / local / lib / php vi / usr / local / apache / conf / httpd .conf ######## Modify the/usr/local/apache/conf/httpd.conf file and makess. ######## user www group www servemin postmaster @ myqmail .com servername mail.five-star.cn # FOLLOWING LINE SHOULD BE PRESENT ALR eady as it would be inserted by the PHP make # Make sure you move it outside of the IfDefineSSL section if the make (incorrectly) put it there LoadModule php4_module libexec / libphp4.so # uncomment (or add) the following line AddType application / x -HTTPD-PHP .php # add the index.php iod this line so apache will use this file as a default in addition to index.html directoryindex index.php index.html ####### End #### #### RM -RF / USR / local / apache / htdocs / * rm -f /usrr/local/apache/index.html.* rm -rf / usr / local / apache / cgi-bin / * CD / USR / local chown -r root.root apache chmod 755 apache chmod -r 600 apache / * chmod -r u x apache cd apache chmod -r u x bin chgrp -r www cgi-bin chmod -r u x, g

X cgi-bin chgrp -r www icons chmod -r g rx icons chgrp -r www logs chmod g wx logs chgrp -r www htdocs chmod -r g rx htdocs # run apache every time at bootup. rm -rf / ETC / RC.D / INIT.D / httpd vi /etc/rc.d/init.d/httpd ######## Create the /etc/rc.d/init.d/httpd file with the Following Commands. ####### #! / bin / sh # # Startup script for the apache Web Server # # chkconfig: 345 85 # Description: Apache is a World Wide Web Server. it is buy to serve / # HTML Files and CGI. # Processname: httpd # pidfile: /var/run/httpd.pid # source function library. ./Etc/rc.d/init.d/functions # see how wee were caled. Case "$ 1" in START) Echo -n "Starting httpd:" daemon / usr / local / apache / bin / httpd echo touch / var / lock / subsys / httpd ;; stop) echo -n "shutting down http:" KillProc httpd echo rm -f / VAR / LOCK / SUBSYS / HTTPD RM -F /VAR/Run/httpd.pid ;; Status) status httpd ;; restart) $ 0 stop $ 0 start ;; reload) echo -n "reloading httpd:" KillProc httpd -hup echo ;; * Echo "USAGE: $ 0 {start | stop | restart | RELO Ad | status} "exit 1 ESAC EXIT 0 ######## End ######## chown root.root /etc/rc.d/init.d/httpd CHMOD 744 / ETC / RC. D / Init.d / httpd chkconfig --Add httpd ######################################################################################################################################################################################################################################################### ######################################################################################################################################################################################################################################################################################## 0.tar.gz chown -R root.root vpopmail-5.4.0 cd vpopmail-5.4.0 mkdir ~ vpopmail / etc chown vpopmail.vchkpw ~ vpopmail / etc echo "localhost | 0 | vpopmailuser | vpoppasswd | vpopmail"> ~ vpopmail /etc/vpopmail.mysql chown vpopmail.vchkpw ~ vpopmail / etc / vpopmail.mysql chmod 640 ~ vpopmail / etc / vpopmail.mysql / usr / local / mysql / bin / mysql --password = "secret"

CREATE DATABASE vpopmail;. GRANT select, insert, update, delete, create, drop ON vpopmail * TO vpopmailuser @ localhost IDENTIFIED BY 'vpoppasswd'; quit ./configure / --disable-roaming-users / --enable-logging = p / --disable-passwd / --etable-clear-passwd / --disable-domain-quotas / --enable-auth-module = mysql / --disable-many-domains / --enable-auth-logging / -enable-mysql-logging / --enable-valias / --disable-mysql-limits make make install-strip vi ~ vpopmail / etc / vlimits.default default_quota 20971520 # Set the mail box default size 20M. echo "myqmail.com "> / home / vpopmail / etc / defaultdomain # setup the quota warning message That is Sent To Users WHEN THEY AT 90% quota. vi quotawarn.msg ####### Create the quotawarn.msg file with the Following Commands. ######## from: SomeCompany Postmaster reply-to: postmaster@myqmail.com to: SomeCompany User :; Subject: Mail Quota Warning Mime-Version: 1.0 Content-Type: TEXT / Plain; Charset = ISO-8859-1 Content-Transfer-Encoding: 7bit Your mailbox on the server is now more than 90% full So that you can continue to receive mail, you need to remove some messages from your mailbox If you require assistance with this, please contact our support department:.. Email: support @ myqmail .com tel: xx xxxx xxxx ######## End ######## CP quotawarn.msg /Home/vpopmail/domains/.quotawarn.msg echo "Message Rejected. Not Enough Storage Space In User's mailbox to accept message. "> /home/vpopmail/domains/.over-quota.msg # add a domain / home / vpopmail / bin / vadddomain myqmail.com myqmail # add a test account / home / vpopmail / bin / vadduser stone @ myqmail.com stone # delete a user # / home / vpopmail / bin / vdeluser stone @

Myqmail.com # delete a domain # / home / vpopmail / bin / vdeldomain myqmail.com ################################################################################################################################################################################################################################### # # @STALL AutoResponder ################################################################################################# 4.Tar.gz chown -r root.root autorespond-2.0.4 cd autorespond-2.0.4 make make install ######################################################################################################################################################################################################################################################## ####### # INSTALL EZMLM / EZMLM-IDX ################################## Local / src tar -xvzf ezmlm-0.53.tar.gz chown -r root.root ezmlm-0.53 cd / usr / local / src tar -xvzf ezmlm-idx-0.40.tar.gz chown -r root.root ezmlm-idx -0.40 cp -r ezmlm-idx-0.40 / * ezmlm-0.53 / # (You NEED TO PRESS Y QUITE A FEW TIMES TO ALOW THE PATCH FILES TO OVERWRITE The Original Files) CD EZMLM-0.53 Patch

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

New Post(0)