[Dovecot] Antispam plugin problem (CRM114)
Hi to all, sorry in advance for my poor english, this is the first time that i wrote to a list if i make mistake .... excuseme. My problem is this: i have dovecot 2.1.8 installed and functioning from 2 years one week ago i have installed crm114 for my last spam detection filter "version 20100106-BlameMichelson (TRE 0.8.0 (BSD))" My mail system is qmail that through .qmail default correctly tag with X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-27CA1CFB X-CRM114-CacheID: sfid-20120927_105129_798028_B0035817 X-CRM114-Status: GOOD ( 28.64 ) headers
dovecot.conf is as follow:
plugin { . . . antispam_signature = X-CRM114-CacheID antispam_verbose_debug = 1 antispam_debug_target = stderr antispam_backend = crm114 antispam_signature_missing = error antispam_trash = Trash antispam_spam = SPAM antispam_unsure = UNSURE antispam_crm_binary = /opt/crm114/mailreaver.crm antispam_crm_args = --fileprefix=/opt/crm114/ . . . }
protocol imap { . . . mail_plugin_dir = /usr/local/lib/dovecot mail_plugins = $mail_plugins quota imap_quota mail_log antispam . . . }
I have a sieve default compiled script that automatically put mails in SPAM folder or UNSURE folder if respectively in message hedere there is the evaluation of crm114 (UNSURE or SPAM).
When i move mails incorrectly tagged by crm (for example from SPAM to my inbox or from UNSURE to SPAM) thunderbird (company official mail client ver 15.01) go in error with the following message:
"Operation failed over folder 'UNSURE'. Server for account davide.marchi@mail.cgilfe.it said: [CANNOT] Failed to call crm114 binary.."
I dont'know where is my mistake if someone can help me is much appreciated Thank you
-- */Davide Marchi /Teorema Ferrara Srl /(Tel: /**/+39 0532 783161)/**/ (Fax: +/**/39 0532 783368/**/)/**//**/ /**//**/Davide.Marchi@mail.cgilfe.it mailto:davide.marchi@mail.cgilfe.it?subject=Info
/CONFIDENZIALITA’ *** Questo messaggio, inclusi gli eventuali allegati, è indirizzato solo ai destinatari e può contenere informazioni riservate e confidenziali. Se avete ricevuto il messaggio senza esserne un destinatario, siete pregati di non utilizzare, copiare o distribuire questo messaggio o i suoi allegati. Se avete ricevuto il messaggio per errore, siete pregati di cancellarlo dal vostro sistema, assieme a tutti gli allegati, e di informare immediatamente il mittente,sia ai sensi dell'art. 616 c.p., sia ai sensi del DL n. 196/03.
*CONFIDENTIALITY*** This message and any attachments are intended only for the use of the addressee(s) and may contain information that is privileged and/or confidential. If the reader of the message is not the intended recipient(s) or an authorized representative of the intended recipient(s), please do not use, copy, distribute this email or its attachments or take action based on them. If you have received this communication in error, please notify us immediately by email and delete the message and any attachments from your system. *Teorema FerraraSrl - Via Spronello, 7 - 44121 Ferrara Italia - P. IVA 01244490387** P**S**tampa questo messaggio solo se veramente necessario, pensa alla natura! - Please consider whether it is necessary to print this e-mail*
On Thu, 27 Sep 2012 12:22:47 +0300, Davide davide.marchi@mail.cgilfe.it
wrote:
Hi to all, sorry in advance for my poor english, this is the first time
that i wrote to a list if i make mistake .... excuseme. My problem is this: i have dovecot 2.1.8 installed and functioning from
2 years one week ago i have installed crm114 for my last spam detection
filter "version 20100106-BlameMichelson (TRE 0.8.0 (BSD))" My mail system is qmail that through .qmail default correctly tag with
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-27CA1CFB X-CRM114-CacheID: sfid-20120927_105129_798028_B0035817 X-CRM114-Status: GOOD ( 28.64 ) headers ... "Operation failed over folder 'UNSURE'. Server for account
davide.marchi@mail.cgilfe.it said: [CANNOT] Failed to call crm114
binary.."
Did you see anything in syslog? If not, let's begin with the attached
patch.
-- Eugene Paskevich | *==)----------- | Plug me into eugene@raptor.kiev.ua | -----------(==* | The Matrix
On Mon, 01 Oct 2012 02:07:25 +0300, Eugene Paskevich
eugene@raptor.kiev.ua wrote:
Did you see anything in syslog? If not, let's begin with the attached patch.
Ouch... too sleepy. Here's the correct patch.
-- Eugene Paskevich | *==)----------- | Plug me into eugene@raptor.kiev.ua | -----------(==* | The Matrix
Thank you very much for the reply, i' have installed the supplied patch with the following command:
- patch -p1 -i ../crm_debug.patch (i'm in the cloned base directory) i compile the plugin and all go easy
i move my wrongly tagged mail from UNSURE to INBOX and thunderbird tell me ..blah..blah.. [CANNOT] Failed to call crm114 binary I cant see in any log what's the problem ....
Il 01/10/2012 01:16, Eugene Paskevich ha scritto:
On Mon, 01 Oct 2012 02:07:25 +0300, Eugene Paskevich eugene@raptor.kiev.ua wrote:
Did you see anything in syslog? If not, let's begin with the attached patch.
Ouch... too sleepy. Here's the correct patch.
I downloaded and applaied the patch in the message 01:16 of 716 bytes: diff -r 7f94cc6b4d8e src/crm114.c --- a/src/crm114.c Fri May 11 04:05:59 2012 +0300 +++ b/src/crm114.c Mon Oct 01 02:15:40 2012 +0300 @@ -56,11 +56,17 @@ * really only needs the signature. */ if (pipe(pipes)) + { + i_debug("Failed to create pipes"); return -1; + } pid = fork(); if (pid < 0) + { + i_debug("Couldn't fork"); return -1; + } if (pid) { @@ -117,6 +123,7 @@ argv[i++] = spam ? cfg->spam : cfg->non_spam; + i_debug("Executing '%s %s'", cfg->binary, t_strarray_join(argv, " ")); execv(cfg->binary, (char *const *) argv); /* fall through if reaver can't be found */ i_debug("executing %s failed: %d (uid=%d, gid=%d)", cfg->binary, errno, Il 01/10/2012 11:00, Davide ha scritto:
Thank you very much for the reply, i' have installed the supplied patch with the following command:
- patch -p1 -i ../crm_debug.patch (i'm in the cloned base directory) i compile the plugin and all go easy
i move my wrongly tagged mail from UNSURE to INBOX and thunderbird tell me ..blah..blah.. [CANNOT] Failed to call crm114 binary I cant see in any log what's the problem ....
Il 01/10/2012 01:16, Eugene Paskevich ha scritto:
On Mon, 01 Oct 2012 02:07:25 +0300, Eugene Paskevich
wrote: Did you see anything in syslog? If not, let's begin with the attached patch.
Ouch... too sleepy. Here's the correct patch.
I have recived an empty message in response Il 01/10/2012 11:04, Davide ha scritto:
I downloaded and applaied the patch in the message 01:16 of 716 bytes:
diff -r 7f94cc6b4d8e src/crm114.c --- a/src/crm114.c Fri May 11 04:05:59 2012 +0300 +++ b/src/crm114.c Mon Oct 01 02:15:40 2012 +0300 @@ -56,11 +56,17 @@ * really only needs the signature. */ if (pipe(pipes)) + { + i_debug("Failed to create pipes"); return -1; + }
pid = fork(); if (pid < 0) + { + i_debug("Couldn't fork"); return -1; + }
if (pid) { @@ -117,6 +123,7 @@
argv[i++] = spam ? cfg->spam : cfg->non_spam;
+ i_debug("Executing '%s %s'", cfg->binary, t_strarray_join(argv, " ")); execv(cfg->binary, (char *const *) argv); /* fall through if reaver can't be found */ i_debug("executing %s failed: %d (uid=%d, gid=%d)", cfg->binary, errno,
Il 01/10/2012 11:00, Davide ha scritto:
Thank you very much for the reply, i' have installed the supplied patch with the following command:
- patch -p1 -i ../crm_debug.patch (i'm in the cloned base directory) i compile the plugin and all go easy
i move my wrongly tagged mail from UNSURE to INBOX and thunderbird tell me ..blah..blah.. [CANNOT] Failed to call crm114 binary I cant see in any log what's the problem ....
Il 01/10/2012 01:16, Eugene Paskevich ha scritto:
On Mon, 01 Oct 2012 02:07:25 +0300, Eugene Paskevich
wrote: Did you see anything in syslog? If not, let's begin with the attached patch.
Ouch... too sleepy. Here's the correct patch.
On Mon, 01 Oct 2012 12:00:14 +0300, Davide davide.marchi@mail.cgilfe.it
wrote:
Thank you very much for the reply, i' have installed the supplied patch
with the following command:
- patch -p1 -i ../crm_debug.patch (i'm in the cloned base directory) i compile the plugin and all go easy
i move my wrongly tagged mail from UNSURE to INBOX and thunderbird tell
me ..blah..blah.. [CANNOT] Failed to call crm114 binary I cant see in any log what's the problem ....
Weird... Did you configure anything specific about logging? doveconf -n might show. You should also check your syslog configuration as to where debugging logging should go to. Otherwise I have no idea.
-- Eugene Paskevich | *==)----------- | Plug me into eugene@raptor.kiev.ua | -----------(==* | The Matrix
this is my dovecot configuration for antispam plugin logging: antispam_verbose_debug = 1 antispam_debug_target = syslog
and this is info_log_path = /var/log/dovecot/dovecot.log log_path = /var/log/dovecot/dovecot-err.log debug_log_path =
Il 01/10/2012 11:20, Eugene Paskevich ha scritto:
On Mon, 01 Oct 2012 12:00:14 +0300, Davide davide.marchi@mail.cgilfe.it wrote:
Thank you very much for the reply, i' have installed the supplied patch with the following command:
- patch -p1 -i ../crm_debug.patch (i'm in the cloned base directory) i compile the plugin and all go easy
i move my wrongly tagged mail from UNSURE to INBOX and thunderbird tell me ..blah..blah.. [CANNOT] Failed to call crm114 binary I cant see in any log what's the problem ....
Weird... Did you configure anything specific about logging? doveconf -n might show. You should also check your syslog configuration as to where debugging logging should go to. Otherwise I have no idea.
On Mon, 01 Oct 2012 12:54:01 +0300, Davide davide.marchi@mail.cgilfe.it
wrote:
this is my dovecot configuration for antispam plugin logging: antispam_verbose_debug = 1 antispam_debug_target = syslog
Neither my plugin nor (I believe) main dovecot reads those two. You can
remove them.
and this is info_log_path = /var/log/dovecot/dovecot.log log_path = /var/log/dovecot/dovecot-err.log debug_log_path =
Did you notice that patch is mainly for i_debug() invocations? :-)
Try sitting debug_log_path to something meaningful. And of course restart
dovecot.
-- Eugene Paskevich | *==)----------- | Plug me into eugene@raptor.kiev.ua | -----------(==* | The Matrix
I deleted antispam_verbose_debug = 1 antispam_debug_target = syslog from dovecot.conf and i added
debug_log_path = /var/log/dovecot/dovecot_debug.log
restarted dovecot and now i see in the debug log
2012-10-01 12:33:31 imap: Debug: Module loaded: /usr/local/lib/dovecot/lib90_antispam_plugin.so
but nothing inherit [CANNOT] Failed to call crm114 binary
Il 01/10/2012 12:07, Eugene Paskevich ha scritto:
On Mon, 01 Oct 2012 12:54:01 +0300, Davide davide.marchi@mail.cgilfe.it wrote:
this is my dovecot configuration for antispam plugin logging: antispam_verbose_debug = 1 antispam_debug_target = syslog
Neither my plugin nor (I believe) main dovecot reads those two. You can remove them.
and this is info_log_path = /var/log/dovecot/dovecot.log log_path = /var/log/dovecot/dovecot-err.log debug_log_path =
Did you notice that patch is mainly for i_debug() invocations? :-) Try sitting debug_log_path to something meaningful. And of course restart dovecot.
On Mon, 01 Oct 2012 13:57:14 +0300, Davide davide.marchi@mail.cgilfe.it
wrote:
I deleted antispam_verbose_debug = 1 antispam_debug_target = syslog from dovecot.conf and i added
debug_log_path = /var/log/dovecot/dovecot_debug.log
restarted dovecot and now i see in the debug log
2012-10-01 12:33:31 imap: Debug: Module loaded:
/usr/local/lib/dovecot/lib90_antispam_plugin.sobut nothing inherit [CANNOT] Failed to call crm114 binary
Could you please post the contents of the debug file somewhere?
-- Eugene Paskevich | *==)----------- | Plug me into eugene@raptor.kiev.ua | -----------(==* | The Matrix
Can i attach compressed log in a post? I can produce output replacing crm binary with a script bash to ouput command,user etc etc
Il 01/10/2012 13:01, Eugene Paskevich ha scritto:
On Mon, 01 Oct 2012 13:57:14 +0300, Davide davide.marchi@mail.cgilfe.it wrote:
I deleted antispam_verbose_debug = 1 antispam_debug_target = syslog from dovecot.conf and i added
debug_log_path = /var/log/dovecot/dovecot_debug.log
restarted dovecot and now i see in the debug log
2012-10-01 12:33:31 imap: Debug: Module loaded: /usr/local/lib/dovecot/lib90_antispam_plugin.so
but nothing inherit [CANNOT] Failed to call crm114 binary
Could you please post the contents of the debug file somewhere?
Restarting Dovecot instead to use doveadm reload i hav strange error:
managesieve(root): Fatal: getcwd() failed: No such file or directory doveconf: Error: managesieve-login: dump-capability process returned 89
Il 01/10/2012 13:48, Davide ha scritto:
Can i attach compressed log in a post? I can produce output replacing crm binary with a script bash to ouput command,user etc etc
Il 01/10/2012 13:01, Eugene Paskevich ha scritto:
On Mon, 01 Oct 2012 13:57:14 +0300, Davide davide.marchi@mail.cgilfe.it wrote:
I deleted antispam_verbose_debug = 1 antispam_debug_target = syslog from dovecot.conf and i added
debug_log_path = /var/log/dovecot/dovecot_debug.log
restarted dovecot and now i see in the debug log
2012-10-01 12:33:31 imap: Debug: Module loaded: /usr/local/lib/dovecot/lib90_antispam_plugin.so
but nothing inherit [CANNOT] Failed to call crm114 binary
Could you please post the contents of the debug file somewhere?
On Mon, 01 Oct 2012 14:48:31 +0300, Davide davide.marchi@mail.cgilfe.it
wrote:
Can i attach compressed log in a post?
If it's of the sane size :-)
But I'm actually interested in the output which was triggered by the mail
move itself.
I can produce output replacing crm binary with a script bash to ouput
command,user etc etc
Wait a second... So the script is ran correctly but reaver isn't?
That probably means that either reaver dislikes its arguments or its
stdin...
-- Eugene Paskevich | *==)----------- | Plug me into eugene@raptor.kiev.ua | -----------(==* | The Matrix
I made an experiment because iwasn't able to output some error to syslog or stderr about my configuration... I've installed antispam plugin in a parallel server with the program of johannes Bergs that seem now upgraded to function with 2.X and i have same problem ("Failed to call crm114 binary.." in antispam dovecot from your program, Eugene, and "Failed to call reaver.." from Johannes program) but now i'm able to output to log with this config:
antispam_debug_target = syslog antispam_debug_target = stderr antispam_verbose_debug = 1 antispam_backend = crm114 antispam_spam_pattern_ignorecase = spam* antispam_trash_pattern_ignorecase = trash* antispam_unsure_pattern_ignorecase = unsure* antispam_signature = X-CRM114-CacheID antispam_signature_missing = error antispam_crm_binary = /usr/local/bin/piper_log.sh antispam_crm_spam_arg = --spam antispam_crm_notspam_arg = --good # antispam_crm_binary = /opt/crm114/mailreaver.crm antispam_crm_args = -u;%h;--fileprefix=/opt/crm114/ # antispam_signature = X-CRM114-CacheID
in dovecot-err.log now i have 2012-10-01 17:39:35 imap: Error: antispam: plugin initialising (2.0-4-g83b0b4b-dirty) 2012-10-01 17:39:35 imap: Error: antispam: verbose debug enabled 2012-10-01 17:39:35 imap: Error: antispam: "SPAM" is exact match spam folder 2012-10-01 17:39:35 imap: Error: antispam: "UNSURE" is exact match unsure folder 2012-10-01 17:39:35 imap: Error: antispam: "Trash" is exact match trash folder 2012-10-01 17:39:35 imap: Error: antispam: reaver binary set to /usr/local/bin/piper_log.sh 2012-10-01 17:39:35 imap: Error: antispam: reaver extra arg -u 2012-10-01 17:39:35 imap: Error: antispam: reaver extra arg /home/vpopmail/domains/mail.cgilfe.it/davide.marchi 2012-10-01 17:39:35 imap: Error: antispam: reaver extra arg --fileprefix=/opt/crm114/ 2012-10-01 17:39:35 imap: Error: antispam: signature header line is "X-CRM114-CacheID" 2012-10-01 17:39:39 imap: Error: antispam: plugin initialising (2.0-4-g83b0b4b-dirty) 2012-10-01 17:39:39 imap: Error: antispam: verbose debug enabled . . . 2012-10-01 17:39:42 imap: Error: antispam: mail copy: from trash: 0, to trash: 0 2012-10-01 17:39:42 imap: Error: antispam: mailbox_is_spam(SPAM): 1 2012-10-01 17:39:42 imap: Error: antispam: mailbox_is_spam(INBOX): 0 2012-10-01 17:39:42 imap: Error: antispam: mailbox_is_unsure(SPAM): 0 2012-10-01 17:39:42 imap: Error: antispam: mail copy: src spam: 1, dst spam: 0, src unsure: 0
(i moved a mail from SPAM to INBOX)
this is the output for "call command crm args" /opt/crm114/mailreaver.crm --good -u /home/vpopmail/domains/mail.cgilfe.it/davide.marchi --fileprefix=/opt/crm114/
if i exec this command with user vpopmail in console the command is successful
Il 01/10/2012 14:04, Eugene Paskevich ha scritto:
On Mon, 01 Oct 2012 14:48:31 +0300, Davide davide.marchi@mail.cgilfe.it wrote:
Can i attach compressed log in a post?
If it's of the sane size :-) But I'm actually interested in the output which was triggered by the mail move itself.
I can produce output replacing crm binary with a script bash to ouput command,user etc etc
Wait a second... So the script is ran correctly but reaver isn't? That probably means that either reaver dislikes its arguments or its stdin...
I'm unable to output nothing to syslog nor in other dovecot's log files about problem of plugin. If i use the test server the output is this:
Oct 2 10:38:34 debnew imap: antispam: mailbox_is_unsure(SPAM): 0 Oct 2 10:38:34 debnew imap: antispam: mailbox_is_trash(INBOX): 0 Oct 2 10:38:34 debnew imap: antispam: mailbox_is_trash(SPAM): 0 Oct 2 10:38:34 debnew imap: antispam: mail copy: from trash: 0, to trash: 0 Oct 2 10:38:34 debnew imap: antispam: mailbox_is_spam(INBOX): 0 Oct 2 10:38:34 debnew imap: antispam: mailbox_is_spam(SPAM): 1 Oct 2 10:38:34 debnew imap: antispam: mailbox_is_unsure(INBOX): 0 Oct 2 10:38:34 debnew imap: antispam: mail copy: src spam: 0, dst spam: 1, src unsure: 0 Oct 2 10:38:34 debnew imap: antispam: /usr/local/bin/piper_log.sh --spam -u /home/vpopmail/domains/mail.cgilfe.it/davide.marchi --fileprefix=/opt/crm114/ and this is correct but anyway thunderbird say [CANNOT] Failed to call reaver
Il 01/10/2012 14:04, Eugene Paskevich ha scritto:
On Mon, 01 Oct 2012 14:48:31 +0300, Davide davide.marchi@mail.cgilfe.it wrote:
Can i attach compressed log in a post?
If it's of the sane size :-) But I'm actually interested in the output which was triggered by the mail move itself.
I can produce output replacing crm binary with a script bash to ouput command,user etc etc
Wait a second... So the script is ran correctly but reaver isn't? That probably means that either reaver dislikes its arguments or its stdin...
Parameters i.e. antispam_crm_binary = /opt/crm114/mailreaver.crm must be enclosed on ""? so antispam_crm_binary = "/opt/crm114/mailreaver.crm"
Il 01/10/2012 12:07, Eugene Paskevich ha scritto:
On Mon, 01 Oct 2012 12:54:01 +0300, Davide davide.marchi@mail.cgilfe.it wrote:
this is my dovecot configuration for antispam plugin logging: antispam_verbose_debug = 1 antispam_debug_target = syslog
Neither my plugin nor (I believe) main dovecot reads those two. You can remove them.
and this is info_log_path = /var/log/dovecot/dovecot.log log_path = /var/log/dovecot/dovecot-err.log debug_log_path =
Did you notice that patch is mainly for i_debug() invocations? :-) Try sitting debug_log_path to something meaningful. And of course restart dovecot.
On Mon, 01 Oct 2012 13:58:23 +0300, Davide davide.marchi@mail.cgilfe.it
wrote:
Parameters i.e. antispam_crm_binary = /opt/crm114/mailreaver.crm must be enclosed on ""? so antispam_crm_binary = "/opt/crm114/mailreaver.crm"
No.
-- Eugene Paskevich | *==)----------- | Plug me into eugene@raptor.kiev.ua | -----------(==* | The Matrix
participants (2)
-
Davide
-
Eugene Paskevich