LDA input validation
Joseph Tam
jtam.home at gmail.com
Fri Jan 23 22:52:58 UTC 2015
St?phane Cottin writes:
> A typical .qmail file :
>
> | /usr/bin/dspam --client --deliver=stdout --user "$EXT@$USER" | /usr/bin/preline -f /usr/lib/dovecot/dovecot-lda -d "$EXT@$USER" -a "$EXT@$USER" -m "$EXT2"
>
> When dspam segfault or is killed, preline receive an empty content and
> only pass to dovecot-lda two headers ( Return-Path and Delivered-To ).
> Then dovecot-lda delivers successfully and the original message
> contents are lost.
Steffen Kaiser rightly points out:
> That's the problem of the used Unix pipe and broken by design. The right
> member of the pipe (preline) runs independendly of dspam and recieves no
> content via pipe. Why should preline or dovecot-lda believe there is an
> error? [... and suggests a wrapper script that aborts delivery on empty
> dspam output.]
I'm not sure if it's appropriate under your circumstances, but you can also
pass stderr to stdout as well, and the recipient will get some diagnostic
message, which may or may not be helpful.
| /usr/bin/dspam --client --deliver=stdout --user "$EXT@$USER" 2>&1 | ...
Joseph Tam <jtam.home at gmail.com>
More information about the dovecot
mailing list