postfix 清除邮件deferred队列(不可到达队列)

本文链接: http://jk.aiwaly.com/wp/postfix-clean-deferred.html

postfix 是一个很强大有电子邮局软件,性能上比sendmail 快3倍,月影鹏鹏最近公司用电子邮件方式进行产品推广活动. 造成邮件服务器磁盘满,  发现是deferred目录不可到达的邮件过多.通过下面的方法可以清除不可到达的邮件队列

清除deferred队列

#cd /var/spool/postfix                         //切换至 Postfix Mail Queued 文件夹
#find defer deferred -type f                   //显示 Postfix Mail Queued 信件
#find defer deferred -type f -delete           //删除 Postfix Mail Queued 信件

删除邮件
#/../postsuper -d 7B94A3A810F
如要删除所有类似的邮件。

#mailq |grep [email protected] | awk ’{print $1}’ | while read a; do /../postfix/sbin/postsuper -d $a; done

deferred邮件路径为/var/spool/postfix/defer/
/var/spool/postfix/deferred/
据说可以直接删除。

启动服务器


[root@sample ~]# /sbin/chkconfig saslauthd on  ← 将SMTP-Auth设置为自启动

[root@sample ~]# /sbin/chkconfig --list saslauthd  ← 确认SMTP-Auth服务状态
saslauthd 0:off 1:off 2:on 3:on 4:on 5:on 6:off  ← 确认2~5为on的状态就OK

[root@sample ~]# /etc/rc.d/init.d/saslauthd start  ← 启动SMTP-Auth

Starting saslauthd:           [ OK ] 

[root@sample ~]# /sbin/chkconfig postfix on  ← 将Postfix设置为自启动 

[root@sample ~]# /sbin/chkconfig --list postfix  ← 确认Postfix服务状态
postfix 0:off 1:off 2:on 3:on 4:on 5:on 6:off  ← 确认2~5为on的状态就OK

[root@sample ~]# /etc/rc.d/init.d/postfix start  ← 启动Postfix

Starting postfix:            [ OK ]

你可能感兴趣的:(活动,服务器,产品,邮件服务器,磁盘)