TL;DR: programs that receive email from the Postfix pipe daemon
should not produce large amounts of output.

When Postfix logs output from a pipe-to-command delivery, there are
three output limits in effect:

- The capacity of a UNIX pipe. The pipe daemon does not read any
command output until AFTER it has written the entire email message
to the command. That is one reason why the command should not produce
lots of output. The number is platform dependent. It is not PIPE_BUF
- that is an entirely different thing, concerned with atmoic writes.

- The amount of command output that the pipe daemon will read before
it closes the pipe. That's 4096 bytes, the Postfix internal buffer
size. A program that tries to write more than that may experience
a write error.

- The size of logging output. Postfix limits the size to 2000 bytes.

As for status 120, see https://bugs.python.org/issue5319, it appears
to be related to stdout write errors in Python 3.6 and later.

        Wietse

Reply via email to