nik600:
> #!/bin/bash
> EX_TEMPFAIL=75
> EX_UNAVAILABLE=69
> 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 the
> correct error code, wright?), is possible to do that?
As documented in the pipe(8) manpage:
DIAGNOSTICS
...
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
later).
So instead of
echo Mailbox is over size limit
Use
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.
Wietse