问题
I need to delete mails from my centos mailing queue.I'm using sendMail as MTA. I used the following command which I found by searching: cd /var/spool/mail rm -f *
But nothing happened to my mailing queue. And one more thing that if I want to delete mails by subject wise.
回答1:
I didn't have /var/spool/mqueue either.
To remove the mailq in centos if you are using postfix
rm -rf /var/spool/postfix/defer/*
rm -rf /var/spool/postfix/deferred/*
回答2:
This may help:
postsuper -d ALL deferred
To delete matching expressions in email, check this script: http://www.cyberciti.biz/tips/howto-postfix-flush-mail-queue.html
回答3:
You have removed the wrong folder. You should remove /var/spool/mqueue/ to flush your mail queue
回答4:
Sorry to be a little bit late, but what about
mailq
to get the message-id and
sendmail -Mrm <message-id>
to remove the message from the queue without further notice?
回答5:
Use
postsuper -d ALL
to remove all mails from queue But use only if you know that emails are spam.
来源:https://stackoverflow.com/questions/17897998/delete-mails-from-send-mail-mailing-queue