Re: [Dovecot] dovecot antispam plugin not found
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 18 Feb 2014, Alan Schmitt wrote: I'm trying to setup dovecot-antispam, and even though the configuration and the installation seem to have gone well, dovecot is telling me it's not finding it. schmitta@top-wifi ~> /usr/local/Cellar/dovecot/2.2.10/libexec/dovecot/imap -c ~/.dovecotzimbra.rc Fatal: Plugin 'antispam' not found from directory /usr/local/Cellar/dovecot/2.2.10/lib/dovecot You are not running a full Dovecot install, so doveconf -n is not working? schmitta@top-wifi ~> ls -al /usr/local/Cellar/dovecot/2.2.10/lib/dovecot/ | grep antispam -rwxr-xr-x 1 schmitta admin38460 18 fév 22:40 lib90_antispam_plugin.bundle I note that it is the only plugin with the ".bundle" extension, if it's important. what OS is this? Did you've seen some like this: make install Entering directory src. Leaving directory src. Entering directory doc. Leaving directory doc. Entering directory src. Successfully installed lib90_antispam_plugin.so. Leaving directory src. Entering directory doc. Successfully installed dovecot-antispam.7. Leaving directory doc. Does build.mk contain "LIB_SUFFIX=.bundle" ? What happens if you rename lib90_antispam_plugin.bundle to whatever the other plugins are named? - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQEVAwUBUwRdDXD1/YhP6VMHAQLSkQgA5/PbRq61vkfmZ7MYgn1ObAQxjj421px4 wvEMcMw2dt2tO9pPKiqUJj5Xkj/QnUA1hU13vgdp++0lOQFPTjo2H/t7WsO9tYhX gi6sE7DoUnOGVQDIWP25IT+u3o8Z7zhDZ0hqMc8CW6gftN7AqRW04x6Jj59exVQQ Vtm00UXwJo9jQwb5HLZ2q4OY0eFVaujJFSHXsDYzv0Bh+38rNuSnAGMECwEBRwUa mgK7igeRcA5t8ejfL4TBv3fcrp2KfMISC6X5s7CEH3Aw39SDRP1F95K0MDeLG/7d OobE82iNMzNfI4PL5G4plXwMNcBzZJZOZ+JYrjAzbSy3VS/GxQP29Q== =d3fo -END PGP SIGNATURE-
[Dovecot] dovecot antispam plugin not found
Hello, I'm trying to setup dovecot-antispam, and even though the configuration and the installation seem to have gone well, dovecot is telling me it's not finding it. Here is the symptom: schmitta@top-wifi ~> /usr/local/Cellar/dovecot/2.2.10/libexec/dovecot/imap -c ~/.dovecotzimbra.rc Fatal: Plugin 'antispam' not found from directory /usr/local/Cellar/dovecot/2.2.10/lib/dovecot However there seems to be a plugin there: schmitta@top-wifi ~> ls -al /usr/local/Cellar/dovecot/2.2.10/lib/dovecot/ | grep antispam -rwxr-xr-x 1 schmitta admin38460 18 fév 22:40 lib90_antispam_plugin.bundle I note that it is the only plugin with the ".bundle" extension, if it's important. My configuration file is as follows (I'm not finished with the antispam configuration yet): --8<---cut here---start->8--- protocols = imap mail_location = maildir:~/.Maildir/zimbra:INBOX=~/.Maildir/zimbra/.INBOX default_login_user = _dovenull default_internal_user = _dovecot protocol imap { # mail_plugins = $mail_plugins antispam } protocol lda { log_path = ~/.logs/dovecot-lda-errors.log info_log_path = ~/.logs/dovecot-lda.log mail_plugins = $mail_plugins sieve } plugin { sieve = ~/.dovecot.sieve sieve_plugins = sieve_extprograms sieve_extensions = +vnd.dovecot.filter sieve_filter_bin_dir = /usr/local/lib/dovecot/sieve-filter antispam_backend = DSPAM antispam_signature = X-DSPAM-Signature } --8<---cut here---end--->8--- Should I do something special to be able to load the antispam plugin? Thanks, Alan
Re: [Dovecot] dovecot-antispam plugin problem with multiple messages
This seems to fix the issue --- a/dovecot-antispam-plugin/src/antispam-storage-2.0.c +++ b/dovecot-antispam-plugin/src/antispam-storage-2.0.c @@ -91,15 +91,6 @@ antispam_copy(struct mail_save_context *ctx, struct mail *mai int ret; bool src_trash, dst_trash; - if (!ctx->dest_mail) { - /* always need mail */ - if (!ast->mail) - ast->mail = mail_alloc(t, MAIL_FETCH_STREAM_HEADER | - MAIL_FETCH_STREAM_BODY, - NULL); - ctx->dest_mail = ast->mail; - } - i_assert(mail->box); asbox->save_hack = FALSE; @@ -145,7 +136,7 @@ antispam_copy(struct mail_save_context *ctx, struct mail *ma else ret = asbox->cfg->backend->handle_mail( asbox->cfg, t, ast->backendctx, - ctx->dest_mail, + mail, move_to_class(asbox->movetype)); /* On Nov 27, 2013, at 4:17 PM, Richard Platel wrote: > Hi > > With dovecot 2.2.5, and dovecot-antispam built from a recent HEAD pull, when > copying multiple messages to or from a Spam folder, the plugin sends multiple > copies of the first message to the backend. I've tried this with the pipe > and spool2dir backends. > > For example with the spool2dir backend, via IMAP doing > > A COPY 1:3 Spam > > yields 3 copies of message id 1 in the dir: > dev:imap-8.1 rplatel@imap01:/var/run/dovecot_as_tmp$ sudo -u mail md5sum * > 28ad0a215eb7ecbd3a814a8a334d85bf > 001385586164-rpla...@ff-dev.com-1s > 28ad0a215eb7ecbd3a814a8a334d85bf > 001385586164-rpla...@ff-dev.com-2s > 28ad0a215eb7ecbd3a814a8a334d85bf > 001385586164-rpla...@ff-dev.com-3s > > I see the same behaviour with the pipe backend, the pipe program is invoked 3 > times, but with the same message content. > >
[Dovecot] dovecot-antispam plugin problem with multiple messages
Hi With dovecot 2.2.5, and dovecot-antispam built from a recent HEAD pull, when copying multiple messages to or from a Spam folder, the plugin sends multiple copies of the first message to the backend. I've tried this with the pipe and spool2dir backends. For example with the spool2dir backend, via IMAP doing A COPY 1:3 Spam yields 3 copies of message id 1 in the dir: dev:imap-8.1 rplatel@imap01:/var/run/dovecot_as_tmp$ sudo -u mail md5sum * 28ad0a215eb7ecbd3a814a8a334d85bf 001385586164-rpla...@ff-dev.com-1s 28ad0a215eb7ecbd3a814a8a334d85bf 001385586164-rpla...@ff-dev.com-2s 28ad0a215eb7ecbd3a814a8a334d85bf 001385586164-rpla...@ff-dev.com-3s I see the same behaviour with the pipe backend, the pipe program is invoked 3 times, but with the same message content.
[Dovecot] Dovecot antispam plugin
someone use dovecot antispam with crm114? -- *Davide Marchi* *T*eorema *F*errara *Srl* Via Spronello, 7 - Ferrara - 44121 Tel. *0532783161* Fax. *0532783368* E-m@il: *davide.mar...@mail.cgilfe.it* Skype: *davide.marchi73* Web: *http://www.cgilfe.it* *CONFIDENZIALITA'* *Ai sensi del D.Lgs. 196/2003 si precisa che le informazioni contenute in questo messaggio sono riservate ed a uso esclusivo del destinatario/dei destinatari. Qualora il messaggio in parola Le fosse pervenuto per errore, La invitiamo ad eliminarlo senza copiarlo e a non inoltrarlo a terzi, dandocene gentilmente comunicazione.* *Per favore, pensa all'ambiente. Stampa questa email solo se necessario.*
Re: [Dovecot] Dovecot antispam plugin for 2.2
On Aug 21, 2013, at 1:19 PM, Micah Anderson wrote: > > Hello, > > I recently was looking to update to dovecot 2.2 and I have been happily > using the dovecot-antispam plugin in 2.1, but found that there have been > some changes in dovecot that make this version not compile against 2.2. I believe this is what you want: http://hg.dovecot.org/dovecot-antispam-plugin/ Regards, Bradley Giesbrecht (pixilla)
[Dovecot] Dovecot antispam plugin for 2.2
Hello, I recently was looking to update to dovecot 2.2 and I have been happily using the dovecot-antispam plugin in 2.1, but found that there have been some changes in dovecot that make this version not compile against 2.2. I'm wondering if Johannes you have any plans to update it, or if others have managed to figure out what is necessary to get it to work? The particular piece that I am currently stuck on is that the dict_init() in dovecot now requires more arguments than in previous versions, it now requires this: int dict_init(const char *uri, enum dict_data_type value_type, const char *username, const char *base_dir, struct dict **dict_r, const char **error_r); but previously, we only needed four arguments. Now we need to know what to supply for '**dict_r' and '**error_r'. Any advise/help would be appreciated: make[1]: Entering directory `/home/micah/debian/dovecot-antispam/dovecot-antispam-2.0+20120225' cc -DHAVE_CONFIG_H -I/usr/include/dovecot/ -I/usr/include/dovecot/src/ -I/usr/include/dovecot/src/lib/ -I/usr/include/dovecot/src/lib-storage/ -I/usr/include/dovecot/src/lib-mail/ -I/usr/include/dovecot/src/lib-imap/ -I/usr/include/dovecot/src/lib-dict/ -I/usr/include/dovecot/src/lib-index/ -I/usr/include/dovecot/src/imap/ -o dovecot-version dovecot-version.c ./dovecot-version > dovecot-version.h CC antispam-storage.o In file included from antispam-storage-2.2.c:20:0, from antispam-storage.c:3: antispam-plugin.h: In function ‘string_dict_init’: antispam-plugin.h:288:2: error: too few arguments to function ‘dict_init’ return dict_init(uri, DICT_DATA_TYPE_STRING, username, NULL); ^ In file included from antispam-plugin.h:13:0, from antispam-storage-2.2.c:20, from antispam-storage.c:3: /usr/include/dovecot/dict.h:34:5: note: declared here int dict_init(const char *uri, enum dict_data_type value_type, ^ micah
Re: [Dovecot] dovecot antispam plugin is not woking
On Sat, 04 May 2013 08:13:44 +0300, Ravi Kanchan wrote: But it is not woking in our setup its not block or marking SPAM mail which is receiving through IMAP or POP3 services. Antispam plugin isn't supposed to block nor mark mails. It's only used to teach your spam system should it make an error. -- Eugene Paskevich | *==)--- | Plug me into eug...@raptor.kiev.ua| ---(==* | The Matrix
Re: [Dovecot] dovecot antispam plugin is not woking
hi All, But it is not woking in our setup its not block or marking SPAM mail which is receiving through IMAP or POP3 services. Regard's Ravi Kanchan Sharma Sr. System Administrator Infinite Computer Solutions (I) Ltd. Bglr. Mo. 9997154666 From: Trever L. Adams To: Dovecot Mailing List Cc: Eugene Paskevich ; Ravi Kanchan Sent: Friday, 3 May 2013 6:00 PM Subject: Re: [Dovecot] dovecot antispam plugin is not woking On 04/30/2013 05:47 AM, Eugene Paskevich wrote: > On Tue, 30 Apr 2013 12:36:44 +0300, Ravi Kanchan > wrote: > >> and plugin configuration is given below: >> >> protocol imap { >> mail_plugins = " antispam autocreate" >> } >> protocol pop3 { >> mail_plugins = antispam autocreate >> } > > I'm not sure this plugin could be used with POP3. I am pretty sure that it cannot be used with POP3. It requires IMAP. Trever
Re: [Dovecot] dovecot antispam plugin is not woking
On 04/30/2013 05:47 AM, Eugene Paskevich wrote: > On Tue, 30 Apr 2013 12:36:44 +0300, Ravi Kanchan > wrote: > >> and plugin configuration is given below: >> >> protocol imap { >> mail_plugins = " antispam autocreate" >> } >> protocol pop3 { >> mail_plugins = antispam autocreate >> } > > I'm not sure this plugin could be used with POP3. I am pretty sure that it cannot be used with POP3. It requires IMAP. Trever
Re: [Dovecot] dovecot antispam plugin is not woking
Dear Tom, I have upgrade dovecot to 2.1.15 and change configuration as per your guidance. but the problem is still remain. can you share your dspam.conf file. Regard's Ravi Kanchan Sharma Sr. System Administrator Infinite Computer Solutions (I) Ltd. Bglr. Mo. 9997154666 From: Tom Hendrikx To: dovecot@dovecot.org Sent: Wednesday, 1 May 2013 2:39 AM Subject: Re: [Dovecot] dovecot antispam plugin is not woking On 30-04-13 17:14, Eugene Paskevich wrote: > On Tue, 30 Apr 2013 15:56:19 +0300, Ravi Kanchan > wrote: > >> thank you for your valuable response >> >> >> I have changed the configuration as per your suggestion. > > Try putting it this way: > > plugin { > antispam_spam = Spam > antispam_allow_append_to_spam = YES > antispam_backend = dspam > antispam_dspam_args = > --client;--user;vmail;--source=error;--signature=%%s > antispam_dspam_result_header = X-DSPAM-Result > antispam_signature = X-DSPAM-Signature > } > I run dovecot, dspam and antispam plugin on dovecot 2.1.16 with: plugin { antispam_backend = dspam antispam_dspam_args = --user;mail;--deliver=;--source=error;--signature=%%s antispam_dspam_binary = /usr/bin/dspamc antispam_dspam_notspam = --class=innocent antispam_dspam_spam = --class=spam antispam_signature = X-DSPAM-Signature antispam_signature_missing = move antispam_spam_pattern_ignorecase = Junk;Junk.* antispam_trash_pattern_ignorecase = Trash;Deleted Items;Deleted Messages } And it works great :) -- Tom
Re: [Dovecot] dovecot antispam plugin is not woking
On 30-04-13 17:14, Eugene Paskevich wrote: > On Tue, 30 Apr 2013 15:56:19 +0300, Ravi Kanchan > wrote: > >> thank you for your valuable response >> >> >> I have changed the configuration as per your suggestion. > > Try putting it this way: > > plugin { > antispam_spam = Spam > antispam_allow_append_to_spam = YES > antispam_backend = dspam > antispam_dspam_args = > --client;--user;vmail;--source=error;--signature=%%s > antispam_dspam_result_header = X-DSPAM-Result > antispam_signature = X-DSPAM-Signature > } > I run dovecot, dspam and antispam plugin on dovecot 2.1.16 with: plugin { antispam_backend = dspam antispam_dspam_args = --user;mail;--deliver=;--source=error;--signature=%%s antispam_dspam_binary = /usr/bin/dspamc antispam_dspam_notspam = --class=innocent antispam_dspam_spam = --class=spam antispam_signature = X-DSPAM-Signature antispam_signature_missing = move antispam_spam_pattern_ignorecase = Junk;Junk.* antispam_trash_pattern_ignorecase = Trash;Deleted Items;Deleted Messages } And it works great :) -- Tom
Re: [Dovecot] dovecot antispam plugin is not woking
On Tue, 30 Apr 2013 15:56:19 +0300, Ravi Kanchan wrote: thank you for your valuable response I have changed the configuration as per your suggestion. Try putting it this way: plugin { antispam_spam = Spam antispam_allow_append_to_spam = YES antispam_backend = dspam antispam_dspam_args = --client;--user;vmail;--source=error;--signature=%%s antispam_dspam_result_header = X-DSPAM-Result antispam_signature = X-DSPAM-Signature } -- Eugene Paskevich | *==)--- | Plug me into eug...@raptor.kiev.ua| ---(==* | The Matrix
Re: [Dovecot] dovecot antispam plugin is not woking
Dear Eugene thank you for your valuable response I have changed the configuration as per your suggestion. plugin { antispam_backend = dspam antispam_crm_args = --config=/home/vmail antispam_dspam_args = --client;--user=vmail; --source=error;--signature=%%s antispam_dspam_binary = /usr/bin/dspamc antispam_signature = X-DSPAM-Signature } but in mail debug ouput it is displaying the following error and mail receive in inbox: Apr 30 18:29:18 sogo dovecot: imap(kanchan): Error: antispam plugin folders are not configured for this user can you give me hints whats I do in next step. Regard's Ravi Kanchan Sharma Sr. System Administrator Infinite Computer Solutions (I) Ltd. Bglr. Mo. 9997154666 From: Eugene Paskevich To: "dovecot@dovecot.org" ; Ravi Kanchan Sent: Tuesday, 30 April 2013 5:17 PM Subject: Re: [Dovecot] dovecot antispam plugin is not woking On Tue, 30 Apr 2013 12:36:44 +0300, Ravi Kanchan wrote: > I am using dovecot version 2.0.9 > DSPAM Anti-Spam Suite 3.10.2 (agent/library) > ClamAV 0.97.7/17102 > > and dspam antispam plugin > dovecot-antispam-plugin-43880985e3dd That is quite an old revision. However, there were no significant changes since then. If you update to the latest revision you might need to revert 5e8351bcfb29, given your dovecot version. > and plugin configuration is given below: > > protocol imap { > mail_plugins = " antispam autocreate" > } > protocol pop3 { > mail_plugins = antispam autocreate > } I'm not sure this plugin could be used with POP3. > plugin { > antispam_allow_append_to_spam = YES > antispam_backend = dspam > antispam_crm_args = --config=/home/vmail This line isn't used for dspam backend. > antispam_dspam_args = --client;--user vmail "--user vmail" is treated like a single argument due to missing semicolon. That is definitely not what you want. Put it like "--client;--user;vmail". Also, you might consider adding these two: "--source=error;--signature=%%s". But I've never used dspam, so can't know for sure. > antispam_dspam_binary = /usr/bin/dspam > antispam_dspam_notspam = --class=innocent These are default, could be removed. > antispam_dspam_result_header = X-DSPAM-Result > antispam_dspam_spam = --class=spam This last line could also be removed because it's default. > antispam_mail_tmpdir = /tmp No such setting at all for this plugin. > antispam_signature = X-DSPAM-Signature > antispam_signature_missing = error Again, default. > antispam_spam = Spam > } > > dspam bin path: > > [root@sogo ~]# which dspam > /usr/bin/dspam > > but my dspam plugin > configuration is not working. and I am not getting any log from > dspam. My dspam server is working prefect. > > cna anyone help me Please fix antispam_dspam_args and let me know whether it works. -- Eugene Paskevich | *==)--- | Plug me into eug...@raptor.kiev.ua | ---(==* | The Matrix
Re: [Dovecot] dovecot antispam plugin is not woking
On Tue, 30 Apr 2013 12:36:44 +0300, Ravi Kanchan wrote: I am using dovecot version 2.0.9 DSPAM Anti-Spam Suite 3.10.2 (agent/library) ClamAV 0.97.7/17102 and dspam antispam plugin dovecot-antispam-plugin-43880985e3dd That is quite an old revision. However, there were no significant changes since then. If you update to the latest revision you might need to revert 5e8351bcfb29, given your dovecot version. and plugin configuration is given below: protocol imap { mail_plugins = " antispam autocreate" } protocol pop3 { mail_plugins = antispam autocreate } I'm not sure this plugin could be used with POP3. plugin { antispam_allow_append_to_spam = YES antispam_backend = dspam antispam_crm_args = --config=/home/vmail This line isn't used for dspam backend. antispam_dspam_args = --client;--user vmail "--user vmail" is treated like a single argument due to missing semicolon. That is definitely not what you want. Put it like "--client;--user;vmail". Also, you might consider adding these two: "--source=error;--signature=%%s". But I've never used dspam, so can't know for sure. antispam_dspam_binary = /usr/bin/dspam antispam_dspam_notspam = --class=innocent These are default, could be removed. antispam_dspam_result_header = X-DSPAM-Result antispam_dspam_spam = --class=spam This last line could also be removed because it's default. antispam_mail_tmpdir = /tmp No such setting at all for this plugin. antispam_signature = X-DSPAM-Signature antispam_signature_missing = error Again, default. antispam_spam = Spam } dspam bin path: [root@sogo ~]# which dspam /usr/bin/dspam but my dspam plugin configuration is not working. and I am not getting any log from dspam. My dspam server is working prefect. cna anyone help me Please fix antispam_dspam_args and let me know whether it works. -- Eugene Paskevich | *==)--- | Plug me into eug...@raptor.kiev.ua| ---(==* | The Matrix
[Dovecot] dovecot antispam plugin is not woking
Hi All, I am using dovecot version 2.0.9 DSPAM Anti-Spam Suite 3.10.2 (agent/library) ClamAV 0.97.7/17102 and dspam antispam plugin dovecot-antispam-plugin-43880985e3dd and plugin configuration is given below: protocol imap { mail_plugins = " antispam autocreate" } protocol pop3 { mail_plugins = antispam autocreate } plugin { antispam_allow_append_to_spam = YES antispam_backend = dspam antispam_crm_args = --config=/home/vmail antispam_dspam_args = --client;--user vmail antispam_dspam_binary = /usr/bin/dspam antispam_dspam_notspam = --class=innocent antispam_dspam_result_header = X-DSPAM-Result antispam_dspam_spam = --class=spam antispam_mail_tmpdir = /tmp antispam_signature = X-DSPAM-Signature antispam_signature_missing = error antispam_spam = Spam } dspam bin path: [root@sogo ~]# which dspam /usr/bin/dspam but my dspam plugin configuration is not working. and I am not getting any log from dspam. My dspam server is working prefect. cna anyone help me Regard's Ravi Kanchan Sharma
Re: [Dovecot] dovecot + antispam plugin - no retraining
On Thursday, January 17, 2013 11:16:45 AM Steffen Kaiser wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On Wed, 16 Jan 2013, Michael Moerz wrote: > > plugin { > > > > antispam_backend = pipe > > Er, this module is called "mailtrain", isn't it? At least in antispam > changeset 50:0319240072d8. You should get an error "configured > non-existent antispam backend: pipe" tmp = getenv("BACKEND", getenv_data); if (tmp) { if (strcmp(tmp, "crm114") == 0) cfg->backend = &crm114_backend; else if (strcmp(tmp, "dspam") == 0) cfg->backend = &dspam_backend; else if (strcmp(tmp, "pipe") == 0) cfg->backend = &pipe_backend; else if (strcmp(tmp, "spool2dir") == 0) cfg->backend = &spool2dir_backend; else { debug(&cfg->dbgcfg, "selected invalid backend!\n"); exit(3); } probably i fail to see something important here, but to me 'pipe' seems correct. > > antispam_mail_notspam = h...@example.org > > antispam_mail_sendmail = /usr/sbin/sendmail > > You could replace this program by a shell script to get the info, that it > is called, e.g.: > This is really a nifty idea, i'll give it a try and report back on that. kind regards, Michael Moerz
Re: [Dovecot] dovecot + antispam plugin - no retraining
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, 16 Jan 2013, Michael Moerz wrote: plugin { antispam_backend = pipe Er, this module is called "mailtrain", isn't it? At least in antispam changeset 50:0319240072d8. You should get an error "configured non-existent antispam backend: pipe" antispam_mail_notspam = h...@example.org antispam_mail_sendmail = /usr/sbin/sendmail You could replace this program by a shell script to get the info, that it is called, e.g.: /usr/local/bin/mailtrain.sh #!/bin/bash ( date id -a echo "$@" /usr/sbin/sendmail "%@" rc=$? echo rc=$rc exit $rc ) >>/tmp/mailtrain.log 2>&1 = So you see, if the program is fired up and which uid is used and what problem sendmail had. Kind regards, - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQEVAwUBUPfPjV3r2wJMiz2NAQL5Swf/X8UYD0PH/WG1qUp9QkzqCCaq0U33aTCU qGy9nYAHjvaXbjv9iDOorTb9kOdX0ApkliHtGnSWTOB9aJSwltDk2Cg+AFLudZaa UoyBE67P3XajPh4hxJ7Q/qaMDmqSnOV7W2bvMuQXe0tWgA19dppQIHCN+P0tUhva p3UiQGShp2yCOW9lPGCrVxALyv/0IeJzNzfRjIf7bfd586HCxuNWirPRP4VQ8Dni oz2KLIwABGlaCl5dk+d6r0OrTnln0YpHWfa2vDpOShqLN4J0AncQoDV4VBqEYUyH HzD1SEhTHU++bVWvni7vrGPVa9LEy/4vdPzeBkHcVlbowOzn5zokoA== =9u45 -END PGP SIGNATURE-
[Dovecot] dovecot + antispam plugin - no retraining
Hi, dovecot -n # 2.1.7: /etc/dovecot/dovecot.conf # OS: Linux 3.8.0-0-generic x86_64 Ubuntu Raring Ringtail (development branch) listen = 10.10.200.39 login_log_format_elements = user=<%u> method=%m rip=%r lip=%l mpid=%e %c mail_debug = yes mail_location = maildir:~/Maildir managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave namespace inbox { inbox = yes location = prefix = } passdb { driver = pam } plugin { antispam_backend = pipe antispam_mail_notspam = h...@example.org antispam_mail_sendmail = /usr/sbin/sendmail antispam_mail_sendmail_args = -f;%u...@example.org antispam_mail_spam = s...@example.org antispam_mail_tmpdir = /tmp antispam_signature = X-DSPAM-Signature antispam_signature_missing = error antispam_spam_pattern_ignorecase = SPAM;Junk antispam_trash = trash;Trash;Deleted Items; Deleted Messages mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename sieve = ~/.dovecot.sieve sieve_dir = ~/sieve } protocols = " imap sieve pop3" service auth { unix_listener /var/spool/postfix/private/dovecot-auth { group = postfix mode = 0660 user = postfix } } service imap-login { inet_listener imaps { port = 993 ssl = yes } } ssl_cert = was automatically rejected:%n%r } filesystem is ext4 antispam util is dspam I'm trying to utilize the imap plugin antispam for retraining spam/ham when moving mail from/to spam folders. antispam plugin is loaded and imap service itself runs correctly logfile excerp for login: Jan 16 21:04:33 mailhost dovecot: imap: Debug: Loading modules from directory: /usr/lib/dovecot/modules Jan 16 21:04:33 mailhost dovecot: imap: Debug: Module loaded: /usr/lib/dovecot/modules/lib90_antispam_plugin.so Jan 16 21:04:33 mailhost dovecot: imap(user): Debug: Effective uid=1001, gid=1001, home=/home/user Jan 16 21:04:33 mailhost dovecot: imap(user): Debug: Namespace inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:~/Maildir Jan 16 21:04:33 mailhost dovecot: imap(user): Debug: maildir++: root=/home/user/Maildir, index=, control=, inbox=/home/user/Maildir, alt= Jan 16 21:04:34 mailhost dovecot: imap-login: Login: user=, method=PLAIN, rip=10.10.99.205, lip=10.10.200.39, mpid=5936, TLS Jan 16 21:04:34 mailhost dovecot: imap: Debug: Loading modules from directory: /usr/lib/dovecot/modules Jan 16 21:04:34 mailhost dovecot: imap: Debug: Module loaded: /usr/lib/dovecot/modules/lib90_antispam_plugin.so Jan 16 21:04:34 mailhost dovecot: imap(user): Debug: Effective uid=1001, gid=1001, home=/home/user Jan 16 21:04:34 mailhost dovecot: imap(user): Debug: Namespace inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:~/Maildir Jan 16 21:04:34 mailhost dovecot: imap(user): Debug: maildir++: root=/home/user/Maildir, index=, control=, inbox=/home/user/Maildir, alt= When I move mail into or out of imap folders named Junk or SPAM I would expect, that the antispam plugin kicks in and pipes the mail to dspam. Apparently this does not happen, nothing gets piped, though the mail is still moved to the folder. I've already tried dspam-exec as a backend as well, but that fails even ealier right after imap login with: Jan 16 19:26:15 mailhost dovecot: master: Dovecot v2.1.7 starting up (core dumps disabled) Jan 16 19:26:45 mailhost dovecot: imap-login: Login: user=, method=PLAIN, rip=10.10.99.205, lip=10.10.200.39, mpid=4701, TLS Jan 16 19:26:45 mailhost dovecot: imap: Debug: Loading modules from directory: /usr/lib/dovecot/modules Jan 16 19:26:45 mailhost dovecot: imap: Debug: Module loaded: /usr/lib/dovecot/modules/lib90_antispam_plugin.so Jan 16 19:26:45 mailhost dovecot: imap(user): Debug: Effective uid=1001, gid=1001, home=/home/user Jan 16 19:26:45 mailhost dovecot: imap(user): Fatal: master: service(imap): child 4701 returned error 3 settings were: antispam_backend = dspam-exec antispam_dspam_binary = /usr/bin/dspam antispam_dspam_args = --client;--source=error;--user;%u;--signature=%%s I've also tried with: antispam_backend = dspam-exec antispam_dspam_binary = /usr/bin/dspam antispam_dspam_args = --source=error;--user;%u those settings actually do not produce the problem after the imap login, but they still do not react to moving mail into/from spam folders. I've also tried to utilize antispam_spam = Junk or antispam_spam_pattern = SPAM instead of antispam_spam_pattern_ignorecase = SPAM;Junk but neither makes a difference. Thx in advance for any advice. kind regards, Michael Moerz
[Dovecot] dovecot-antispam-plugin compile error
$ hg --cwd ./work/dovecot-antispam-plugin-50 glog -l3 --style compact @ 50[tip] 0319240072d8 2012-12-20 03:56 +0200 Eugene Paskevich |Made use of new DOVECOT_ABI_VERSION macro. ... $ configure; make Compiling signature-log.c (plugin)... signature-log.c:122: error: too many arguments to function ‘dict_init’ ... Reverting src/signature-log.c from r49 to r30 allows make to succeed again. Regards, Bradley Giesbrecht (pixilla) smime.p7s Description: S/MIME cryptographic signature
Re: [Dovecot] Dovecot antispam plugin bug: got an empty message
It looks that I have misconfigured the dovecot plugin: plugin { antispam_dspam_binary = /usr/bin/dspam # should be dspam # antispam_dspam_binary = /usr/bin/dspamc # does not work antispam_signature = X-DSPAM-Signature antispam_signature_missing = move antispam_spam_pattern_ignorecase = Junk;Junk.* antispam_trash_pattern_ignorecase = Trash;Deleted Items antispam_backend = dspam antispam_dspam_args = --user;%u;--deliver=;--source=error;-- signature=%%s antispam_dspam_spam = --class=spam antispam_dspam_notspam = --class=innocent } Petr Bravenec Dne So 9. června 2012 22:23:05 Petr Bravenec napsal(a): > It is few months ago I requested help with combination dovecot - dovecot- > antispam plugin and dspam. > > Now I got into troubles with a lot of spam delivering to users inbox. > Problem described bellow is now better hidden but stil remains: > > When moving a message from INBOX to Junk, dspam got an empty message. > I made a wrapper about dspamc and there is no input on stdio. The dspam was > not trained (got an empty message). > > Looking to source code of dspam and antispam plugin I suspect the dovecot > not to sending any content to plugin when moving from inbox to junk. > > Petr Bravenec > > Dne Wednesday 25 of January 2012 17:19:18 Tom Hendrikx napsal(a): > > On 25-01-12 08:05, Petr Bravenec wrote: > > > Few weeks ago I upgraded dovecot from 1.2 to 2.0.16 and antispam plugin > > > to 2.0_pre20101222. Since the upgrade I'm not able to move messages to > > > my Junk folder. In the maillog I have found this message: > > > > > > dspam[25060]: empty message (no data received) > > > > Gentoo has included the antispam plugin from Johannes historically, but > > added the fork by Eugene to support upgrades to dovecot 2.0. It is not > > really made clear by the gentoo ebuild is that the forked plugin needs a > > slightly different config. > > > > I use the config below with dovecot 2.0.17 and a git checkout for > > dovecot-antispam: > > > > ===8< > > plugin { > > > > antispam_signature = X-DSPAM-Signature > > antispam_signature_missing = move > > antispam_spam_pattern_ignorecase = Junk;Junk.* > > antispam_trash_pattern_ignorecase = Trash;Deleted Items;Deleted > > > > Messages > > > > # Backend specific > > antispam_backend = dspam > > antispam_dspam_binary = /usr/bin/dspamc > > antispam_dspam_args = > > > > --user;%u;--deliver=;--source=error;--signature=%%s > > > > antispam_dspam_spam = --class=spam > > antispam_dspam_notspam = --class=innocent > > #antispam_dspam_result_header = X-DSPAM-Result > > > > } > > > > > > -- > > Regards, > > > > Tom
[Dovecot] Dovecot antispam plugin bug: got an empty message
It is few months ago I requested help with combination dovecot - dovecot- antispam plugin and dspam. Now I got into troubles with a lot of spam delivering to users inbox. Problem described bellow is now better hidden but stil remains: When moving a message from INBOX to Junk, dspam got an empty message. I made a wrapper about dspamc and there is no input on stdio. The dspam was not trained (got an empty message). Looking to source code of dspam and antispam plugin I suspect the dovecot not to sending any content to plugin when moving from inbox to junk. Petr Bravenec Dne Wednesday 25 of January 2012 17:19:18 Tom Hendrikx napsal(a): > On 25-01-12 08:05, Petr Bravenec wrote: > > Few weeks ago I upgraded dovecot from 1.2 to 2.0.16 and antispam plugin > > to 2.0_pre20101222. Since the upgrade I'm not able to move messages to > > my Junk folder. In the maillog I have found this message: > > > > dspam[25060]: empty message (no data received) > > Gentoo has included the antispam plugin from Johannes historically, but > added the fork by Eugene to support upgrades to dovecot 2.0. It is not > really made clear by the gentoo ebuild is that the forked plugin needs a > slightly different config. > > I use the config below with dovecot 2.0.17 and a git checkout for > dovecot-antispam: > > ===8< > plugin { > antispam_signature = X-DSPAM-Signature > antispam_signature_missing = move > antispam_spam_pattern_ignorecase = Junk;Junk.* > antispam_trash_pattern_ignorecase = Trash;Deleted Items;Deleted > Messages > > # Backend specific > antispam_backend = dspam > antispam_dspam_binary = /usr/bin/dspamc > antispam_dspam_args = > --user;%u;--deliver=;--source=error;--signature=%%s > antispam_dspam_spam = --class=spam > antispam_dspam_notspam = --class=innocent > #antispam_dspam_result_header = X-DSPAM-Result > } > > > -- > Regards, > Tom
Re: [Dovecot] dovecot-antispam-plugin for dovecot-2.0
On 11/17/2010 10:19 AM, Antonio Perez-Aranda wrote: > I'm migrating a customized dovecot-antispam-plugin from > dovecot-antispam-plugn-1.3 which doesn't run in dovecot-2.0 > > Are any body using dovecot-antispam-plugin adapted to 2.0 from > mercurial on a production system? > > This is the adapted version to dovecot 2.0 > http://hg.dovecot.org/dovecot-antispam-plugin/ > I use it with DSPAM. It works wonderfully. It actually solved a problem or two (requiring work arounds) I was having with the original. Eugene (I hope I have his name right) did a fantastic job and did it quickly. Do make sure you read the information about configuration changes. There are a few VERY important ones. Trever -- "The era of setting this up as a competition between Apple and Microsoft is over, as far as I'm concerned." -- S. Jobs signature.asc Description: OpenPGP digital signature
[Dovecot] dovecot-antispam-plugin for dovecot-2.0
I'm migrating a customized dovecot-antispam-plugin from dovecot-antispam-plugn-1.3 which doesn't run in dovecot-2.0 Are any body using dovecot-antispam-plugin adapted to 2.0 from mercurial on a production system? This is the adapted version to dovecot 2.0 http://hg.dovecot.org/dovecot-antispam-plugin/
Re: [Dovecot] dovecot-antispam-plugin problem
On Sun, Oct 24, 2010 at 12:00:51AM +0200, Tom Hendrikx wrote: > On 23/10/10 22:00, Bradley Giesbrecht wrote: > > On Oct 23, 2010, at 12:03 PM, Lars Stavholm wrote: > > > >> Hi All, > >> > >> anyone been able to use the dovecot-antispam-plugin from > >> http://hg.dovecot.org with dovecot-2.0.x? > >> > >> Any input appreciated > >> > >> R > >> /Lars Stavholm > > > > +1 > > > > Sorry that I have no input other then to add to the interest. > > > > Brad > > No problems here, running with 2.0.5. Please explain what specific > problem you and then maybe we can help you :) OK, that's great, thank you. Needed that confirmation to know that I'm not wasting my time. /L
Re: [Dovecot] dovecot-antispam-plugin problem
On 23/10/10 22:00, Bradley Giesbrecht wrote: > On Oct 23, 2010, at 12:03 PM, Lars Stavholm wrote: > >> Hi All, >> >> anyone been able to use the dovecot-antispam-plugin from >> http://hg.dovecot.org with dovecot-2.0.x? >> >> Any input appreciated >> >> R >> /Lars Stavholm > > > +1 > > Sorry that I have no input other then to add to the interest. > > Brad > No problems here, running with 2.0.5. Please explain what specific problem you and then maybe we can help you :) -- Regards, Tom signature.asc Description: OpenPGP digital signature
Re: [Dovecot] dovecot-antispam-plugin problem
On Oct 23, 2010, at 12:03 PM, Lars Stavholm wrote: Hi All, anyone been able to use the dovecot-antispam-plugin from http://hg.dovecot.org with dovecot-2.0.x? Any input appreciated R /Lars Stavholm +1 Sorry that I have no input other then to add to the interest. Brad
[Dovecot] dovecot-antispam-plugin problem
Hi All, anyone been able to use the dovecot-antispam-plugin from http://hg.dovecot.org with dovecot-2.0.x? Any input appreciated R /Lars Stavholm
Re: [Dovecot] Dovecot antispam plugin with virtual users
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 4 May 2010, Philipp wrote: Now I was wondering if it was possible to keep the plugin from using the imap-uid and instead specifying one elsewhere? The IMAP process is using this uid and it has loaded antispam. As far as I know, for security reasons they cannot change UID back to root (or any other one). virtual users, be it ldap or anything else. Or is there a different way to do this? Do I maybe just miss setting a variable somewhere? Allow your vmail user to run dspam, e.g. via sudo. Regards, - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iQEVAwUBS9++Dr+Vh58GPL/cAQII+AgAwjpXSsJymVF9OwBZw1P4+9A884nwn6bp fuZbFtWy2vrvswTmULUlKyKq6pXjXGt7wXMFWJNo/AyrBBhr04dJTlQglw5fteRx 7/V0t6IqDJCuer2erB1U78rDh5oVdRboxkq9K96v/C4C4pXwsejAYsffg9lMAoB9 T/ObpmcnNCQfm8Y5ZuUzTGzFGE5RgStDlOlITrnwYj3Zmz8JHRxIDwwk6zWaRoxE KBt+B4Ex1zO3cXCIqGjeo+arEF/og5aNvmzwqTiVVK77+VwVnHkYX0jQD24RImgj kegoZ/G3BiYwHLyiIkXj/n/oNLl79M/gujMRfKl9UG3gyvX01U1ukA== =VvYp -END PGP SIGNATURE-
[Dovecot] Dovecot antispam plugin with virtual users
Hi, I'm running dovecot 1.2.11 with the antispam plugin 1.2+20090702-1+b1 installed from the debian repos (squeeze) and dspam 3.9.0+git20100416-1. Unfortunately this doesn't seem to work well with my virtual users, stored on a local openldap server: While sending mail manually to dspam does work, there's some trouble when trying to use the antispam plugin. I tried using both sendmail (exim4 in my case) and configuring antispam_mail_sendmail = /usr/bin/dspam to point to dspam, with similar results: exim: [15042] Failed to get user name for uid 5001 dspam: dspam[18961]: Unable to determine the runtime user both errors are reproducible by running exim/dspam with sudo -u \#5001 with 5001 being the virtual uid used of the user that is logged in through imap. Of course the uid 5001 is invalid for the rest of the system, so it can't run anything, but as far as I can tell the plugin uses this uid to call the respective programs :\ Now I was wondering if it was possible to keep the plugin from using the imap-uid and instead specifying one elsewhere? I guess this would be of fairly great interest for everyone using virtual users, be it ldap or anything else. Or is there a different way to do this? Do I maybe just miss setting a variable somewhere? Philipp
Re: [Dovecot] dovecot-antispam plugin and "Failed to call dspam" message
On Mon, 2009-06-15 at 13:27 -0700, Jeremy Doran wrote: > It certainly seems to be the 'verbose debug' information that DSpam > prints to stderr that triggers this. > > After testing with the patches from Marcin Rzepecki and Harlan Stenn, I > managed completely disabled these kind of lines from being sent: > > > Jun 13 15:35:18 stelleri imap: antispam: error: dspam returned <57397: > > [06/13/2009 15:35:18] query error: VERBOSE DEBUG (INFO ONLY - NOT AN > > ERROR): see sql.errors for more details > > > I then put in the unaltered FreeBSD ports version of the plugin, and no > longer got the "Failed to call dspam" messages. Ok. > Since these messages - even though non-zero and stating that they aren't > an error - are just informational, I'd think that it might be an idea to > have the plugin detect and ignore that. > > Turning on DSpam debugging should not (I should think) break the plugin > from working. Well, that's not trivial. I guess if dspam has now been fixed to always exit with a non-zero exit code we could remove the stderr checking code, or make it depend on a configuration option. But as it was when I wrote the code, dspam was broken enough for this to be absolutely necessary. johannes signature.asc Description: This is a digitally signed message part
Re: [Dovecot] dovecot-antispam plugin and "Failed to call dspam" message
Johannes Berg wrote: > Hi, > >> However, I know from looking at the dspam system.log file, the retraining >> actually happens - so it >> -does- appear to be calling dspam. It appears that the 'move' operation >> fails. > >> Plugin debug log when I attempt to move a message: >> Jun 13 09:29:07 stelleri imap: antispam: mailbox_is_unsure(SPAM): 0 >> Jun 13 09:29:07 stelleri imap: antispam: mailbox_is_trash(INBOX): 0 >> Jun 13 09:29:07 stelleri imap: antispam: mailbox_is_trash(SPAM): 0 >> Jun 13 09:29:07 stelleri imap: antispam: mail copy: from trash: 0, to trash: >> 0 >> Jun 13 09:29:07 stelleri imap: antispam: mailbox_is_spam(INBOX): 0 >> Jun 13 09:29:07 stelleri imap: antispam: mailbox_is_spam(SPAM): 1 >> Jun 13 09:29:07 stelleri imap: antispam: mailbox_is_unsure(INBOX): 0 >> Jun 13 09:29:07 stelleri imap: antispam: mail copy: src spam: 0, dst spam: >> 1, src unsure: 0 >> Jun 13 09:29:07 stelleri imap: antispam: /usr/local/bin/dspam --source=error >> --class=spam >> --signature=4a339984859385209328925 --deliver= --user frysco >> >> Associated log from dspam system.log: >> 1244903347 M 4a339984859385209328925 >> >> 0.066815frysco Retrained > > I have no idea what's going on, obviously, but please verify that the > above dspam command line > 1) exits with exit code 0 > 2) doesn't print anything to stderr > > Both of these are taken by the plugin as an indication that something > went wrong, because dspam's error reporting was _severely_ lacking at > the time I wrote the plugin. It might have improved in the meantime, I > have no idea. It certainly seems to be the 'verbose debug' information that DSpam prints to stderr that triggers this. After testing with the patches from Marcin Rzepecki and Harlan Stenn, I managed completely disabled these kind of lines from being sent: > Jun 13 15:35:18 stelleri imap: antispam: error: dspam returned <57397: > [06/13/2009 15:35:18] query error: VERBOSE DEBUG (INFO ONLY - NOT AN ERROR): > see sql.errors for more details > I then put in the unaltered FreeBSD ports version of the plugin, and no longer got the "Failed to call dspam" messages. Since these messages - even though non-zero and stating that they aren't an error - are just informational, I'd think that it might be an idea to have the plugin detect and ignore that. Turning on DSpam debugging should not (I should think) break the plugin from working. Thanks, -jcd
Re: [Dovecot] Dovecot Antispam plugin
On Mon, 2009-06-15 at 15:15 -0400, Timo Sirainen wrote: > On Mon, 2009-06-15 at 21:11 +0200, Johannes Berg wrote: > > > The problem is that the istream API doesn't work the way you expect. > > > Just reading doesn't advance the stream, only calling i_stream_skip() or > > > i_stream_seek() does that (and o_stream_send_istream() internally). So > > > just remove the o_stream_send(beginning) call and it'll work. > > > > Aha! I knew I was missing something, thanks. Does > > i_stream_read_next_line() skip over the line? > > Yes, that too. :) Great, thanks, so I'll just have to remove the else branch to make it work correctly. johannes signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Dovecot Antispam plugin
On Mon, 2009-06-15 at 21:11 +0200, Johannes Berg wrote: > > The problem is that the istream API doesn't work the way you expect. > > Just reading doesn't advance the stream, only calling i_stream_skip() or > > i_stream_seek() does that (and o_stream_send_istream() internally). So > > just remove the o_stream_send(beginning) call and it'll work. > > Aha! I knew I was missing something, thanks. Does > i_stream_read_next_line() skip over the line? Yes, that too. :) signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Dovecot Antispam plugin
On Mon, 2009-06-15 at 15:08 -0400, Timo Sirainen wrote: > On Mon, 2009-06-15 at 21:03 +0200, Johannes Berg wrote: > > Christian has reported an error to me on dovecot 1.0.7, where the > > following code: > > > > 199 if (i_stream_read_data(mailstream, &beginning, &size, 5) < 0 || > > 200 size < 5) { > .. > > 212 if (o_stream_send(outstream, beginning, 5) != 5) { > .. > > 221 if (o_stream_send_istream(outstream, mailstream) < 0) { > .. > > with a mailstream that start with "X-Spam-..." will result in a file > > stored that starts with "X-SpaX-Spam-...". I've read the above code many > > times now and tried to find a problem with it, but I don't see it -- > > could you help us? > > The problem is that the istream API doesn't work the way you expect. > Just reading doesn't advance the stream, only calling i_stream_skip() or > i_stream_seek() does that (and o_stream_send_istream() internally). So > just remove the o_stream_send(beginning) call and it'll work. Aha! I knew I was missing something, thanks. Does i_stream_read_next_line() skip over the line? johannes signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Dovecot Antispam plugin
On Mon, 2009-06-15 at 21:03 +0200, Johannes Berg wrote: > Christian has reported an error to me on dovecot 1.0.7, where the > following code: > > 199 if (i_stream_read_data(mailstream, &beginning, &size, 5) < 0 || > 200 size < 5) { .. > 212 if (o_stream_send(outstream, beginning, 5) != 5) { .. > 221 if (o_stream_send_istream(outstream, mailstream) < 0) { .. > with a mailstream that start with "X-Spam-..." will result in a file > stored that starts with "X-SpaX-Spam-...". I've read the above code many > times now and tried to find a problem with it, but I don't see it -- > could you help us? The problem is that the istream API doesn't work the way you expect. Just reading doesn't advance the stream, only calling i_stream_skip() or i_stream_seek() does that (and o_stream_send_istream() internally). So just remove the o_stream_send(beginning) call and it'll work. signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Dovecot Antispam plugin
Timo, Christian has reported an error to me on dovecot 1.0.7, where the following code: 199 if (i_stream_read_data(mailstream, &beginning, &size, 5) < 0 || 200 size < 5) { 201 ret = -1; 202 mail_storage_set_error(t->box->storage, 203ME(NOTPOSSIBLE) 204"Failed to read mail beginning"); 205 goto failed_to_copy; 206 } 207 208 /* "From "? skip line */ 209 if (memcmp("From ", beginning, 5) == 0) { 210 i_stream_read_next_line(mailstream); 211 } else { 212 if (o_stream_send(outstream, beginning, 5) != 5) { 213 ret = -1; 214 mail_storage_set_error(t->box->storage, 215ME(NOTPOSSIBLE) 216"Failed to write line to temp"); 217 goto failed_to_copy; 218 } 219 } 220 221 if (o_stream_send_istream(outstream, mailstream) < 0) { 222 ret = -1; 223 mail_storage_set_error(t->box->storage, 224ME(NOTPOSSIBLE) 225"Failed to copy to spool file"); 226 goto failed_to_copy; 227 } with a mailstream that start with "X-Spam-..." will result in a file stored that starts with "X-SpaX-Spam-...". I've read the above code many times now and tried to find a problem with it, but I don't see it -- could you help us? johannes signature.asc Description: This is a digitally signed message part
Re: [Dovecot] dovecot-antispam plugin and "Failed to call dspam" message
Hi, > However, I know from looking at the dspam system.log file, the retraining > actually happens - so it > -does- appear to be calling dspam. It appears that the 'move' operation fails. > Plugin debug log when I attempt to move a message: > Jun 13 09:29:07 stelleri imap: antispam: mailbox_is_unsure(SPAM): 0 > Jun 13 09:29:07 stelleri imap: antispam: mailbox_is_trash(INBOX): 0 > Jun 13 09:29:07 stelleri imap: antispam: mailbox_is_trash(SPAM): 0 > Jun 13 09:29:07 stelleri imap: antispam: mail copy: from trash: 0, to trash: 0 > Jun 13 09:29:07 stelleri imap: antispam: mailbox_is_spam(INBOX): 0 > Jun 13 09:29:07 stelleri imap: antispam: mailbox_is_spam(SPAM): 1 > Jun 13 09:29:07 stelleri imap: antispam: mailbox_is_unsure(INBOX): 0 > Jun 13 09:29:07 stelleri imap: antispam: mail copy: src spam: 0, dst spam: 1, > src unsure: 0 > Jun 13 09:29:07 stelleri imap: antispam: /usr/local/bin/dspam --source=error > --class=spam > --signature=4a339984859385209328925 --deliver= --user frysco > > Associated log from dspam system.log: > 1244903347 M 4a339984859385209328925 Specified> > 0.066815frysco Retrained I have no idea what's going on, obviously, but please verify that the above dspam command line 1) exits with exit code 0 2) doesn't print anything to stderr Both of these are taken by the plugin as an indication that something went wrong, because dspam's error reporting was _severely_ lacking at the time I wrote the plugin. It might have improved in the meantime, I have no idea. johannes signature.asc Description: This is a digitally signed message part
Re: [Dovecot] dovecot-antispam plugin and "Failed to call dspam" message
Note that according to dspam-exec.c, and info sent to stderr by dspam is treated by the antispam plugin as a fatal error. All my patch does is to provide enough information to see what the problem is. H
Re: [Dovecot] dovecot-antispam plugin and "Failed to call dspam" message
Marcin Rzepecki wrote: > Sat, Jun 13, 2009 at 07:34:49AM -0700, Jeremy Doran wrote: >> Hi, >> >> I had this working until I recently upgraded Dovecot, and now I'm getting a >> message back from >> Thunderbird of "Failed to call dspam." when I attempt to move a message into >> one of the designated >> spam folders. >> >> However, I know from looking at the dspam system.log file, the retraining >> actually happens - so it >> -does- appear to be calling dspam. It appears that the 'move' operation >> fails. >> [...] > > Hi Jeremy, > i've tried to figure it out some time ago. As you mentioned, dspam is > called ok, however error is still reported. > I'm applying following patch to avoid reporting error and all is working > great for me. I'm using dspam-devel version, but it should not make no > difference. > This did suppress the error and the move to the 'spam' mailbox succeeded. Though, it would be good to know why it trips over. Thanks, -jcd
Re: [Dovecot] dovecot-antispam plugin and "Failed to call dspam" message
Harlan Stenn wrote: > It is probably a good idea to figure out the underlying problem instead > of ignoring it. > > I use the following patch... Oh, I agree. The extra logging only produced these extra lines in the logs: > Jun 13 15:35:18 stelleri imap: antispam: mailbox_is_unsure(SPAM): 0 > Jun 13 15:35:18 stelleri imap: antispam: mailbox_is_trash(INBOX): 0 > Jun 13 15:35:18 stelleri imap: antispam: mailbox_is_trash(SPAM): 0 > Jun 13 15:35:18 stelleri imap: antispam: mail copy: from trash: 0, to trash: 0 > Jun 13 15:35:18 stelleri imap: antispam: mailbox_is_spam(INBOX): 0 > Jun 13 15:35:18 stelleri imap: antispam: mailbox_is_spam(SPAM): 1 > Jun 13 15:35:18 stelleri imap: antispam: mailbox_is_unsure(INBOX): 0 > Jun 13 15:35:18 stelleri imap: antispam: mail copy: src spam: 0, dst spam: 1, > src unsure: 0 > Jun 13 15:35:18 stelleri imap: antispam: /usr/local/bin/dspam --source=error > --class=spam --signature=4a339984859385209328925 --deliver= --user frysco > Jun 13 15:35:18 stelleri imap: antispam: error: dspam returned <57397: > [06/13/2009 15:35:18] query error: VERBOSE DEBUG (INFO ONLY - NOT AN ERROR): > see sql.errors for more details > > Jun 13 15:35:18 stelleri imap: antispam: error: dspam returned <57397: > [06/13/2009 15:35:18] query error: VERBOSE DEBUG (INFO ONLY - NOT AN ERROR): > see sql.errors for more details > Could the plugin be getting hung up on the 'verbose debug' messages that dspam seems to be insistent upon producing? (I'm not sure how to disable the writing to sql.errors) Thanks, -jcd
Re: [Dovecot] dovecot-antispam plugin and "Failed to call dspam" message
It is probably a good idea to figure out the underlying problem instead of ignoring it. I use the following patch... H patch-dspam-exec.c Description: Binary data
Re: [Dovecot] dovecot-antispam plugin and "Failed to call dspam" message
Sat, Jun 13, 2009 at 07:34:49AM -0700, Jeremy Doran wrote: > Hi, > > I had this working until I recently upgraded Dovecot, and now I'm getting a > message back from > Thunderbird of "Failed to call dspam." when I attempt to move a message into > one of the designated > spam folders. > > However, I know from looking at the dspam system.log file, the retraining > actually happens - so it > -does- appear to be calling dspam. It appears that the 'move' operation fails. > [...] Hi Jeremy, i've tried to figure it out some time ago. As you mentioned, dspam is called ok, however error is still reported. I'm applying following patch to avoid reporting error and all is working great for me. I'm using dspam-devel version, but it should not make no difference. #v+ --- dspam-exec.c.orig 2008-11-11 16:02:20.0 +0100 +++ dspam-exec.c2008-11-11 16:02:30.0 +0100 @@ -178,13 +178,14 @@ int ret = 0; while (item) { - if (call_dspam(item->sig, item->wanted)) { + /* if (call_dspam(item->sig, item->wanted)) { ret = -1; mail_storage_set_error(ctx->box->storage, ME(NOTPOSSIBLE) "Failed to call dspam"); break; - } + } */ + call_dspam(item->sig, item->wanted); item = item->next; } #v- Cheers, -- Marcin Rzepecki m.rzepecki(at)iem.pw.edu.pl
[Dovecot] dovecot-antispam plugin and "Failed to call dspam" message
Hi, I had this working until I recently upgraded Dovecot, and now I'm getting a message back from Thunderbird of "Failed to call dspam." when I attempt to move a message into one of the designated spam folders. However, I know from looking at the dspam system.log file, the retraining actually happens - so it -does- appear to be calling dspam. It appears that the 'move' operation fails. Here's my configuration: dovecot 1.1.16 (built from ports) dovecot-antispam 1.1 (tried from ports as well as unmodified source) dspam 3.6.8 (built from ports) FreeBSD 7.1 Relevant sections from dovecot.conf: protocol imap { mail_plugins = antispam mail_plugin_dir = /usr/local/lib/dovecot/imap ... } plugin { antispam_signature = X-DSPAM-Signature antispam_spam = SPAM;spam;Junk antispam_trash = Deleted Messages;Trash;INBOX.Trash antispam_dspam_binary = /usr/local/bin/dspam antispam_dspam_args = --deliver=;--user;%u ... } .config used by dovecot-antispam: DOVECOT=/usr/ports/mail/dovecot/work/dovecot-1.1.16 BACKEND=dspam-exec PLUGINNAME=antispam DEBUG=syslog DEBUG_VERBOSE=1 (I've tried it both with and without the DEBUG lines present in .config) Plugin debug log when I attempt to move a message: Jun 13 09:29:07 stelleri imap: antispam: mailbox_is_unsure(SPAM): 0 Jun 13 09:29:07 stelleri imap: antispam: mailbox_is_trash(INBOX): 0 Jun 13 09:29:07 stelleri imap: antispam: mailbox_is_trash(SPAM): 0 Jun 13 09:29:07 stelleri imap: antispam: mail copy: from trash: 0, to trash: 0 Jun 13 09:29:07 stelleri imap: antispam: mailbox_is_spam(INBOX): 0 Jun 13 09:29:07 stelleri imap: antispam: mailbox_is_spam(SPAM): 1 Jun 13 09:29:07 stelleri imap: antispam: mailbox_is_unsure(INBOX): 0 Jun 13 09:29:07 stelleri imap: antispam: mail copy: src spam: 0, dst spam: 1, src unsure: 0 Jun 13 09:29:07 stelleri imap: antispam: /usr/local/bin/dspam --source=error --class=spam --signature=4a339984859385209328925 --deliver= --user frysco Associated log from dspam system.log: 1244903347 M 4a339984859385209328925 0.066815frysco Retrained Any help appreciated, Thanks, -jcd