Need a bit of help with the antispam plugin
Hello Everyone,
I'm running the antispam plugin on Dovecot 2.0.19 on Ubuntu Server 14.04 and I can't seem to get it to work. In the IMAP section of dovecot.conf I have the following lines:
protocol imap { mail_plugins = $mail_plugins imap_quota imap_acl antispam # mail_plugins = $mail_plugins imap_quota imap_acl imap_client_workarounds = tb-extra-mailbox-sep
# Maximum number of IMAP connections allowed for a user from each IP
address. # NOTE: The username is compared case-sensitively. # Default is 10. # Increase it to avoid issue like below: # "Maximum number of concurrent IMAP connections exceeded" mail_max_userip_connections = 20
plugin { antispam_debug_target = syslog antispam_verbose_debug = 1
antispam_backend = pipe antispam_trash = Trash antispam_spam = Junk antispam_pipe_program_spam_arg = --spam antispam_pipe_program_notspam_arg = --ham antispam_pipe_program = /usr/bin/sa-learn antispam_pipe_program_args = --username=%Lu } }
For some reason, when I try to move something to Junk, I get the following in my syslog:
Mar 31 18:27:16 anonymail imap: antispam: plugin initialising (2.0-notgit) Mar 31 18:27:16 anonymail imap: antispam: verbose debug enabled Mar 31 18:27:16 anonymail imap: antispam: "Junk" is exact match spam folder Mar 31 18:27:16 anonymail imap: antispam: no unsure folders Mar 31 18:27:16 anonymail imap: antispam: "Trash" is exact match trash folder Mar 31 18:27:16 anonymail imap: antispam: pipe backend spam argument = --spam Mar 31 18:27:16 anonymail imap: antispam: pipe backend not-spam argument = --ham Mar 31 18:27:16 anonymail imap: antispam: pipe backend program = /usr/bin/sa-learn Mar 31 18:27:16 anonymail imap: antispam: pipe backend program arg[0] = --username=anthony@cajuntechie.org Mar 31 18:27:16 anonymail imap: antispam: pipe backend tmpdir /tmp Mar 31 18:27:19 anonymail imap: antispam: mailbox_is_unsure(Junk): 0 Mar 31 18:27:19 anonymail imap: antispam: mailbox_is_trash(INBOX): 0 Mar 31 18:27:19 anonymail imap: antispam: mailbox_is_trash(Junk): 0 Mar 31 18:27:19 anonymail imap: antispam: mail copy: from trash: 0, to trash: 0 Mar 31 18:27:19 anonymail imap: antispam: mailbox_is_spam(INBOX): 0 Mar 31 18:27:19 anonymail imap: antispam: mailbox_is_spam(Junk): 1 Mar 31 18:27:19 anonymail imap: antispam: mailbox_is_unsure(INBOX): 0 Mar 31 18:27:19 anonymail imap: antispam: mail copy: src spam: 0, dst spam: 1, src unsure: 0 Mar 31 18:27:19 anonymail imap: antispam: running mailtrain backend program /usr/bin/sa-learn Mar 31 18:27:19 anonymail imap: antispam: running mailtrain backend program /usr/bin/sa-learn Mar 31 18:27:19 anonymail imap: antispam: running mailtrain backend program parameter 1 --username=anthony@cajuntechie.org Mar 31 18:27:19 anonymail imap: antispam: running mailtrain backend program parameter 2 --spam Mar 31 18:27:21 anonymail imap: antispam: run program failed with exit code -1
This is probably a permissions issue but I'm not able to debug it. Can anyone offer me any clues as to what I might be doing wrong or how I might fix it?
Thanks, Anthony
-- Anthony Papillion
Phone: 1.918.631.7331 VoIP (SIP): 1259010@localphone.com XMPP Chat: cypher@chat.cpunk.us Fingerprint: 65EF73EC 8B57F6B1 8C475BD4 426088AC FE21B251 PGP Key: http://www.cajuntechie.org/p/my-pgp-key.html
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Tue, 31 Mar 2015, Anthony Papillion wrote:
Date: Tue, 31 Mar 2015 18:37:34 -0500 From: Anthony Papillion anthony@cajuntechie.org To: dovecot@dovecot.org Subject: Need a bit of help with the antispam plugin
Hello Everyone,
I'm running the antispam plugin on Dovecot 2.0.19 on Ubuntu Server 14.04 and I can't seem to get it to work. In the IMAP section of dovecot.conf I have the following lines:
protocol imap { mail_plugins = $mail_plugins imap_quota imap_acl antispam # mail_plugins = $mail_plugins imap_quota imap_acl imap_client_workarounds = tb-extra-mailbox-sep
# Maximum number of IMAP connections allowed for a user from each IP address. # NOTE: The username is compared case-sensitively. # Default is 10. # Increase it to avoid issue like below: # "Maximum number of concurrent IMAP connections exceeded" mail_max_userip_connections = 20
plugin { antispam_debug_target = syslog antispam_verbose_debug = 1
antispam_backend = pipe antispam_trash = Trash antispam_spam = Junk antispam_pipe_program_spam_arg = --spam antispam_pipe_program_notspam_arg = --ham antispam_pipe_program = /usr/bin/sa-learn antispam_pipe_program_args = --username=%Lu } }
replace the value of antispam_pipe_program with a script:
====== #/bin/bash
( set -x id -a date /usr/bin/sa-learn "$@" rc=$? echo rc=$rc exit $rc ) >/tmp/antispam.$$.log 2>&1
Then check on the command line, what happens if you invoke the command line as the user displayed by the id command.
For some reason, when I try to move something to Junk, I get the following in my syslog:
Mar 31 18:27:16 anonymail imap: antispam: plugin initialising (2.0-notgit) Mar 31 18:27:16 anonymail imap: antispam: verbose debug enabled Mar 31 18:27:16 anonymail imap: antispam: "Junk" is exact match spam folder Mar 31 18:27:16 anonymail imap: antispam: no unsure folders Mar 31 18:27:16 anonymail imap: antispam: "Trash" is exact match trash folder Mar 31 18:27:16 anonymail imap: antispam: pipe backend spam argument = --spam Mar 31 18:27:16 anonymail imap: antispam: pipe backend not-spam argument = --ham Mar 31 18:27:16 anonymail imap: antispam: pipe backend program = /usr/bin/sa-learn Mar 31 18:27:16 anonymail imap: antispam: pipe backend program arg[0] = --username=anthony@cajuntechie.org Mar 31 18:27:16 anonymail imap: antispam: pipe backend tmpdir /tmp Mar 31 18:27:19 anonymail imap: antispam: mailbox_is_unsure(Junk): 0 Mar 31 18:27:19 anonymail imap: antispam: mailbox_is_trash(INBOX): 0 Mar 31 18:27:19 anonymail imap: antispam: mailbox_is_trash(Junk): 0 Mar 31 18:27:19 anonymail imap: antispam: mail copy: from trash: 0, to trash: 0 Mar 31 18:27:19 anonymail imap: antispam: mailbox_is_spam(INBOX): 0 Mar 31 18:27:19 anonymail imap: antispam: mailbox_is_spam(Junk): 1 Mar 31 18:27:19 anonymail imap: antispam: mailbox_is_unsure(INBOX): 0 Mar 31 18:27:19 anonymail imap: antispam: mail copy: src spam: 0, dst spam: 1, src unsure: 0 Mar 31 18:27:19 anonymail imap: antispam: running mailtrain backend program /usr/bin/sa-learn Mar 31 18:27:19 anonymail imap: antispam: running mailtrain backend program /usr/bin/sa-learn Mar 31 18:27:19 anonymail imap: antispam: running mailtrain backend program parameter 1 --username=anthony@cajuntechie.org Mar 31 18:27:19 anonymail imap: antispam: running mailtrain backend program parameter 2 --spam Mar 31 18:27:21 anonymail imap: antispam: run program failed with exit code -1
This is probably a permissions issue but I'm not able to debug it. Can anyone offer me any clues as to what I might be doing wrong or how I might fix it?
Thanks, Anthony
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1
iQEVAwUBVSOh1nz1H7kL/d9rAQJpQQf/ZJzphWeULzGdh9OssSdAk6WTfjQU+ITr G3YcACkVo9ZWjxeDtF1epXRv8ZibUk+o8Sfj7lQ7YREkC/Xws2MibJh2iIKoAZY8 ZPxGGO14fOiAqOaMDCtyPVoKY97TdhNoNXXbOReQqyEMgVdAF2mrKN4xwphjGWKB Q5C165UwzphwtnSkWVtMKQvy5o8cQJHltuZa7hyRohsNUwYUu9Qc63qfJf4bxsQH 3O125rfgRX8k6icMb8nmny/g0rWAWhuqVIIgrlS8FE85DuQSlZCcRkSvxn0kHoPy yP3GVdTQcIN8pxTkyHFyFtzwuF60sEOdZcuYHKSdCb4DjWN0Ph3KSw== =IPFw -----END PGP SIGNATURE-----
On 2015/04/07 04:22, Steffen Kaiser wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Tue, 31 Mar 2015, Anthony Papillion wrote:
Date: Tue, 31 Mar 2015 18:37:34 -0500 From: Anthony Papillion anthony@cajuntechie.org To: dovecot@dovecot.org Subject: Need a bit of help with the antispam plugin
Hello Everyone,
I'm running the antispam plugin on Dovecot 2.0.19 on Ubuntu Server 14.04 and I can't seem to get it to work. In the IMAP section of dovecot.conf I have the following lines:
protocol imap { mail_plugins = $mail_plugins imap_quota imap_acl antispam # mail_plugins = $mail_plugins imap_quota imap_acl imap_client_workarounds = tb-extra-mailbox-sep
# Maximum number of IMAP connections allowed for a user from each IP address. # NOTE: The username is compared case-sensitively. # Default is 10. # Increase it to avoid issue like below: # "Maximum number of concurrent IMAP connections exceeded" mail_max_userip_connections = 20
plugin { antispam_debug_target = syslog antispam_verbose_debug = 1
antispam_backend = pipe antispam_trash = Trash antispam_spam = Junk antispam_pipe_program_spam_arg = --spam antispam_pipe_program_notspam_arg = --ham antispam_pipe_program = /usr/bin/sa-learn antispam_pipe_program_args = --username=%Lu } }
replace the value of antispam_pipe_program with a script:
====== #/bin/bash
( set -x id -a date /usr/bin/sa-learn "$@" rc=$? echo rc=$rc exit $rc ) >/tmp/antispam.$$.log 2>&1
Then check on the command line, what happens if you invoke the command line as the user displayed by the id command.
For some reason, when I try to move something to Junk, I get the following in my syslog:
Mar 31 18:27:16 anonymail imap: antispam: plugin initialising (2.0-notgit) Mar 31 18:27:16 anonymail imap: antispam: verbose debug enabled Mar 31 18:27:16 anonymail imap: antispam: "Junk" is exact match spam folder Mar 31 18:27:16 anonymail imap: antispam: no unsure folders Mar 31 18:27:16 anonymail imap: antispam: "Trash" is exact match trash folder Mar 31 18:27:16 anonymail imap: antispam: pipe backend spam argument = --spam Mar 31 18:27:16 anonymail imap: antispam: pipe backend not-spam argument = --ham Mar 31 18:27:16 anonymail imap: antispam: pipe backend program = /usr/bin/sa-learn Mar 31 18:27:16 anonymail imap: antispam: pipe backend program arg[0]
--username=anthony@cajuntechie.org Mar 31 18:27:16 anonymail imap: antispam: pipe backend tmpdir /tmp Mar 31 18:27:19 anonymail imap: antispam: mailbox_is_unsure(Junk): 0 Mar 31 18:27:19 anonymail imap: antispam: mailbox_is_trash(INBOX): 0 Mar 31 18:27:19 anonymail imap: antispam: mailbox_is_trash(Junk): 0 Mar 31 18:27:19 anonymail imap: antispam: mail copy: from trash: 0, to trash: 0 Mar 31 18:27:19 anonymail imap: antispam: mailbox_is_spam(INBOX): 0 Mar 31 18:27:19 anonymail imap: antispam: mailbox_is_spam(Junk): 1 Mar 31 18:27:19 anonymail imap: antispam: mailbox_is_unsure(INBOX): 0 Mar 31 18:27:19 anonymail imap: antispam: mail copy: src spam: 0, dst spam: 1, src unsure: 0 Mar 31 18:27:19 anonymail imap: antispam: running mailtrain backend program /usr/bin/sa-learn Mar 31 18:27:19 anonymail imap: antispam: running mailtrain backend program /usr/bin/sa-learn Mar 31 18:27:19 anonymail imap: antispam: running mailtrain backend program parameter 1 --username=anthony@cajuntechie.org Mar 31 18:27:19 anonymail imap: antispam: running mailtrain backend program parameter 2 --spam Mar 31 18:27:21 anonymail imap: antispam: run program failed with exit code -1
This is probably a permissions issue but I'm not able to debug it. Can anyone offer me any clues as to what I might be doing wrong or how I might fix it?
Thanks, Anthony
I'm having the exact same issue. I applied the change you recommended to Anthony (I.E. create the script and call that rather than sa-learn directly) and I see that the resultant log file in /tmp is never created. Any additional suggestions would be greatly appreciated!
-- John Perry - WX5JP http://www.jpunix.net https://www.digitalocean.com/?refcode=b90b690ca5bb https://lastpass.com/f?3921926
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Tue, 7 Apr 2015, John Perry wrote:
On 2015/04/07 04:22, Steffen Kaiser wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Tue, 31 Mar 2015, Anthony Papillion wrote:
Date: Tue, 31 Mar 2015 18:37:34 -0500 From: Anthony Papillion anthony@cajuntechie.org To: dovecot@dovecot.org Subject: Need a bit of help with the antispam plugin
Hello Everyone,
I'm running the antispam plugin on Dovecot 2.0.19 on Ubuntu Server 14.04 and I can't seem to get it to work. In the IMAP section of dovecot.conf I have the following lines:
protocol imap { mail_plugins = $mail_plugins imap_quota imap_acl antispam # mail_plugins = $mail_plugins imap_quota imap_acl imap_client_workarounds = tb-extra-mailbox-sep
# Maximum number of IMAP connections allowed for a user from each IP address. # NOTE: The username is compared case-sensitively. # Default is 10. # Increase it to avoid issue like below: # "Maximum number of concurrent IMAP connections exceeded" mail_max_userip_connections = 20
plugin { antispam_debug_target = syslog antispam_verbose_debug = 1
antispam_backend = pipe antispam_trash = Trash antispam_spam = Junk antispam_pipe_program_spam_arg = --spam antispam_pipe_program_notspam_arg = --ham antispam_pipe_program = /usr/bin/sa-learn antispam_pipe_program_args = --username=%Lu } }
replace the value of antispam_pipe_program with a script:
====== #/bin/bash
( set -x id -a date /usr/bin/sa-learn "$@" rc=$? echo rc=$rc exit $rc ) >/tmp/antispam.$$.log 2>&1
Then check on the command line, what happens if you invoke the command line as the user displayed by the id command.
For some reason, when I try to move something to Junk, I get the following in my syslog:
Mar 31 18:27:16 anonymail imap: antispam: plugin initialising (2.0-notgit) Mar 31 18:27:16 anonymail imap: antispam: verbose debug enabled Mar 31 18:27:16 anonymail imap: antispam: "Junk" is exact match spam folder Mar 31 18:27:16 anonymail imap: antispam: no unsure folders Mar 31 18:27:16 anonymail imap: antispam: "Trash" is exact match trash folder Mar 31 18:27:16 anonymail imap: antispam: pipe backend spam argument = --spam Mar 31 18:27:16 anonymail imap: antispam: pipe backend not-spam argument = --ham Mar 31 18:27:16 anonymail imap: antispam: pipe backend program = /usr/bin/sa-learn Mar 31 18:27:16 anonymail imap: antispam: pipe backend program arg[0] = --username=anthony@cajuntechie.org Mar 31 18:27:16 anonymail imap: antispam: pipe backend tmpdir /tmp Mar 31 18:27:19 anonymail imap: antispam: mailbox_is_unsure(Junk): 0 Mar 31 18:27:19 anonymail imap: antispam: mailbox_is_trash(INBOX): 0 Mar 31 18:27:19 anonymail imap: antispam: mailbox_is_trash(Junk): 0 Mar 31 18:27:19 anonymail imap: antispam: mail copy: from trash: 0, to trash: 0 Mar 31 18:27:19 anonymail imap: antispam: mailbox_is_spam(INBOX): 0 Mar 31 18:27:19 anonymail imap: antispam: mailbox_is_spam(Junk): 1 Mar 31 18:27:19 anonymail imap: antispam: mailbox_is_unsure(INBOX): 0 Mar 31 18:27:19 anonymail imap: antispam: mail copy: src spam: 0, dst spam: 1, src unsure: 0 Mar 31 18:27:19 anonymail imap: antispam: running mailtrain backend program /usr/bin/sa-learn Mar 31 18:27:19 anonymail imap: antispam: running mailtrain backend program /usr/bin/sa-learn Mar 31 18:27:19 anonymail imap: antispam: running mailtrain backend program parameter 1 --username=anthony@cajuntechie.org Mar 31 18:27:19 anonymail imap: antispam: running mailtrain backend program parameter 2 --spam Mar 31 18:27:21 anonymail imap: antispam: run program failed with exit code -1
This is probably a permissions issue but I'm not able to debug it. Can anyone offer me any clues as to what I might be doing wrong or how I might fix it?
Thanks, Anthony
I'm having the exact same issue. I applied the change you recommended to Anthony (I.E. create the script and call that rather than sa-learn directly) and I see that the resultant log file in /tmp is never created. Any additional suggestions would be greatly appreciated!
Is this script executable for all, e.g.:
chmod a+x /path/to/script
Is the script located in a directory everybody are allowed to execute, e.g. /usr/local/bin or /usr/bin .
Can you run, e.g.:
sudo -u nobody /path/to/script
and something is happening?
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1
iQEVAwUBVSPUWHz1H7kL/d9rAQLtzgf5AUXDxhhQg7EsO5qEaDKgvKBgNt7dWF2Y ui7h1uW47c0bja4E4d89X7oHsZ1HQXvvuobbBlDxIzdhweoK8bISDL7DYSLCLW1s wzf5z4FqFbr6H1bj5oX8/ZgQ3+4ONL9aAmMhHT6JUxPZ98JtPUlm/yzNu2eYfQbG p5Q62RHr/tsNG0jg9AHGEsrbSDpIkrmk3n2qgddwA8dCWcNMjHzDJThgGpKoEEq2 ohvjr6V3TUJcL6BZ/GR0B+2VKaQSdR6FlhhuItZrpbClOeoe1MyOos/p5TLnL+Lp XFm5DAATbQYEEmnaC+1G2dQoFuix+mMXxPq4L1LH/+O8ztGLh8QTdQ== =pLIX -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
On 2015/04/07 07:58, Steffen Kaiser wrote:
Is this script executable for all, e.g.:
chmod a+x /path/to/script
yes. That was the first thing I did.
Is the script located in a directory everybody are allowed to execute, e.g. /usr/local/bin or /usr/bin .
Yes. It is in /usr/bin named antispam.sh
Can you run, e.g.:
sudo -u nobody /path/to/script
and something is happening?
yes. I can execute it as "nobody" and a resultant log file is created. Since it was run with no parameters the log file basically says I need to pass arguments to sa-learn.
Also I'm running iRedMail-0.9.0 and trying to set up the spam filter based on the intructions found on the webpage http://www.iredmail.org/forum/topic8169-iredmail-support-antispam-via-doveco.... I DO see that the MySQL database is being updated when a new message comes in.
John Perry - WX5JP http://www.jpunix.net https://www.digitalocean.com/?refcode=b90b690ca5bb https://lastpass.com/f?3921926
-----BEGIN PGP SIGNATURE-----
iQIcBAEBCAAGBQJVI9frAAoJEIn5ENyiI2/NsW8P/1izBZ+32eIF34TgJZUKReca LzDC6hXya5Gc4PQ/jAN1LyP26/nd6WGqljtK3wj2qRoclp9+7iVNOsxi3zvFIMME orl1u5vAqQPcR9//BLoYxYy5HS0aEZS1YzuH2Mvxs9Dt+Bh+aJjpn5nsRiO32bRG CLviuVddxHwf6DkLbhIp2ybnZCCyTtWZ22NwsAAwRwocGBKi/vpQ83lUB398Ojn9 aVHEnkzd+QbilPcaU5k4SY/evACDnll4a1m9eBZm5VIvGWnDjmVXUSx+iHODol9X obSSFcXPJRMpq7JBdzpnlyP2EJBMjZun52T7oBA+SpoCKamtZaUzW2r9Q3aAgrYr F88K8EAGrRZgMI8cBwfFAntkygu6SCaWVULMqlmTv+XqyMlKWt+HAfc0EiFSJdos lzryDnU64regk3Y3GknOIxVDT7KzrXGP7MwUPHSqbgYxcKGbas70P8Py4aGYexlJ oNEUTBCb+pS4pzmPpu6QCCt7B0hoU7ZNWs8tlOEVZyFN3I+iAElZf939ciF/2o7E d/gLgmKbt0kRz5LPmKFts8Aw0lZshkk1FEoW+/DvGNCzpf4IpYQjvBl2h4rQmtuo jqoycFCHGCw0bXvohe2g4ZoRZmF0EUqWa7hfHbYxNZRpLa/ygEgYnA9CZPps5WXZ UtX9CydP8CwHHQ8JOjOI =rSXU -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
On 04/07/2015 08:14 AM, John Perry wrote:
On 2015/04/07 07:58, Steffen Kaiser wrote:
Is this script executable for all, e.g.:
chmod a+x /path/to/script
yes. That was the first thing I did.
Is the script located in a directory everybody are allowed to execute, e.g. /usr/local/bin or /usr/bin .
Yes. It is in /usr/bin named antispam.sh
Can you run, e.g.:
sudo -u nobody /path/to/script
and something is happening?
yes. I can execute it as "nobody" and a resultant log file is created. Since it was run with no parameters the log file basically says I need to pass arguments to sa-learn.
I can confirm that I'm having the exact same issue. If I run the script manually, I get the 'help file' for sa-learn dumped into the log file. But the file is never created when mail comes in or is processed.
Anthony -----BEGIN PGP SIGNATURE-----
iQIcBAEBCAAGBQJVJEvJAAoJEAKK33RTsEsVaX8P/Alj3RNVQst53zcOxkuBHW0I Ibd399Wxt7DBZYabbPhtR75Rffqa84ROaAfmx+ExibDms8VLxmG3HmrJHL2tUCbI /E4pDS9MyC08akweSRphQHFxhvu9LvKsVsnvGKP2gJ/Z4LDlqJ7KiB4+BPhohXL9 yoZ1zynQ43Ubh5cC/IG+k8zuXfsiUBmLo/8GLDcjs8Pqrx+C6mdpdXj3HWBm26ma 251ZIMAoKk301xSJhy3eZB7uzYPEJm+Lf74jGDrDUTmg+eC2DG/XRITcCSqoo33h NZzL7iyquUPUHG6mEdfOooK15o+j9roV2pQ1bWgKdMNc6+6roWPPZLALighutpBn Wjo72CcK7gL1dRdjDz0Ar2MqIPOoDwygpxOEIlB+//PxNvnOsIsiujMU0U1imTCf R+zHLYwIMTO1UYWbC4OtT+j8drV/mSNS2PCnBi4T8VNoUW/3oOa1TeWfom+VwlBC RfWYvE04cqMbOB1cUJVGx5/o1LFwZde29I56SAYOpHqE+H5BWPRvbLM9W39L01B+ ZgDteFg5VNH2DJF3nJFjj1mX5Llif2ZUoneiELu1bmI+A0Za7dEDje+Xhekf8NEn 4dkH57DhiALynw5dx3GrMhNMUXI2nQYGP/1DFRCvPujsS/H6neT/HtnAyZpflNnI r2WyS7tfbctyEHxaBYXH =yHyk -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Tue, 7 Apr 2015, John Perry wrote:
On 2015/04/07 07:58, Steffen Kaiser wrote:
Is this script executable for all, e.g.:
chmod a+x /path/to/script
yes. That was the first thing I did.
Is the script located in a directory everybody are allowed to execute, e.g. /usr/local/bin or /usr/bin .
Yes. It is in /usr/bin named antispam.sh
Can you run, e.g.:
sudo -u nobody /path/to/script
and something is happening?
yes. I can execute it as "nobody" and a resultant log file is created. Since it was run with no parameters the log file basically says I need to pass arguments to sa-learn.
Also I'm running iRedMail-0.9.0 and trying to set up the spam filter based on the intructions found on the webpage http://www.iredmail.org/forum/topic8169-iredmail-support-antispam-via-doveco.... I DO see that the MySQL database is being updated when a new message comes in.
Do you have SELinux active? See almost at the end of http://wiki2.dovecot.org/WhyDoesItNotWork?highlight=%28selinux%29
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1
iQEVAwUBVSTya3z1H7kL/d9rAQKLDgf/QePW7F6Hy1pZR67SE33LykLPnL3fA4m0 u76fLz0hauGQOHCrdBIjtAtlYO7zxkZdW4Lv8zvnEmhrhZW6subluPliAMIHHutB 06YVU6Hp5aVLoQRY2+LYxU9yjiMFjBFhN3JkOy5mih1H8i3kp4/t91sfEDHzO+3f PJl61eNmhnxKg9AX3sQTAQt7AmdSLsCr4mGarISIcmi4P11wV7i+oWhxLEkW3/KX PM+q8aM7h1VMt+aCFKJ0eTDAtMypIrzauqjb63+T/urJutPHEhi5njxUQ0aKiM01 3j7SeEmwLQWj8YFYQ7MXmfEc9Ye5zVhFOOe0ohiTd3I+ZK59X49ecw== =TO57 -----END PGP SIGNATURE-----
Steffen Kaiser:
On Tue, 7 Apr 2015, John Perry wrote:
On 2015/04/07 07:58, Steffen Kaiser wrote:
Is this script executable for all, e.g.:
chmod a+x /path/to/script
yes. That was the first thing I did.
Is the script located in a directory everybody are allowed to execute, e.g. /usr/local/bin or /usr/bin .
Yes. It is in /usr/bin named antispam.sh
Can you run, e.g.:
sudo -u nobody /path/to/script
and something is happening?
yes. I can execute it as "nobody" and a resultant log file is created. Since it was run with no parameters the log file basically says I need to pass arguments to sa-learn.
Also I'm running iRedMail-0.9.0 and trying to set up the spam filter based on the intructions found on the webpage http://www.iredmail.org/forum/topic8169-iredmail-support-antispam-via-doveco.... I DO see that the MySQL database is being updated when a new message comes in.
Do you have SELinux active? See almost at the end of http://wiki2.dovecot.org/WhyDoesItNotWork?highlight=%28selinux%29
-- Steffen Kaiser
After checking I've determined that SELinux is NOT active.
-- John Perry - WX5JP http://www.jpunix.net https://www.digitalocean.com/?refcode=b90b690ca5bb https://lastpass.com/f?3921926
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Wed, 8 Apr 2015, John Perry wrote:
Steffen Kaiser:
On Tue, 7 Apr 2015, John Perry wrote:
On 2015/04/07 07:58, Steffen Kaiser wrote:
Is this script executable for all, e.g.:
chmod a+x /path/to/script
yes. That was the first thing I did.
Is the script located in a directory everybody are allowed to execute, e.g. /usr/local/bin or /usr/bin .
Yes. It is in /usr/bin named antispam.sh
Can you run, e.g.:
sudo -u nobody /path/to/script
and something is happening?
yes. I can execute it as "nobody" and a resultant log file is created. Since it was run with no parameters the log file basically says I need to pass arguments to sa-learn.
Also I'm running iRedMail-0.9.0 and trying to set up the spam filter based on the intructions found on the webpage http://www.iredmail.org/forum/topic8169-iredmail-support-antispam-via-doveco.... I DO see that the MySQL database is being updated when a new message comes in.
Do you have SELinux active? See almost at the end of http://wiki2.dovecot.org/WhyDoesItNotWork?highlight=%28selinux%29
-- Steffen Kaiser
After checking I've determined that SELinux is NOT active.
Do you run Dovecot in a chroot?
====
OK, "run program failed with exit code" is nowhere in the sources I have for Dovecot v2.2, neither in Dovecot itself, Sieve, nor Antispam. Error -1 is a fairly generic one. Is it possible that for any other reason, Dovecot does not find the specified pipe program?
Can you grab the source of the plugin?
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1
iQEVAwUBVSUQPnz1H7kL/d9rAQKjtAf+Nz7nTY7dvU5vi6WNzpufSGgvtUdmw0Ib EtSMRz1uiMzM9GNc2/q1U8Ti27wBPfv6EadkEDA2IaZeJaFB6ATnb/sa/WpObafT ZVfHvfomkc+VN8NOJgpegZDM/4fChgPGIlzveIiqo9oMQIFEdTcRubl7zynVHSMK zXK1EufFntXnxhceI14K32u5Yv2ohYK+gkpvQjZbSyGGq/a71vOs/3Uehs+iN3eJ lOjlbtGz/rWNbaO7rQLUznWkwWpQTuSGOe6zjxPVrqR23P3eIzBnAq0FMGqCQ23H 5VJ+lsCbAsQtecgxfV1OOPayTJ61j8skWWSVsp9Y55JYinPR1X5Vog== =XE8z -----END PGP SIGNATURE-----
Steffen Kaiser:
Can you grab the source of the plugin?
-- Steffen Kaiser
Do you mean the source for anti-spam?
-- John Perry - WX5JP http://www.jpunix.net https://www.digitalocean.com/?refcode=b90b690ca5bb https://lastpass.com/f?3921926
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Wed, 8 Apr 2015, John Perry wrote:
Steffen Kaiser:
Can you grab the source of the plugin?
Do you mean the source for anti-spam?
Yes.
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1
iQEVAwUBVSUcCXz1H7kL/d9rAQJFLAf9EmGwsO5nO/1rVEbtlnRMgbvij4+PE45g nRJT/KfG3PCdQFsY4yefYCocJZi6rwuA2r76pzn9E61X0g8dVma6k1W+RGs0UImW qsBTRTojjPkHYB0z/loIAcLWDYjE/EuPP3PO7IoAoDXvuUeM6wENCGScEm4Wznn8 HmxYnHmrG5SoDLsIZZ6WlkhLFh0dj5emITrFYEMYwtqHZTTxuySIbdWyHTeERz1D Pa2dx0iRpRsn40yWPuQjkNpwABTp6mZAoq+QEJaqSdvveXipO2EcUF89mcGI9Xkx vlNd8Kq7o/idCm3E+XjT/FPy0SWHqJTFGctZsfDfaWu0sfOq1bPt5A== =fDGf -----END PGP SIGNATURE-----
Steffen Kaiser:
On Wed, 8 Apr 2015, John Perry wrote:
Steffen Kaiser:
Can you grab the source of the plugin?
Do you mean the source for anti-spam?
Yes.
-- Steffen Kaiser
I'll see what I can do... I'm not sure the source is available. It may be tomorrow before I can act on it.
-- John Perry - WX5JP http://www.jpunix.net https://www.digitalocean.com/?refcode=b90b690ca5bb https://lastpass.com/f?3921926
John Perry:
Steffen Kaiser:
On Wed, 8 Apr 2015, John Perry wrote:
Steffen Kaiser:
Can you grab the source of the plugin?
Do you mean the source for anti-spam?
Yes.
-- Steffen Kaiser
I'll see what I can do... I'm not sure the source is available. It may be tomorrow before I can act on it.
I found the developer's page:
http://johannes.sipsolutions.net/Projects/dovecot-antispam
-- John Perry - WX5JP http://www.jpunix.net https://www.digitalocean.com/?refcode=b90b690ca5bb https://lastpass.com/f?3921926
On 4/8/2015 8:18 AM, John Perry wrote:
I found the developer's page:
That project forked, and there are two versions now. They have subtly different configuration parameters, which trips folks up.
See also: http://wiki2.dovecot.org/Plugins/Antispam/
where it mentions:
Introduction
The antispam plugin allows you to retrain the spam filter by simply moving emails in and out of the Spam folder. This is the fork of the analogous plugin for Dovecot versions prior to v2.0. The original project can be found ...
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Wed, 8 Apr 2015, Tom Talpey wrote:
Date: Wed, 08 Apr 2015 09:22:00 -0400 From: Tom Talpey tom@talpey.com To: dovecot@dovecot.org Subject: Re: Need a bit of help with the antispam plugin
On 4/8/2015 8:18 AM, John Perry wrote:
I found the developer's page:
this version 1.99 and 2.0 has "run program failed with exit code" and "running mailtrain backend program", but no "unning mailtrain backend program parameter".
If your package maintainer uses this version as base, it looks like, that forked program crashes, that is WIFEXITED() returns false.
As it happens with the script, too, it sounds like chroot or SELinux problems ;-)
That project forked, and there are two versions now. They have subtly different configuration parameters, which trips folks up.
That's the version I use.
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1
iQEVAwUBVSUtqnz1H7kL/d9rAQJ5Sgf7B2HvKDWvIcO+7WtdpAfeJ64ebbvT/psX vIW3QxeiphKyod6P1qoO1yE1HCc+rkUbg786CZvqxZoNhzBvJxbPqkSRIwN/zAJX ejYCr75m9uvHV/rPbGVswUt8InPYVXvLKjti3x4jRRlG1tpH7T8n/N3d3Ma/CcKn VetLsSgnz84RAY9wYM5l09zsC9edN+dEy392r+qjms3DH7am+EXCsX/jYCS+bs8g aJgwzOFre0T7aNeRPOp4WCBnp32t2LCoYTuPyELKW8TarAEO4wex1H5XXKsoTPES 5jEsa2+0Afp3QB1UV7O2biqq9J+Cplb/kqhM+fx2hVm/23xYOnzLRw== =bjsh -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
Steffen Kaiser:
On Wed, 8 Apr 2015, Tom Talpey wrote:
Date: Wed, 08 Apr 2015 09:22:00 -0400 From: Tom Talpey tom@talpey.com To: dovecot@dovecot.org Subject: Re: Need a bit of help with the antispam plugin
On 4/8/2015 8:18 AM, John Perry wrote:
I found the developer's page:
this version 1.99 and 2.0 has "run program failed with exit code" and "running mailtrain backend program", but no "unning mailtrain backend program parameter".
If your package maintainer uses this version as base, it looks like, that forked program crashes, that is WIFEXITED() returns false.
As it happens with the script, too, it sounds like chroot or SELinux problems ;-)
That project forked, and there are two versions now. They have subtly different configuration parameters, which trips folks up.
That's the version I use.
-- Steffen Kaiser
I'll try the mercurial version later today and see what happens. Thanks!
John Perry - WX5JP http://www.jpunix.net https://www.digitalocean.com/?refcode=b90b690ca5bb https://lastpass.com/f?3921926
-----BEGIN PGP SIGNATURE-----
iQIcBAEBCgAGBQJVJS+YAAoJEIn5ENyiI2/No0cQAMlHN2/bFBDDyrVQkkAVcJww 2K1d7pqr3wvxSkT+SUM+FRjl634ZPvDcihHySh8HTYxVVwE3xMYWi6sG+hQjduLr IuNfdQBoaDGPU+AvhkPa0d44+vqgJ5yJl79u3csMCch5+xqUXp1xJL+bFb3snKFO sks3b2yef97P2k3ep0op6/AacdQf/u1syfUMkF/UMxTKDECs3KKH59e9IrcJSXHF VJbjpmAcxn9Sm7YQkH90GaklEAdm5OWHvLsiEpKdjRfR1BkRdT9rO3qwT6OGTTsu a14S8rNGVwmc9Uy5A4S9glR1lTVJr1ju4LBxWfranXqd1TPwdLtSIPYjug4Qtkkz gGZ7GbJQbKadTJef/pxLi49twR339Qbx85DE4NkVgKocH/Gvy50zNnXADp7BQXwh kGw26tlUhBEik0pqTQlodRhu2BYe8AyAKChsO5w3hoGn/vB07DZQihJFHYrgiq2M Oepe0npaBUOVGimyx9V4nFgwZbydZ/YpR+l/rdgPyMijSMVAoHpSFfP00LYJQQJH OyM1yp/xox4YTorlaNZv5liEsXl0qUUT+VtYEJv2UnNOSGtOQxOKWSV/HuV/0GRn RxJTZ49ciJB8UqZOQ2O8Pi2TPsRqqjA8u+6L7BfaoUG0a4at0dthiRtzYGXefV4k oyyMDDFn+q2Qg3KEaJa5 =gkaH -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Wed, 8 Apr 2015, John Perry wrote:
Steffen Kaiser:
Can you grab the source of the plugin?
Do you mean the source for anti-spam?
Or sent a link into some repository.
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1
iQEVAwUBVSUcKHz1H7kL/d9rAQI6TwgAnlx9NmZlGjS3RytxsismdzcRIjzUHFwt K29nuGzxv9gh0WMbZGyhvoZFPw4VuGnTTDK4iFV4GEM3R/0q1eA0PIpC2VT3Yx7i i9YLRPHrRD1Jwu5wA7Tb2ULbw6zILoQKOaose51RpqVU2gBwnJasP4uCOYh42PL8 /LaADmgpD93RqOGRh6EcA5M3xFo5OQWMVfW1KMAZ2oJJXnyqnnYJzHap4AvOlF5p Yx3QNSt36nf4ke+S+pOu1pyd7eKPFstyyctaiPeAt3kk7nQfMgx7iD1s5grF5iJd FhNLhXBGh0vxt8gflWiWfT1+Fp0kqo4aUab6mGSceQ/LRSWZ+zHl4g== =aHr7 -----END PGP SIGNATURE-----
participants (4)
-
Anthony Papillion
-
John Perry
-
Steffen Kaiser
-
Tom Talpey