PDA

View Full Version : Deleting Mails From From Mail Queue


lano
19th January 2008, 14:09
I'm trying to delete mail by instructions posted here: here (http://www.howtoforge.com/delete-mails-to-or-from-a-specific-email-address-from-postfix-mail-queue)
I get message:
tail: Warning: "+number" syntax is deprecated, please use "-n +number"

OS is Etch

falko
20th January 2008, 20:19
Try
mailq | tail -n +2 | awk 'BEGIN { RS = "" } / falko@example\.com$/ { print $1 }' | tr -d '*!' | postsuper -d -
then.

lano
20th January 2008, 20:31
I didn't get error, but mail queue also wasn't deleted.
postqueue -p shows, that the senders address is www-data@myhost.example.com (3 queues).
Any other idea? :)

David

falko
21st January 2008, 19:43
Did you use the following command?

mailq | tail -n +2 | awk 'BEGIN { RS = "" } / www-data@myhost\.example\.com$/ { print $1 }' | tr -d '*!' | postsuper -d -

lano
26th January 2008, 21:43
That worked.
Thanks again, Falko.

David