Free Hosting Tutorials

Free Hosting Tutorials

In linux operating system,the send mail queue can be cleared by the following ways,

Method 1 : Deleting manually

delete /var/spool/mail/*.* files in this dir –> delete /var/mqueue/*.* files all mail will be deleted.

using mailq command, confirm whether all the mails are deleted or not from the queue

Method 2 : From  command

using simple command sendmail -v -q in root prompt.
it will delete all pending mails from the queue. you can also confirm by running mailq command on command promt

If you are interested in clearing a mail queue for a  particular domain or user  mail,

use this command

sendmail -qS -v test.com

– deletes all mail from *@test.com

sendmail -qR -v hotmail.com

– deletes all mail from recepient of hotmail

  • Most Popular Tutorials