OpenSUSE Linux Rants

OpenSUSE Linux Tips, tricks, how-tos, opinions, and news

My Resume  -  My LinkedIn Profile

October 2, 2007

Delete all Messages From Your Postfix Queue

by @ 4:24 pm. Filed under How-To, Linux tips

Time for a quick tip regarding Postfix. It beats Exchange, hands-down.

OK, that’s not really my tip (unless you didn’t already know that).

I use Postfix. I host a family mailing list on my server. My parents’ siblings love to send large amounts of email messages with large attachments to said family mailing list. This caused my server much headache today.

Basically, all I had to do was delete the messages from the Postfix queue and I was all good.

If you ever have this need, the simple command:

postsuper -d ALL

will delete all the messages from the queue. Yes, this is a little brutal, so if you want to delete only certain kinds of messages, read the man page and it will explain everything to you.

So there’s my tip of the day.

7 Responses to “Delete all Messages From Your Postfix Queue”

  1. Josef Assad Says:

    I’m curious what caused postfix to accept the message into its queue and then throw a fit when it came to delivering. I’m assuming that’s why you zapped the mail queue?

  2. Lonnie Olson Says:

    I highly suggest you don’t use the term flush for that action. Postfix, and most other MTAs, use that term to refer to attempting to deliver all queued mail. See `man postqueue` especially the -f option.

    The action you are referring to is *deleting* the mail queue, not flushing.

    Also, a restart of postfix is unnecessary because postsuper communicates to the queue manager during the delete.

  3. Scott Morris Says:

    Josef,
    It was clogging my pipe. I don’t have a super-wide pipe, and so many chain-letter messages with huge videos attached to them just destroyed my connection. Thanks for stopping by.

  4. Scott Morris Says:

    Lonnie,
    Great catch, man. You are right on. I, in fact, deleted the messages in the mail queue. I have edited the post to show the correction. The restart was not because of the deletion, but because I had shut it down to find the problem. I totally agree that the restart would not be necessitated by the deletion. Thanks for stopping by.

  5. Josef Assad Says:

    Yes, like Lonnie my first thought was “em, flush?” man postsuper 🙂

    Scott, how about you enrich teh intarwebs with a clever solution for throttling postfix mail delivery then? Maybe Uncle $FOO will be happy your family can finally see the Kitty Cat Dance!

    man tc maybe?

  6. martijn Says:

    I find pfdel.pl (http://www.seaglass.com/postfix/pfdel.pl) come in handy once in a while. It lets you delete messages from the postfix queue by emailaddress, even with wildcards.

  7. sentono Says:

    is it different with postfix flush ?

OpenSUSE Linux Rants
Official OpenSUSE Linux Site

internal links:

categories:

SUSE Resources

search blog:

archives:

March 2022
S M T W T F S
« Feb    
 12345
6789101112
13141516171819
20212223242526
2728293031  

59 queries. 0.698 seconds