以Procmail-Gateway过滤寄出信件病毒(2)

6、确定档案权限

  touch /var/log/procmail.log <–档案不存在时才touch
  chmod 644 /var/log/procmail.log
  touch /var/spool/mail/quarantine <–档案不存在时才touch
  chmod 644 /var/spool/mail/quarantine
  touch /var/log/scores <–档案不存在时才touch
  chmod 644 /var/log/scores 

  7、修改procmailrc

  vi /etc/procmailrc
  范例文件如下:
  MAILDIR=/var/mail
  VERBOSE=off
  PATH=”/usr/bin:$PATH:/usr/local/bin”

  #Nimda Virus
  :0 Bh
  * ^Content-Type: audio/x-wav;
  * name=”readme.exe”
  /dev/null


  SHELL=/bin/sh
  POISONED_EXECUTABLES=/etc/procmail/poisoned-files
  #寄信通知系统管理者,若需更多人请在postmaster后加逗点再输入email即可
  SECURITY_NOTIFY=”postmaster”
  #系统通知讯息发布人
  SECURITY_NOTIFY_VERBOSE=”postmaster”
  #寄信通知寄件人
  SECURITY_NOTIFY_SENDER=YES
  #寄信通知寄件人讯息内容
  SECURITY_NOTIFY_SENDER=”/etc/procmail/policy.txt”
  #寄信通知给收件人的讯息内容
  SECURITY_NOTIFY_RECIPIENT=”/etc/procmail/quarantined.txt”
  #可放20字长度以下字符随机数值,增加安全性
  SECRET=”sfd9734965q34o2ldgbl”
  #检疫隔离信件文件位置
  SECURITY_QUARANTINE=/var/spool/mail/quarantine
  #宏病毒扫描积分门坎,一般而言,中毒信件得分通常都会超过100分
  POISONED_SCORE=100
  #宏病毒扫描日志文件位置
  SCORE_HISTORY=/var/log/scores
  LOGFILE=/var/log/procmail.log
  INCLUDERC=/etc/procmail/html-trap.procmail