RSS

  • YouTube
  • LinkedIn
  • Google

How to clear deferred messages from Postfix Queue

Compartilhe em suas mídias sociais
  •  
  •  
  •  
  •  
  •  
  •  
  •  

Today I was watching the log file from Postfix (in CentOS 6.X default is /var/log/maillog) and saw a lot of messages being deferred.

and these messages did repeat from time to time.

This was because I was setting up the mail server to relay messages from a specific account to a Gmail account and some messages that should have been blocked were eventually delivered. When finally finished reconfiguring all, Postfix could no longer deliver these messages because of a domain check rule the sender and always marked this message as deferred.
Here, the message is the least important thing. What I needed was for these lines vanished from logs.
So here’s a tip to get clean prey message queues and that goes for any reason.

To see what do you have in your mail queue type:

# mailq or # postqueue -p

You see results like that:

Every line is a message in queue. The first block is the Queue Id.

To remove one message from Queue type:

This will delete the message 849F02180010 from Queue.

Other useful commands:

# postfix flush or # postfix -f

Flush all messages from Postfix Queue.

# postsuper -d ALL

Remove all messages from queue.

# postsuper -d ALL deferred

Remove all deferred messages from queue.


Compartilhe em suas mídias sociais
  •  
  •  
  •  
  •  
  •  
  •  
  •  

Leave a Reply

Your email address will not be published. Required fields are marked *