8、修改sendmail.cf
vi/etc/sendmail.cf
在檔案最后加上以下的內容:
注意:復制/貼上以下內容有時會因為htmltag的問題造成sendmail服務無法重新啟動,此時可下載完整sendmail.cf范例文件(右鍵/另存目標)至本機再復制/貼上至服務器或上傳至服務器。
以下為引用的內容:
#在M
#####@(#)procmail.m48.11(Berkeley)5/19/1998#####
Mprocmail,P=/usr/bin/procmail,F=DFMSPhnu9,S=11/31,R=21/31,T=DNS/RFC822/X-Unix,
A=procmail-f--Y-m$h$f$u
#(空此行一定要先空tab)
#在mynameforerrormessages設定的后面加上下面兩行
#Avoidhostmaplookupsifaddresshasthispseudo-domainonitCPprocmail
#在Ruleset98后面加上下面設定
#Filterallmailthroughprocmail
#
#Stripthepseudo-domainandcontinue(alreadygonethroughthefilter)
R$*<@$+.procmail>$*$@$1<@$2.>$3
R$*<@$+.procmail.>$*$@$1<@$2.>$3
#
#Nopseudo-domain,sendtofilteringmailer
R$*<@$+.>$*$#procmail$@/etc/procmail/filter.rc$:$1<@$2.procmail>$3
R$*<@$+>$*$#procmail$@/etc/procmail/filter.rc$:$1<@$2.procmail>$3
9、建立過濾檔filter.rc
以下為引用的內容:
vi/etc/procmail/filter.rc
范例文件內容如下:
LOGFILE=/var/log/procmail.log
NL="
"
LOGABSTRACT=no
POISONED_EXECUTABLES=/etc/procmail/poisoned-files
INCLUDERC=/etc/procmail/html-trap.procmail
:0#re-sendthemessage
!-oi-f"$@"
新聞熱點
疑難解答