Clearing Sendmail queue

This one is quite old but still handy. For those of still using sendmail that ever felt the need of flushing the sendmail queue then this post is for you.

If you're worried about sendmail pending mail flush do the following two 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.

3) if you want to delete a certain domain or user or recipient mail 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….

Comments

Popular posts from this blog

configure Netbackup email notification on Unix