8、修改sendmail.cf
vi /etc/sendmail.cf
在档案最后加上以下的内容:
注意:复制/贴上以下内容有时会因为html tag的问题造成sendmail服务无法重新启动
,此时可下载完整sendmail.cf范例文件 (右键/另存目标)至本机再复制/贴上至
服务器或上传至
服务器。 #在M
##### @(#)procmail.m4 8.11 (Berkeley) 5/19/1998 #####
Mprocmail, P=/usr/bin/procmail, F=DFMhnu9, S=11/31, R=21/31, T=D/RFC822/X-Unix,
A=procmail -f- -Y -m $h $f $u
# (空此行一定要先空tab)
# 在my name for error meages设定的后面加上下面两行
# Avoid host map looku if addre has this eudo-domain on it Crocmail
# 在Ruleset 98后面加上下面设定
# Filter all mail through procmail
#
# Strip the eudo-domain and continue (already gone through the filter)
R$*<@$+.procmail>#36;* $@ $1<@$2.>#36;3
R$*<@$+.procmail.>#36;* $@ $1<@$2.>#36;3
#
# No eudo-domain, send to filtering mailer
R$*<@$+.>#36;* $#procmail $@/etc/procmail/filter.rc $:$1<@$2.procmail>#36;3
R$*<@$+>#36;* $#procmail $@/etc/procmail/filter.rc $:$1<@$2.procmail>#36;3
9、建立过滤档filter.rc
vi /etc/procmail/filter.rc
范例文件内容如下:
LOGFILE=/var/log/procmail.log
NL="
"
LOGATRACT=no
POISONED_EXECUTABLES=/etc/procmail/poisoned-files
INCLUDERC=/etc/procmail/html-trap.procmail
:0 # re-send the meage
! -oi -f "$@"