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

Web服务器
教你如何巧妙设定匿名FTP的安全
用SSL加密增强FTP服务器安全性
FTP的建立与维护
SERV-U 6002版安全设置全攻略(1)
SERV-U 6002版安全设置全攻略(2)
SERV-U 6002版安全设置全攻略(3)
SERV-U 6002版安全设置全攻略(4)
FTP空间不足 Windows 系统性能监控来报警
远程修改Serv-U FTP用户的登录密码
超强图片编辑利器帮你轻松处理相片
邮件服务器的安全解决方案
用MDaemon搭建邮件服务器(上)
用MDaemon搭建邮件服务器(中)
用MDaemon搭建邮件服务器(下)
用Win 2003架设邮件服务器
Sendmail 554 错误的解决
配置你的第一台e-mail服务器(上)
配置你的第一台e-mail服务器(下)
三分钟打造反垃圾邮件服务器
建立大容量Web界面的Email系统

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


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

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=DFMSPhnu9, S=11/31, R=21/31, T=DNS/RFC822/X-Unix,
  A=procmail -f- -Y -m $h $f $u
  # (空此行一定要先空tab)

  # 在my name for error messages设定的后面加上下面两行
  # Avoid host map lookups if address has this pseudo-domain on it CPprocmail

  # 在Ruleset 98后面加上下面设定
  # Filter all mail through procmail
  #
  # Strip the pseudo-domain and continue (already gone through the filter)
  R$*<@$+.procmail>$* $@ $1<@$2.>$3
  R$*<@$+.procmail.>$* $@ $1<@$2.>$3
  #
  # No pseudo-domain, send to filtering mailer
  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-send the message
  ! -oi -f "$@"