维护Postfix的一些脚本、程序集锦
作为一名Postfix的管理员,维护Postfix的正常运行,并随时排除故障,这是最基本的任务。本文提供了一些我自己写及平时搜集到的脚本和程序,以便实现自动化的维护和操作。包括自动清理日志,分析日志,自动增加用户等等。 分析拒收邮件的日志分析程序 作者:Wietse Venema Message 6 in thread 寄件者:Wietse Venema ([email protected]) 主旨:Re: Freebsd Postifx Daily messages View this article only 新闻群组:mailing.postfix.users 日期:2002-12-01 10:48:47 PST Here's my own /etc/periodic/daily/460.status-mail-rejects script, and yes it needs updating when logging formats change. This script will not show rejected mail when the client never returned after a soft (450) error code from the server. I use 450 for non-FQDN HELO hostnames, so that I can whitelist mis-configured sites that aren't spammers. Wietse #!/bin/sh # echo ""; echo "Scanning maillog for rejections:" zcat -fc /var/log/maillog.0* /var/log/maillog | egrep reject: | cut -d : -f 5- | sort | uniq -c | sort -nr | grep -v '^ *[1-2] *[^ ]* [^ ]* from [^ ]*: 450 ' echo ""; echo "Scanning maillog for warnings:" zcat -f...