看板FreeBSD
标 题Re: sendmail 後来不能用 pop3 imap 收发了
发信站Shaw Residential Internet (Thu Aug 4 00:12:17 2005)
转信站ptt!ctu-reader!ctu-peer!news.nctu!newshub.sdsu.edu!border1.nntp.dca.gi
感谢 前辈肯拨冗指点 :)
这就是
# cat /usr/local/etc/rc.d/mta.sh
#!/bin/sh
outgoing_queue_time=15m
mta=sendmail
case "$mta" in
exim)
program=/usr/local/sbin/exim
if [ -f /usr/local/etc/exim/configure.in ]; then
incoming_config=/usr/local/etc/exim/configure.in
else
incoming_config=/usr/local/etc/exim/configure
fi
outgoing_config=/usr/local/etc/exim/configure.out
inpidfile=/var/run/exim_in.pid
outpidfile=/var/run/exim_out.pid
subpidfile=
incoming_args="-C ${incoming_config} -oP ${inpidfile} -bd"
outgoing_args="-C ${outgoing_config} -oP
${outpidfile} -q${outgoing_queue_time}"
submitqueue_args=
;;
sendmail)
program=/usr/sbin/sendmail
incoming_queue=/var/spool/mqueue.in
submit_queue_time=${outgoing_queue_time}
inpidfile=/var/run/sendmail_in.pid
outpidfile=/var/run/sendmail_out.pid
subpidfile=/var/spool/clientmqueue/sm-client.pid
incoming_args="-L sm-mta-in -bd \
-OPrivacyOptions=noetrn \
-OQueueDirectory=${incoming_queue} \
-ODeliveryMode=queueonly \
-OPidFile=${inpidfile}"
outgoing_args="-L sm-mta-out -q${outgoing_queue_time} \
-OPidFile=${outpidfile}"
submitqueue_args="-L sm-msp-queue -Ac -q${submit_queue_time}
\
-OPidFile=${subpidfile}"
;;
*)
echo "ERROR: I don't know the MTA '$mta'. Check your
settings." >&2
exit 2
;;
esac
start_mta()
{
echo -n " `basename ${program}`(incoming)"
${program} ${incoming_args}
echo -n " `basename ${program}`(outgoing)"
${program} ${outgoing_args}
}
start_mspq ()
{
if [ "${submitqueue_args}" ]; then
echo -n " `basename ${program}`(submitqueue)"
${program} ${submitqueue_args}
fi
}
stop_mta()
{
echo "Stopping `basename ${program}` (incoming)"
kill -TERM `head -1 ${inpidfile}` 2>/dev/null
echo "Stopping `basename ${program}` (outgoing)"
kill -TERM `head -1 ${outpidfile}` 2>/dev/null
}
stop_mspq ()
{
if [ "${submitqueue_args}" ]; then
echo "Stopping `basename ${program}` (submitqueue)"
kill -TERM `head -1 ${subpidfile}` 2>/dev/null
fi
}
_action=${1:-start}
case ${_action} in
start)
start_mta
start_mspq
;;
stop)
stop_mta
stop_mspq
;;
restart)
stop_mta
stop_mspq
sleep 5
start_mta
start_mspq
;;
*)
echo "Usage: `basename $0` {start|stop|restart}" >&2
exit 64
;;
esac
exit 0
# /usr/local/etc/rc.d/mta.sh 结束
请 前辈过目指点
感谢感谢 :)
<: 老音学生 :>
===
"Dustin" <
[email protected]> 撰写於邮件新闻:
[email protected]...
>※ 引述《
[email protected] (老音学生 Old Student)》之铭言:
>> 感谢 前辈指点
>> 我重灌 sendmail mailscanner ,也将 .sh 看了一下;
>> ( 跑 sendmail+tls+sasl2 , MailScanner , spamassassin, procmail, )
>> 问题仍还存在 ... :
>> server 收来,要寄给 user 的信,都还在
>> /var/spool/mqueue
>> ( 而 user 收不到 )
> 光以这个症状来看的话﹐可能是你的local mailer设定有问题。不过因为你装了
> MailScanner,所以比较复杂。你的mta.sh内容可以po出来吗?
>> 但, /var/mail/USERs 只有原来的 旧的 mail - 这是 原 imap 及 pop3 收信箱.
>> ( user 所找的信箱是 /var/mail/_各USER_ )
>> user 确实可以用 Outlok Express 以 imap 寄信.
>> ~~~
>> 先请再看看 简化後的 /var/maillog
>> MailScanner[528]: MailScanner E-Mail Virus Scanner version 4.43.8
>> starting...
>> sm-mta-in[533]: starting daemon (8.13.4): SMTP
>> sm-mta-out[536]: starting daemon (8.13.4): queueing@00:15:00
>> MailScanner[528]: Read 182 hostnames from the phishing whitelist
>> sm-msp-queue[540]: starting daemon (8.13.4): queueing@00:15:00Aug 3
>> 00:24:10 neuro sm-mta-out[539]: j731mM3M004115: SYSERR(root): Could not
>> connectto socket /var/imap/socket/lmtp: Socket operation on non-socket
>> sm-mta-out[539]: j731mM3M004115: to=user1, delay=05:35:47,
>> xdelay=00:00:00,
>> mailer=cyrusv2, pri=2280000, relay=localhost, dsn=4.4.1, stat=Deferred:
>> Socket operation on non-socket
>> MailScanner[528]: Enabling SpamAssassin auto-whitelist functionality...
>> MailScanner[665]: MailScanner E-Mail Virus Scanner version 4.43.8
>> starting...
>> MailScanner[665]: Read 182 hostnames from the phishing whitelist
>> MailScanner[665]: Enabling SpamAssassin auto-whitelist functionality...
>> MailScanner[528]: ClamAV scanner using unrar command /usr/local/bin/unrar
>> MailScanner[528]: Using locktype = flock
>> 这个也是问题吧:
>> sm-mta-out ... Could not connectto socket /var/imap/socket/lmtp: Socket
>> operation on non-socket
>> sm-mta-out, mailer=cyrusv2, stat=Deferred: Socket operation on non-socket
>> (虽然, server 存信 及 user 收信的目录不同可能才是问题真正所在 ...)
>> ~~