Re: custom content_filter script: set a specific error code and reject the message
> echo Mailbox is over size limit; exit $EX_UNAVAILABLE;
> I only want to change the error-code to 552 5.2.2 (this should be theAs documented in the pipe(8) manpage:
> correct error code, wright?), is possible to do that?
In the case of a non-zero exit status, a limited amount of command out-
put is reported in an delivery status notification. When the output
begins with a 4.X.X or 5.X.X enhanced status code, the status code
takes precedence over the non-zero exit status (Postfix version 2.3 and
So instead of
echo Mailbox is over size limit
echo 5.2.2 Mailbox is over size limit
This status code is defined in RFC 3463:
X.2.2 Mailbox full
The mailbox is full because the user has exceeded a per-mailbox
administrative quota or physical capacity. The general
semantics implies that the recipient can delete messages to
make more space available. This code should be used as a
persistent transient failure.
These codes have *nothing to do with SMTP* so dont' use the
three-digit SMTP reply code here.