Rob Klingsten
2008-Nov-05 15:03 UTC
[Dovecot] Another dovecot-antispam plugin can't call dspam
Hi folks - I am configuring a new system and the antispam plugin is the last piece I need, everything else is working. Thanks to Johannes for this plugin, it's exactly what I want and an elegant solution for filter training. But I've been trying everything I can think of for the last 3 days to get this to work, no success. I've got: Postfix 2.5.3, dspam 3.8.0, Dovecot 1.1.6, Maildrop 2.0.4 and dovecot-antispam 1.0 tarball. I've built dspam from source with --disable-trusted-user-security to try and isolate the source of the plugin problem, which is the message at the IMAP client "Failed to call dspam." Here's what I've got configured for the plugin: antispam_signature = X-DSPAM-Signature antispam_trash = trash;Trash;Deleted Items;Deleted Messages antispam_spam = SPAM;Spam antispam_dspam_binary = /usr/local/bin/dspam antispam_dspam_args = --user %u And here's what happens: Nov 5 09:31:29 venus imap: antispam: plugin initialising (1.0-notgit) Nov 5 09:31:29 venus imap: antispam: "trash" is trash folder Nov 5 09:31:29 venus imap: antispam: "Trash" is trash folder Nov 5 09:31:29 venus imap: antispam: "Deleted Items" is trash folder Nov 5 09:31:29 venus imap: antispam: "Deleted Messages" is trash folder Nov 5 09:31:29 venus imap: antispam: "SPAM" is spam folder Nov 5 09:31:29 venus imap: antispam: "Spam" is spam folder Nov 5 09:31:29 venus imap: antispam: no unsure folders Nov 5 09:31:29 venus imap: antispam: dspam binary set to /usr/local/bin/dspam Nov 5 09:31:29 venus imap: antispam: dspam extra arg --user dump-capability Nov 5 09:31:29 venus imap: antispam: signature header line is "X-DSPAM-Signature" Nov 5 09:31:29 venus dovecot: Dovecot v1.1.6 starting up Nov 5 09:31:29 venus dovecot: auth-worker(default): mysql: Connected to 127.0.0.1 (postfix) Nov 5 09:31:30 venus dovecot: auth(default): new auth connection: pid=686 Nov 5 09:31:30 venus dovecot: auth(default): new auth connection: pid=687 Nov 5 09:31:30 venus dovecot: auth(default): new auth connection: pid=688 Nov 5 09:32:45 venus dovecot: auth(default): client in: AUTH 1 PLAIN service=imap lip=xxxx rip=xxxx lport=143 rport=55904 Nov 5 09:32:45 venus dovecot: auth(default): client out: CONT 1 Nov 5 09:32:45 venus dovecot: auth(default): client in: CONT<hidden> Nov 5 09:32:45 venus dovecot: auth-worker(default): sql(rob at xxxx.org,xxxx): query: SELECT password, email AS user FROM users WHERE email = 'rob at xxxx.org'; Nov 5 09:32:45 venus dovecot: auth(default): client out: OK 1 user=rob at xxxx.org Nov 5 09:32:45 venus dovecot: auth(default): master in: REQUEST 1 688 1 Nov 5 09:32:45 venus dovecot: auth(default): master out: USER 1 rob at xxxx.org uid=5000 gid=5000 home=/var/mail/xxxx.org/rob Nov 5 09:32:45 venus dovecot: imap-login: Login: user=<rob at xxxx.org>, method=PLAIN, rip=xxxx, lip=xxxx Nov 5 09:32:45 venus dovecot: auth(default): new auth connection: pid=688 Nov 5 09:32:45 venus dovecot: IMAP(rob at xxxx.org): Loading modules from directory: /usr/lib/dovecot/imap Nov 5 09:32:45 venus dovecot: IMAP(rob at xxxx.org): Module loaded: /usr/lib/dovecot/imap/lib90_antispam_plugin.so Nov 5 09:32:45 venus dovecot: IMAP(rob at xxxx.org): Effective uid=5000, gid=5000, home=/var/mail/xxxx.org/rob Nov 5 09:32:45 venus imap: antispam: plugin initialising (1.0-notgit) Nov 5 09:32:45 venus imap: antispam: "trash" is trash folder Nov 5 09:32:45 venus imap: antispam: "Trash" is trash folder Nov 5 09:32:45 venus imap: antispam: "Deleted Items" is trash folder Nov 5 09:32:45 venus imap: antispam: "Deleted Messages" is trash folder Nov 5 09:32:45 venus imap: antispam: "SPAM" is spam folder Nov 5 09:32:45 venus imap: antispam: "Spam" is spam folder Nov 5 09:32:45 venus imap: antispam: no unsure folders Nov 5 09:32:45 venus imap: antispam: dspam binary set to /usr/local/bin/dspam Nov 5 09:32:45 venus imap: antispam: dspam extra arg --user rob at xxxx.org Nov 5 09:32:45 venus dovecot: IMAP(rob at xxxx.org): maildir: data=/var/mail/xxxx.org/rob Nov 5 09:32:45 venus dovecot: IMAP(rob at xxxx.org): maildir++: root=/var/mail/xxxx.org/rob, index=, control=, inbox=/var/mail/xxxx.org/rob Nov 5 09:32:45 venus imap: antispam: signature header line is "X-DSPAM-Signature" Nov 5 09:32:45 venus imap: antispam: mailbox_is_unsure(Spam): 0 Nov 5 09:32:45 venus imap: antispam: mailbox_is_trash(INBOX): 0 Nov 5 09:32:45 venus imap: antispam: mailbox_is_trash(Spam): 0 Nov 5 09:32:45 venus imap: antispam: mail copy: from trash: 0, to trash: 0 Nov 5 09:32:45 venus imap: antispam: mailbox_is_spam(INBOX): 0 Nov 5 09:32:45 venus imap: antispam: mailbox_is_spam(Spam): 1 Nov 5 09:32:45 venus imap: antispam: mailbox_is_unsure(INBOX): 0 Nov 5 09:32:45 venus imap: antispam: mail copy: src spam: 0, dst spam: 1, src unsure: 0 Can anyone give me some more suggestions? thanks! Rob Klingsten -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 5631 bytes Desc: S/MIME Cryptographic Signature URL: <http://dovecot.org/pipermail/dovecot/attachments/20081105/ed7fdd3b/attachment-0002.bin>
Johannes Berg
2008-Nov-05 15:09 UTC
[Dovecot] Another dovecot-antispam plugin can't call dspam
On Wed, 2008-11-05 at 10:03 -0500, Rob Klingsten wrote:> Hi folks - > > I am configuring a new system and the antispam plugin is the last piece > I need, everything else is working. Thanks to Johannes for this plugin, > it's exactly what I want and an elegant solution for filter training. > But I've been trying everything I can think of for the last 3 days to > get this to work, no success. > > I've got: Postfix 2.5.3, dspam 3.8.0, Dovecot 1.1.6, Maildrop 2.0.4 and > dovecot-antispam 1.0 tarball. I've built dspam from source with > --disable-trusted-user-security to try and isolate the source of the > plugin problem, which is the message at the IMAP client "Failed to call > dspam." > > Here's what I've got configured for the plugin:hmm. I wonder if there's a bug in debugv(), can you comment that call out in dspam-exec.c? johannes -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20081105/892f57e0/attachment-0002.bin>
Thorsten Vollmer
2008-Nov-05 15:20 UTC
[Dovecot] Another dovecot-antispam plugin can't call dspam
On Wed, 2008-11-05 at 10:03 -0500, Rob Klingsten wrote:> Hi folks - > > I am configuring a new system and the antispam plugin is the last piece > I need, everything else is working. Thanks to Johannes for this plugin, > it's exactly what I want and an elegant solution for filter training. > But I've been trying everything I can think of for the last 3 days to > get this to work, no success. > > I've got: Postfix 2.5.3, dspam 3.8.0, Dovecot 1.1.6, Maildrop 2.0.4 and > dovecot-antispam 1.0 tarball. I've built dspam from source with > --disable-trusted-user-security to try and isolate the source of the > plugin problem, which is the message at the IMAP client "Failed to call > dspam." > > Here's what I've got configured for the plugin: > > antispam_signature = X-DSPAM-Signature > antispam_trash = trash;Trash;Deleted Items;Deleted Messages > antispam_spam = SPAM;Spam > antispam_dspam_binary = /usr/local/bin/dspam > antispam_dspam_args = --user %uDoes adding a semicolon help? antispam_dspam_args = --user;%u> And here's what happens: > > Nov 5 09:31:29 venus imap: antispam: plugin initialising (1.0-notgit) > Nov 5 09:31:29 venus imap: antispam: "trash" is trash folder > Nov 5 09:31:29 venus imap: antispam: "Trash" is trash folder > Nov 5 09:31:29 venus imap: antispam: "Deleted Items" is trash folder > Nov 5 09:31:29 venus imap: antispam: "Deleted Messages" is trash folder > Nov 5 09:31:29 venus imap: antispam: "SPAM" is spam folder > Nov 5 09:31:29 venus imap: antispam: "Spam" is spam folder > Nov 5 09:31:29 venus imap: antispam: no unsure folders > Nov 5 09:31:29 venus imap: antispam: dspam binary set to > /usr/local/bin/dspam > Nov 5 09:31:29 venus imap: antispam: dspam extra arg --user dump-capability > Nov 5 09:31:29 venus imap: antispam: signature header line is > "X-DSPAM-Signature" > Nov 5 09:31:29 venus dovecot: Dovecot v1.1.6 starting up > Nov 5 09:31:29 venus dovecot: auth-worker(default): mysql: Connected to > 127.0.0.1 (postfix) > Nov 5 09:31:30 venus dovecot: auth(default): new auth connection: pid=686 > Nov 5 09:31:30 venus dovecot: auth(default): new auth connection: pid=687 > Nov 5 09:31:30 venus dovecot: auth(default): new auth connection: pid=688 > Nov 5 09:32:45 venus dovecot: auth(default): client in: AUTH 1 > PLAIN service=imap lip=xxxx rip=xxxx lport=143 rport=55904 > Nov 5 09:32:45 venus dovecot: auth(default): client out: CONT 1 > Nov 5 09:32:45 venus dovecot: auth(default): client in: CONT<hidden> > Nov 5 09:32:45 venus dovecot: auth-worker(default): > sql(rob at xxxx.org,xxxx): query: SELECT password, email AS user FROM users > WHERE email = 'rob at xxxx.org'; > Nov 5 09:32:45 venus dovecot: auth(default): client out: OK 1 > user=rob at xxxx.org > Nov 5 09:32:45 venus dovecot: auth(default): master in: REQUEST > 1 688 1 > Nov 5 09:32:45 venus dovecot: auth(default): master out: USER 1 > rob at xxxx.org uid=5000 gid=5000 > home=/var/mail/xxxx.org/rob > Nov 5 09:32:45 venus dovecot: imap-login: Login: user=<rob at xxxx.org>, > method=PLAIN, rip=xxxx, lip=xxxx > Nov 5 09:32:45 venus dovecot: auth(default): new auth connection: pid=688 > Nov 5 09:32:45 venus dovecot: IMAP(rob at xxxx.org): Loading modules from > directory: /usr/lib/dovecot/imap > Nov 5 09:32:45 venus dovecot: IMAP(rob at xxxx.org): Module loaded: > /usr/lib/dovecot/imap/lib90_antispam_plugin.so > Nov 5 09:32:45 venus dovecot: IMAP(rob at xxxx.org): Effective uid=5000, > gid=5000, home=/var/mail/xxxx.org/rob > Nov 5 09:32:45 venus imap: antispam: plugin initialising (1.0-notgit) > Nov 5 09:32:45 venus imap: antispam: "trash" is trash folder > Nov 5 09:32:45 venus imap: antispam: "Trash" is trash folder > Nov 5 09:32:45 venus imap: antispam: "Deleted Items" is trash folder > Nov 5 09:32:45 venus imap: antispam: "Deleted Messages" is trash folder > Nov 5 09:32:45 venus imap: antispam: "SPAM" is spam folder > Nov 5 09:32:45 venus imap: antispam: "Spam" is spam folder > Nov 5 09:32:45 venus imap: antispam: no unsure folders > Nov 5 09:32:45 venus imap: antispam: dspam binary set to > /usr/local/bin/dspam > Nov 5 09:32:45 venus imap: antispam: dspam extra arg --user rob at xxxx.org > Nov 5 09:32:45 venus dovecot: IMAP(rob at xxxx.org): maildir: > data=/var/mail/xxxx.org/rob > Nov 5 09:32:45 venus dovecot: IMAP(rob at xxxx.org): maildir++: > root=/var/mail/xxxx.org/rob, index=, control=, inbox=/var/mail/xxxx.org/rob > Nov 5 09:32:45 venus imap: antispam: signature header line is > "X-DSPAM-Signature" > Nov 5 09:32:45 venus imap: antispam: mailbox_is_unsure(Spam): 0 > Nov 5 09:32:45 venus imap: antispam: mailbox_is_trash(INBOX): 0 > Nov 5 09:32:45 venus imap: antispam: mailbox_is_trash(Spam): 0 > Nov 5 09:32:45 venus imap: antispam: mail copy: from trash: 0, to trash: 0 > Nov 5 09:32:45 venus imap: antispam: mailbox_is_spam(INBOX): 0 > Nov 5 09:32:45 venus imap: antispam: mailbox_is_spam(Spam): 1 > Nov 5 09:32:45 venus imap: antispam: mailbox_is_unsure(INBOX): 0 > Nov 5 09:32:45 venus imap: antispam: mail copy: src spam: 0, dst spam: > 1, src unsure: 0 > > Can anyone give me some more suggestions? > > thanks! > > Rob Klingsten-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 489 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20081105/8823a3ea/attachment-0002.bin>
Hi Johannes,> From: Johannes Berg <johannes at sipsolutions.net> >> > I just committed a fix to debugv(), can you try that? If you downloaded >> > the tarball, get this one: >> > http://git.sipsolutions.net/?p=dovecot-antispam.git;a=snapshot;h=HEAD;sf=tgz >> > >> > If you can confirm that works I'll make a new release. >> >> The fixed version works perfectly, thank you very much! > > And it prints the full command line to the syslog, I assume? Thanks for > testing!It solves the problem here as well =) Thanks for the update. Do you plan to implement 'out of band' dspam calling? BTW maybe there is no need for a separate 'queue' folder especially as we only need a message signature. I think it can be stored in some buffer array so as the dspam calls are made i.e. during idle time (or during final cleanup at the latest). Also I am attaching a couple of patches that might be useful. dspam-exec.c.patch adds debug-dumping of the dspam reply (it turned out quite useful not only for the stack corruption problem). Makefile.patch fixes the syntax to compile with gmake under FreeBSD 6.1 and also adjusts the installed plugin permissions. Best wishes Eugene -------------- next part -------------- A non-text attachment was scrubbed... Name: patch-genie.tgz Type: application/octet-stream Size: 714 bytes Desc: not available URL: <http://dovecot.org/pipermail/dovecot/attachments/20081105/973ca143/attachment-0002.obj>