Wietse Venema:
> Rich Shepard:
> > For the past few days an incoming message rejected by a body_checks rule
> > has been stuck somewhere and prevents the daily logwatch report being mailed
> > to me. No subdirectory in /var/spool/postfix/defer/ or ../deferred/ contains
> > a file and I don't know where to find this so I can remove it. The message
> > follows, with the rule string obfuscated so this message can be sent:
> >
> > 888BE9926E: sender delivery status notification: 25C8B99275
> > 40A9099270: reject: body Mar 3 04:40:03 salmo postfix/cleanup[11578]:
> > 595889929F: reject: body Mar 2 11:14:37 salmo postfix/cleanup[4816]:
> > B52909929A: reject: body browse and edit data features. A f-r-e-e tr-ial
> > version is a from local; from=<[email protected]>: 5.7.1 Rule B118
>
> Is this handled by the pickup daemon? Don't omit critical info.
If this is handled by the pickup daemon, then it is a local submission.
When a local submission is rejected by header/body_checks then
it should be returned to sender, not get stuck in the queue.
The message will get stuck in the queue if you set:
internal_mail_filter_classes=bounce
The bounce will fail with a warning message that says:
Mar 5 13:21:59 bristle postfix/cleanup[2983]: warning: 14F4421727B5: bounce
message failure
And the message will be stuck in the mail queue.
There is a note in the postconf(5) manpage that warns against
setting internal_mail_filter_classes this way.
Wietse
This is what it looks like on a machine that has no external
content filter:
First the local submission is rejected:
Mar 5 13:14:33 host postfix/pickup[2932]: C066321727CD: uid=0
from=<wietse@localhost>
Mar 5 13:14:33 host postfix/cleanup[2936]: C066321727CD: reject: header
Received: by host.example.com (Postfix, from userid 0)??id C066321727CD; Thu,
5 Mar 2015 13:14:33 -0500 (EST) from local; from=<wietse@localhost>
to=<[email protected]>: 5.7.1 message content rejected
Mar 5 13:14:33 host postfix/cleanup[2936]: C066321727CD:
message-id=<[email protected]>
Mar 5 13:14:33 host postfix/cleanup[2936]: C066321727CD:
to=<wietse@localhost>, orig_to=<wietse@localhost>, relay=none, delay=0.05,
delays=0.05/0/0/0, dsn=5.7.1, status=bounced (message content rejected)
Mar 5 13:14:33 host postfix/bounce[2938]: C066321727CD: sender non-delivery
notification: CC57A21727CF
And this is the bounce message:
Mar 5 13:14:33 host postfix/cleanup[2939]: CC57A21727CF:
message-id=<[email protected]>
Mar 5 13:14:33 host postfix/qmgr[2931]: CC57A21727CF: from=<>, size=2254,
nrcpt=1 (queue active)
Mar 5 13:14:33 host postfix/local[2940]: CC57A21727CF: to=<wietse@localhost>,
relay=local, delay=0.02, delays=0.01/0.01/0/0, dsn=2.0.0, status=sent
(delivered to mailbox)
Mar 5 13:14:33 host postfix/qmgr[2931]: CC57A21727CF: removed
After this, the message is no longer in the mail queue.