A friend's mail system keeps sending emails and keeping a record of them.
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/83/83/wKioL1d02tiTuo5NAAM7cHk3qr8860.png-wh_500x0-wm_3 -wmp_4-s_1360573671.png "title=" 2.png "alt=" Wkiol1d02tituo5naam7chk3qr8860.png-wh_50 "/>
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M01/83/83/wKioL1d03FijKBxhAAGVPlzsspg414.png-wh_500x0-wm_3 -wmp_4-s_867907972.png "title=" 1.png "alt=" Wkiol1d03fijkbxhaagvplzsspg414.png-wh_50 "/>
The idea is to keep sending e-mails ...
Investigation
View logs, up to M-level.
Top view process, there is a management queue process Qmgr occupy a lot of resources, so based on speculation, may be the reason for too many queues.
postfix Delete messages in a queue
Postfix has a set of mail queue management mechanism, all queues of mail can be fully automated processing, but when sending a large number of messages, it is necessary to the queue for manual maintenance processing, for example, delete messages in the queue. Here are some common commands:
List messages that are currently in the mail Queue
Mailq
Delete all messages in the Queue
Postsuper-d All
Remove all messages that are in the deferred queue (delete messages that have failed to send)
Postsuper-d all deferred
Delete all emails that are in the deferred queue (you can see which letters were removed)
Find/var/spool/postfix/deferred-type f-exec RM-VF/{/}/;
Delete messages that you cannot send "three days ago"
Find/var/spool/postfix/deferred-type f-mtime +3-exec rm-f/{/}/;
List all currently unreachable messages Find/var/spool/postfix/deferred-type f-exec ls-l–time-style=+%y-%m-%d_%h:%m:%s {}/;
Delete the NIN record in the "defer" column for more than 5 days find/var/spool/postfix/defer-type f-mtime +5-exec rm-f/{/}/;
Preset all postfix related messages will be placed in the/var/spool/postfix/directory, to understand how Postfix manages the queue, you can refer to Qmgr-postfix Queue Manager's manual.
Here are the uses for each directory
MAIL QUEUES
* Incoming receiving Mailbox
* Active is preparing to send mail
* Defered Unable to send the message, waiting to resend
* Corrupt messages that cannot be read or corrupted
* Hold suspended mail, need to manually start DELIVERY STATUS REPORTS
* Bounce each recipient's message status, records why the return letter is managed by Bounce (8)
* Defer each recipient's delivery status, explaining why the delay is managed by defer (8)
* Trace each recipient's sending status information, stating that the status executed by Postfix with "sendmail-v" or "SENDMAIL-BV" command is managed by Trace (8)
It's normal. The specific cause of the problem, but also continue to troubleshoot.
This article is from the "Ningzhiyuan @it sharing" blog, make sure to keep this source http://renzhiyuan.blog.51cto.com/10433137/1794639
One message queue caused by the tease experience!