分享
 
 
 

qmail+webmailonLinux9安装全过程

王朝system·作者佚名  2008-05-19
窄屏简体版  字體: |||超大  

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 sentence!!!

cd ..

tar -xvzf ucspi-tcp-0.88.tar.gz

rm *.tar # optional, unless space is very tight

cd /package

tar -xvzf daemontools-0.76.tar.gz

rm *.tar # optional, again

################################

# Install qmail

################################

mkdir /var/qmail

mkdir /etc/qmail

ln -s /etc/qmail /var/qmail/control

# Create users and groups

userdel alias

userdel qmaild

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

useradd -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.myqmail.com

################################

# Install ucspi-tcp

################################

cd /usr/local/src/ucspi-tcp-0.88

patch < /usr/local/src/netqmail-1.05/other-patches/ucspi-tcp-0.88.errno.patch

make

make setup check

################################

# Install daemontools

################################

cd /package

tar -xvzf daemontools-0.76.tar.gz

cd /package/admin/daemontools-0.76/src

patch < /usr/local/src/netqmail-1.05/other-patches/daemontools-0.76.errno.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 ./Maildir/ /var/qmail/control/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 following section to file:/var/qmail/supervise/qmail-send/run ########

#!/bin/sh

exec /var/qmail/rc

######## End ########

vi /var/qmail/supervise/qmail-send/log/run

######## Write the following section to 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

######## Write the following section to file:/var/qmail/supervise/qmail-smtpd/run ########

#!/bin/sh

QMAILDUID=`id -u qmaild`

NOFILESGID=`id -g qmaild`

MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`

LOCAL=`head -1 /var/qmail/control/me`

if [ -z "$QMAILDUID" -o -z "$NOFILESGID" -o -z "$MAXSMTPD" -o -z "$LOCAL" ]; then

echo QMAILDUID, NOFILESGID, MAXSMTPD, or LOCAL is unset in

echo /var/qmail/supervise/qmail-smtpd/run

exit 1

fi

if [ ! -f /var/qmail/control/rcpthosts ]; then

echo "No /var/qmail/control/rcpthosts!"

echo "Refusing to start SMTP listener because it'll create an open relay"

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 "$QMAILDUID" -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 following section to 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 /var/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/supervise/* /service/

# Allow the local host to inject 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

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有