Monday, November 28, 2011

How to clear sendmail queue

If you ever felt the need of flushing the sendmail queue then this post will be handy to you.
How to flush sendmail queue under linux sendmail mailq command in linux how to flush mail queue in sendmail under linux
If u r worried about sendmail pending mail flush do the following 2 things.
1) manually method –> delete /var/spool/mail/*.* files in this dir –> delete /var/mqueue/*.* files
then check if all mail gone using mailq command. all mail will be deleted.
2) using command:
use simple command sendmail -v -q in root prompt. it will flush all pending mails. rest to confirm u can run mailq command if all are really gone !!….
3) if u want perticular domain or user or recepitience mail to delete use this command
sendmail -qS -v test.com it will delete all mail from *@test.com
sendmail -qR -v hotmail.com it will delete all mail from recepient of hotmail….
Cheers!!

No comments:

Post a Comment