Exit status code 134; what is it, in the context of Dovecot Antispam plug-in?

Ben Johnson ben at indietorrent.org
Thu Aug 7 15:04:22 UTC 2014


On 7/29/2014 11:20 AM, Ben Johnson wrote:
> On 7/29/2014 3:13 AM, Steffen Kaiser wrote:
>> On Mon, 28 Jul 2014, Ben Johnson wrote:
>>
>>> I have some debugging output in my pipe script; the output looks
>>
>> How does your script looks like?
>>
> 
> http://pastebin.com/nh8SwQtw
> 
>>> Copying message contents to temporary file for debugging 
>>> purposes; file is: /tmp/sendmail-msg-7662.txt Checking if the 
>>> command-line input argument string (--spam) contains the string 
>>> "ham" or "spam" Mode is "SPAM" Calling (as user vmail) 
>>> '/usr/lib/dovecot/deliver -d "sa-training at example.com" -m 
>>> "Training.SPAM" -p "/tmp/sendmail-msg-7662.txt"' Exit status was 
>>> 134
>>
>> Check out your local /usr/include/sysexits.h, if the exit code is 
>> defined there. It's not in mine.
>>
> 
> Exit code 134 is not defined in /usr/include/sysexits.h on my system.
> 
>>> Yet, I'm able to copy the above command and execute it manually, 
>>> via the command-line, and it works (and by "works", I mean to
>>> say that the behavior is correct and exactly as expected; I
>>> receive the "Spam" email at the designated mailbox). Here's how
>>> I'm calling it when it works perfectly well (as "root"):
>>
>>> # su -c '/usr/lib/dovecot/deliver -d "sa-training at example.com" -m
>>> "Training.HAM" -p "/tmp/sendmail-msg-7460.txt"' vmail
>>
>>> Any idea what status 134 might be or how to work around it? It 
>>> looks to be some kind of "temporary failure exception", but that 
>>> is less than informative in this context.
>>
>>> # 2.2.9: /etc/dovecot/dovecot.conf # OS: Linux 3.13.0-32-generic 
>>> x86_64 Ubuntu 14.04.1 LTS plugin { antispam_backend = pipe 
>>> antispam_debug_target = syslog antispam_pipe_program = /bin/bash
>>>  antispam_pipe_program_args = /usr/local/bin/sa-learn-pipe.sh 
>>> antispam_pipe_program_notspam_arg = --ham 
>>> antispam_pipe_program_spam_arg = --spam antispam_pipe_tmpdir = 
>>> /tmp antispam_spam_pattern_ignorecase = SPAM;JUNK 
>>> antispam_trash_pattern_ignorecase = trash;Deleted * 
>>> antispam_verbose_debug = 1 }
>>
>>
>> -- Steffen Kaiser
> 
> Is it possible that this is some kind of apparmor restriction? I ask
> because apparmor is indeed installed on this machine.
> 
> If you examine the script source (cited above), you will see that I've
> had to use "the hammer that is strace" to debug issues with Dovecot +
> Antispam before... maybe it's worth trying in this case.
> 
> Happy to hear any further suggestions.
> 
> Thanks again,
> 
> -Ben
> 

Still struggling with this. strace doesn't reveal anything useful, either.

In short, dovecot deliver is returning with exit code 134 when I try to
execute the following command in the context of my dovecot-antispam pipe
script:

/usr/lib/dovecot/deliver -d "sa-training at example.com" -m
"Training.HAM" -p "/tmp/sendmail-msg-7460.txt"' vmail

Yet, if I execute the same exact command after su-ing to the vmail user,
it works:

# su vmail
$ whoami
vmail
$ /usr/lib/dovecot/deliver -d "sa-training at example.com" -m
"Training.HAM" -p "/tmp/sendmail-msg-7460.txt"

I have ensured that the pipe script is, in fact, being executed as the
vmail user, by inserting the following into my debug output:

CURRENT_USER=$(whoami)
echo "$CURRENT_USER"

This outputs "vmail".

I have this working with exactly the same setup (near as I can tell) on
a machine with Dovevot 2.0.19 (via Ubuntu 12.04 LTS). This problem
machine is running 2.2.9 (via Ubuntu 14.04 LTS). My "doveconf -n" output
is at the bottom of my original post.

I would love to figure this out; it will be the capstone on an otherwise
perfect build. :)

Thanks for any ideas!

-Ben


More information about the dovecot mailing list