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

Steffen Kaiser skdovecot at smail.inf.fh-brs.de
Thu Aug 7 15:14:41 UTC 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 7 Aug 2014, Ben Johnson wrote:
> 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.

Well, of course apparmor can interject with any operation. You ought to 
see that in the apparmor logs. I do not have no experience with it though.

>> 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.
>>
> 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!

one idea: http://www.tldp.org/LDP/abs/html/exitcodes.html

exit code 134 would be in bash's meaning (if this website is correct all) 
some program died off signal 6. This would be Abort in Linux.

prepend your script with

exec >> /tmp/trace 2>&1
set -vx

that will dump anything visible into /tmp/trace

- -- 
Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQEVAwUBU+OX4Xz1H7kL/d9rAQKMywgAmXzynP+lVcPhKfrQ+O3gih98+6C50lD5
g1jmKuGuiiPxBruD1Z4M9tCajN0t4bBBXQKUdvyNedms+iIi94sTEmC14DUq//+g
M/Fu/0FL2RZxS3NaaYcR5vz3jrHcGDBKewffbWauRHMF0PIy4IOCTeTwSvjAFleb
dBI51KhHWDqYw7T4ZGAAgZlp2ympG1PA2NU0YaSy87oa2WGoIii7F8AgvSaze/0j
kwZZKfg35C5/zrWyRixSompjUJzUAaKc4TmWxggjejGv+yiJHxiTFgpCwBsci2XA
KHfSOzAyezfvXTS1ZdC+yXYuqUAERZj6ArtHKmsu/aSCDg9T9w4ZVw==
=6cGs
-----END PGP SIGNATURE-----


More information about the dovecot mailing list