> 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: C071F61E4F18: uid=125 from=<[hidden email]> orig_id=286AC61E5027
> Sep 11 18:21:07 mx2 postfix/cleanup: warning: C071F61E4F18: message rejected: hopcount exceeded
> Sep 11 18:21:07 mx2 postfix/cleanup: C071F61E4F18: message-id=<[hidden email]>
> Sep 11 18:21:07 mx2 postfix/pickup: 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.