[Dovecot] Calling dovecot-lda from within Antispam pipe script (bash) seems to have no effect

Ben Johnson ben at indietorrent.org
Thu Jun 20 19:33:25 EEST 2013


It really boils-down to the fact that I can call the following on the
command-line and it functions as expected:

su vmail -c '/usr/lib/dovecot/deliver -a "sa-training at example.com" -d
"sa-training at example.com" -m "Training.SPAM" -p
"/tmp/sendmail-msg-25794.txt"'

Yet, when I attempt to do the exact same thing from within the pipe
script that Dovecot Antispam calls, I receive exit code 75 from
deliver/dovecot-lda and absolutely nothing is logged, with exception of
the information of which I'm already aware (logged to syslog).

I am echo-ing $(whoami) just before calling "deliver" within the pipe
script and the output is "vmail". So, it's not as though the vmail user
somehow lacks the permissions required to send via dovecot-lda.

What is the explanation for this behavior? It has to be something to do
with how the plug-in calls the script. Does the plug-in call the script
in some other context, like chroot?

As a final point of note, is it just me, or is the "90-plugin.conf"
snippet incorrect at the bottom of
http://wiki2.dovecot.org/Plugins/Antispam ? Those values appear to be
for the analogous Dovecot 1 plug-in, e.g., "antispam_mail_sendmail" is
used, when the equivalent directive is called "antispam_pipe_program" in
versions >= 2.0.

-Ben


More information about the dovecot mailing list