postfix daily maintenance queue management [mail server maintenance]

The example text postfix has four different mail queues, which are managed by the queue management process:

  1. maildrop: The local mail is placed in the maildrop and is also copied to the incoming.

  2. incoming: put messages that are arriving or have not yet been discovered by the queue management process.

  3. active: put the message that the queue management process has opened and is about to deliver, the queue has a
  length limit.

  4. deferred: place mail that cannot be delivered.

Postfix daily maintenance
start postfix
postfix start
stop postfix
postfix stop
Re-read the postfix configuration file
postfix reload
deliver all the mail in the queue immediately (use with caution)
postfix flush
view the queue mail
postqueue -p
mailq
postqueue -p |tail
Use postsuper to maintain the queue.
Generally, first use mailq to check the mail in the queue, find the corresponding id, and then use postsuper -d to delete it.
For example id is 0EAF3A9B then postsuper -d 0EAF3A9B

Q: delete mail queue
A: mailq | tail +2 | awk 'BEGIN { RS = "" } / chen@example\.org$/ { print $1 }' | tr -d '*!' | postsuper -d -

see mailq and postsuper for details Usage fix queue and any permission errors
postfix check
check mail system log
tail -f /var/log/maillog 


show list of letters: postqueue -p
show letter content: postcat -q Queue_ID
delete individual letters: postsuper -d Queue_ID
delete all: postsuper -d ALL
hold mail: postsuper -h Queue_ID
reply: postsuper -H Queue_ID
reschedule:
postsuper -r Queue_ID
postsuper -r ALL
clear mail:
postqueue -f (all)
postqueue -s hostname (individual object)
to view The current main configuration file storage path of Postfix:
postconf -n

System log: tail -f /var/log/messages
Mail log: tail -f /var/log/maillog
clamd related: tail -f /var/log/clamav/clamd.log tail -f /var/log/clamav/freshclam.log
maildrop related: tail -f /var/log/maildrop.log
apache related: tail -f / usr/local/httpd/logs/error_log tail -f /usr/local/httpd/logs/suexec_log
mysql related: tail -f /usr/local/mysql/data/linux.linux.com.err
test amavisd: amavisd -d config debug-sa
test spam: spamassassin -D --lint
test maildrop: maildrop -V 10 [email protected]

postsuper -d ALL This will delete all mail

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326655157&siteId=291194637