当前位置: 首页 > 图文教程 > 服务器 > Mail服务器 > 以Procmail-Gateway过滤寄出信件病毒(3)

Mail服务器
用Foxmail Server搭建邮件服务器
在2003下安装WinWebMail详细攻略
巧妙配置Win2003自带mail服务器
用Win 2003架设邮件服务器
用Windows 2003配置邮件服务器
用Imail Server轻松构建局域网邮件服务器
SMTP安全手册—Sendmail服务器安全
十大步骤提高Domino邮件服务器性能
配置Apache James邮件服务器
用Windows 2003系统架设邮件服务器
Linux环境下邮件服务器软件的分析比较
轻松应对邮件服务器攻击

Mail服务器 中的 以Procmail-Gateway过滤寄出信件病毒(3)


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-10-18   浏览: 35 ::
收藏到网摘: n/a

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"$@"