Delete mails from send mail mailing queue

夙愿已清 提交于 2020-04-30 07:31:08

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!