Delete mails from send mail mailing queue
14,676
Solution 1
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
Solution 2
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/*
Solution 3
You have removed the wrong folder. You should remove /var/spool/mqueue/ to flush your mail queue
Solution 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?
Author by
Somesh
Updated on June 04, 2022Comments
-
Somesh over 1 year
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.
-
oralunal almost 10 yearsYes, I have got the same problem and there is no directory named mqueue
-
Pavel Evstigneev over 9 yearsI also don't have it. So "postsuper -d ALL" helped
-
brass almost 8 yearsworked for me, on CentOS Linux release 7.1.1503 (Core)
-
Luke Madhanga over 3 yearsPerfect for if you just want to delete one mail