Last login: Wed Oct 26 02:20:04 2011 from 192.168.21.36
[root@centos-qmail ~]# netstat -a |grep smtp
tcp 0 0 *:smtp *:* LISTEN
[root@centos-qmail ~]# telnet
telnet> open localhost 25
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.
[root@centos-qmail ~]# telnet
回头看一下tcpserver才发现
warning: dropping connection, unable to run /var/qmail/bin/qmail-smtpd: out of memory
tcpserver: status: 0/20
tcpserver: status: 1/20
tcpserver: pid 1924 from 127.0.0.1
tcpserver: ok 1924 centos-qmail.local:127.0.0.1:25 localhost:127.0.0.1::49868
tcpserver: warning: dropping connection, unable to run /var/qmail/bin/qmail-smtpd: out of memory
tcpserver: end 1924 status 28416
tcpserver: status: 0/20
尝试着把
smtp/run改大点.竟然可以了
memLimit=10000000
本来官方中教程中是2000000,接着改400000,还不行,再改成10000000才ok了
-----------
#!/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
memLimit=10000000
echo "/usr/local/bin/softlimit -m $memLimit /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"
exec /usr/local/bin/softlimit -m $memLimit /usr/local/bin/tcpserver -v -R -l "$LOCAL" -x /etc/tcp.smtp.cdb -c "$MAXSMTPD" -u "$QMAILDUID" -g "$NOFILESGID" 0 25 /var/qmail/bin/qmail-smtpd 2>&1
---------------
发送测试
-------
telnet> open localhost 25
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 centos-qmail.local ESMTP
helo qq.com
250 centos-qmail.local
mail from:root@centos-qmail.local
250 ok
rcpt to:qiedizi^H
250 ok
rcpt to :qidizi@qq.com
250 ok
data
354 go ahead
k
k
.
250 ok 1319611689 qp 2717