Ben Johnson
2014-Aug-07 15:04 UTC
Exit status code 134; what is it, in the context of Dovecot Antispam plug-in?
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
Steffen Kaiser
2014-Aug-07 15:14 UTC
Exit status code 134; what is it, in the context of Dovecot Antispam plug-in?
-----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-----
Jochen Bern
2014-Aug-08 09:07 UTC
Exit status code 134; what is it, in the context of Dovecot Antispam plug-in?
On -10.01.-28163 20:59, Ben Johnson wrote:> 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".FWIW, if a problem with identities and permissions is still a possibility, you should have a look at primary and secondary groups (e.g., output of "id" command) as well. And maybe also the data reported by "umask", "secon --self", ... Regards, J. Bern -- *NEU* - NEC IT-Infrastruktur-Produkte im <http://www.linworks-shop.de/>: Server--Storage--Virtualisierung--Management SW--Passion for Performance Jochen Bern, Systemingenieur --- LINworks GmbH <http://www.LINworks.de/> Postfach 100121, 64201 Darmstadt | Robert-Koch-Str. 9, 64331 Weiterstadt PGP (1024D/4096g) FP = D18B 41B1 16C0 11BA 7F8C DCF7 E1D5 FAF4 444E 1C27 Tel. +49 6151 9067-231, Zentr. -0, Fax -299 - Amtsg. Darmstadt HRB 85202 Unternehmenssitz Weiterstadt, Gesch?ftsf?hrer Metin Dogan, Oliver Michel
Possibly Parallel Threads
- Backtrace io_add(0x1) called twice fd= (was Exit status code 134; what is it, in the context of Dovecot Antispam plug-in?)
- dovecot/auth killed with signal 6
- Strange Dovecot 2.0.20 auth chokes and cores
- director stuck in inifite loop on 2.2.35
- Dovecot v2.2.25 crashed on startup in Mac OSX