emails stuck in maildrop

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

emails stuck in maildrop

Marko Cupać
Hi,

I had misconfigured postfix + amavisd-new combo for a few minutes. At
that time I have recieved a few messages which looped between postfix
and amavisd-new, and are now in maildrop queue.

I have the following messages in maillog:

Sep 11 18:21:07 mx2 postfix/pickup[85251]: C071F61E4F18: uid=125 from=<[hidden email]> orig_id=286AC61E5027
Sep 11 18:21:07 mx2 postfix/cleanup[89279]: warning: C071F61E4F18: message rejected: hopcount exceeded
Sep 11 18:21:07 mx2 postfix/cleanup[89279]: C071F61E4F18: message-id=<[hidden email]>
Sep 11 18:21:07 mx2 postfix/pickup[85251]: warning: maildrop/286AC61E5027: error writing C071F61E4F18: queue file write error

Any chance to resend these messages? Or delete them with NDR? Any other
advice with this?

Thank you in advance,
--
Before enlightenment - chop wood, draw water.
After  enlightenment - chop wood, draw water.

Marko Cupać
https://www.mimar.rs/
Reply | Threaded
Open this post in threaded view
|

Re: emails stuck in maildrop

Viktor Dukhovni


> On Sep 11, 2018, at 12:28 PM, Marko Cupać <[hidden email]> wrote:
>
> I had misconfigured postfix + amavisd-new combo for a few minutes. At
> that time I have recieved a few messages which looped between postfix
> and amavisd-new, and are now in maildrop queue.
>
> I have the following messages in maillog:
>
> Sep 11 18:21:07 mx2 postfix/pickup[85251]: C071F61E4F18: uid=125 from=<[hidden email]> orig_id=286AC61E5027
> Sep 11 18:21:07 mx2 postfix/cleanup[89279]: warning: C071F61E4F18: message rejected: hopcount exceeded
> Sep 11 18:21:07 mx2 postfix/cleanup[89279]: C071F61E4F18: message-id=<[hidden email]>
> Sep 11 18:21:07 mx2 postfix/pickup[85251]: warning: maildrop/286AC61E5027: error writing C071F61E4F18: queue file write error
>
> Any chance to resend these messages? Or delete them with NDR? Any other
> advice with this?

You'd have to trim the message header to drop some of the "Received" headers.

One way to do that is to add header checks to match just the headers added
during the loop, and to raise the maximum hopcount temporarily so that
cleanup will accept the messages, but drop the excess headers to prevent
triggering similar limits downstream.

First test the header checks with:

  # postcat -h -q <queue-id> |
    postmap -h -q - pcre:/path/to/header_checks

Just the unwanted headers should trigger an "IGNORE" action.

This needs to run as "root" or "postfix" to read the queue files.  If you
don't have or use PCRE, use "regexp".

--
--
        Viktor.