Monday 27 September 2010

How to clear sendmail queue

If you are using Linux operating system, you can clear the sendmail queue by the following ways -

1. manually: delete /var/spool/mail/*.* files in this dir –> delete /var/mqueue/*.* files all mail will be deleted. then, using mailq command, confirm whether all the mails are cleared

2. using command: use simple command sendmail -v -q in root prompt. it will clear all pending mails. you can also confirm by running mailq command

If you are interested in deleting particular domain or user or recepitience 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

No comments:

Post a Comment