qmail紧急求救
关于qmail的问题
本人按照如下方法安装qmail,重新启动后,qmail本身可启动。pop3和smtp服务无法启动。使用: echo to : mymailbox@sina.com.cn | /var/qmail/bin/qmail-inject 发送邮件,我在新浪的邮箱中可收到信,但使用telnet 127.0.0.1 25 无法连接。请大侠指点,本人在此谢过。0为零,o为our 的o
1.以root登录,建立/var/qmail,解压qmail,checkpasword ,ucspi-tcp
#mkdir /var/qmail
#cd /usr/local/src
#tar xzfv qmail-1.03.tar.gz
#tar xzfv checkpassword-0.90.tar.gz
#tar xzfv ucspi-tcp-0.88.tar.gz
2.安装qmail
#groupadd nofiles
#useradd ?g nofiles ?d /var/qmail/alias ?s /bin/false alias
#useradd ?g nofiles ?d /var/qmail ?s /bin/false qmaild
#useradd ?g nofiles ?d /var/qmail ?s /bin/false qmaill
#useradd ?g nofiles ?d /var/qmail ?s /bin/false qmailp
#groupadd qmail
#useradd ?g qmail ?d /var/qmail ?s /bin/false qmailq
#useradd ?g qmail ?d /var/qmail ?s /bin/false qmailr
#useradd ?g qmail ?d /var/qmail ?s /bin/false qmails
cd qmail-1.03
make setup check
./config-fast mail.example.com
3.创建别名
cd /var/qmail/alias
touch .qmail.root
touch .qmail-postmaster
touch .qmail-mailer-daemon
echo alfred >.qmail-root
echo alfred >.qmail-postmaster
echo alfred >.qmail-mailer-daemon
chmod 644 .qmail*
(aflred 为我创建的一个用户,同时创建用户sss)
4.创建用户邮箱
/var/qmail/bin/maildirmake /home/alfred/Maildirmake
echo ./Maildir/ > ~/.qmail
/var/qmail/bin/maildirmake /home/sss/Maildirmake
echo ./Maildir/>~/.qmail
chown alfred /home/alfred/Maildir
chown sss /home/sss/Maildir
5.编辑系统启动文件
cp /var/qmail/boot/home /var/qmail/rc
pico /var/qmail/rc
将其中的Mailbox 改为Maildir/.
pico /etc/rc.d/rc.local
在最后一行加入:csh ?cf ‘/var/qmail/rc &’
6.删除sendmail
mv /usr/lib/sendmail /var/lib/sendmail.bak
mv /usr/sbin/sendmail /var/sbin/sendmail.bak
7.安装checkpassword
cd checkpassword-0.90
make
make setup check
8.安装ucspi-tcp-0.88
cd ucspi-tcp-0.88
make
make setup check
9.编辑rc.local
pico rc.local
以下为两行(501,500分别为qmaild的uid,gid)
tcpserver -v -u 501 -g 500 0 smtp /var/qmail/bin/qmail-smtpd \
2>&1 | /var/qmail/bin/splogger smtpd 3 &
以下为三行
tcpserver -v -R 0 pop-3 /var/qmail/bin/qmail-popup mail.example.com \
/bin/checkpassword /var/qmail/bin/qmail-pop3d Maildir 2>&1 | \
/var/qmail/bin/splogger pop3d &
10.控制邮件中继
pico /etc/tcp.smtp
127.0.0.1:allow,RELAYCLIENT=""
10.237.1.:allow,RELAYCLIENT=""
利用tcprules生成tcp.smtp.cdb
tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp
chmod 644 /etc/tcp.smtp*
以上是配置全部。(是不是启动文件空格方面的问题)
另外安装daemontools出现问题
make 时出现:
tai64nlocal.c: in function 'main'
tai64nlocal.c:54 warning : assignment makes pointer from integer without a cast
tai64nlocal.c:55 dereferencing pointer incomlplete type
tai64nlocal.c:56 dereferencing pointer incomlplete type
tai64nlocal.c:57 dereferencing pointer incomlplete type
tai64nlocal.c:58 dereferencing pointer incomlplete type
tai64nlocal.c:59 dereferencing pointer incomlplete type
tai64nlocal.c:60 dereferencing pointer incomlplete type
make : *** [tai64nlocal.o] Error 1