[Dovecot] antispam plugin problem with dspam
I'm trying to use the dovecot antispam plugin with dspam.
I'm running dovecot 1.1.2.
Using thunderbird and IMAP, when I drag a spam message from the inbox into the SPAM folder, I get a popup saying "The current command did not succeed. The mail server responded: antispam signature not found.
When I look at the message in the maildir folder, I see the dspam signature both in the header of the message and at the end of the body.
What's a good way to debug this situation and figure things out? I'm not seeing anything in any log files, and I'm not seeing much in the way of debug capability in the dovecot antispam plugin.
Harlan
Would it be better if the antispam plugin logged whatever stderr output came from the dspam invocation?
H
Harlan Stenn wrote:
I'm trying to use the dovecot antispam plugin with dspam.
I'm running dovecot 1.1.2.
Using thunderbird and IMAP, when I drag a spam message from the inbox into the SPAM folder, I get a popup saying "The current command did not succeed. The mail server responded: antispam signature not found.
When I look at the message in the maildir folder, I see the dspam signature both in the header of the message and at the end of the body.
What's a good way to debug this situation and figure things out? I'm not seeing anything in any log files, and I'm not seeing much in the way of debug capability in the dovecot antispam plugin.
save the message to a file and pass it to dspam on the console.
Harlan Stenn schrieb:
I'm trying to use the dovecot antispam plugin with dspam.
I'm running dovecot 1.1.2.
Using thunderbird and IMAP, when I drag a spam message from the inbox into the SPAM folder, I get a popup saying "The current command did not succeed. The mail server responded: antispam signature not found.
When I look at the message in the maildir folder, I see the dspam signature both in the header of the message and at the end of the body.
What's a good way to debug this situation and figure things out? I'm not seeing anything in any log files, and I'm not seeing much in the way of debug capability in the dovecot antispam plugin.
Harlan
Hi!
I have the same problem right now. I tripple checked all the config files. First, I was using dovecot 1.1.1 (which could not work, as I read in the archives), then tried it with 1.1.3 and now with version 1.1.2. I have a virtual mail setup with postfix, mysql, dspam, amavis-new, clamav and spamassassin.
The problem seems that the antispam plugin cannot run the dspam binary, although its path is properly specified (in my case on DragonFlyBSD in /usr/pkg/bin/dspam). With debug to syslog all variables are shown in as they should.
The plugin also reacts when I try to move the spam-mail to the Spam folder. (I redefined the SPAM-folder to be called Spam)
If I reassamble the command on the shell (I need to add --user dl@pless... to the command with the signature) , dspam retrains the message in its database.
So it seems that dovecot seemed not to be able to run dspam. I enabled a shell (temporarly) for dovecot and run dspam from there, and it succeeded. It just doesn't work from the plugin.
What could I check next? I really like the idea behind the plugin and would like have it working.
I am using the antispam git-version from 7. Sept. 2008.
Thanks in advance Damian
So it seems that dovecot seemed not to be able to run dspam. I enabled a shell (temporarly) for dovecot and run dspam from there, and it succeeded. It just doesn't work from the plugin.
What could I check next? I really like the idea behind the plugin and would like have it working.
I really don't know what to tell you. This doesn't seem to be an issue with my plugin at all, so how am I supposed to help you? Have you ran dspam from the user that dovecot actually runs the imap binary as, whatever uid your userdb/passdb returns?
johannes
I got it working.
Here are the problems I fixed, and it would have been *lots* easier if the dovecot antispam plugin had better error/debug logging.
Johannes, I can work on a patch for the following if you prefer, and I'd much rather spend my time getting ntp-4.2.6 out the door.
Getting this working would have been lots easier if the dovecot-antispam package would:
- build dspam-exec's argv before the fork so it can be fully and cleanly reported in the debug log
- If there is a problem, report WIFEXITED(status) and WEXITSTATUS(status)
- if the execv fails, log an error message, noting dspam_binary, strerror(errno) and the uid/gid
If you want to be thorough about it I recommend logging an error whenever any system call fails.
The current freebsd ports tools offer postfix, dovecot, dovecot-antispam, and dspam in a way that they do not play nicely together.
The antispam plugin cannot exec the dspam binary. Choices include figuring out what user/group are needed (dspam is suid root, executable by the root or the mail group only, and dovecot will exec it as virtual/virtual), or opening up the execute privs on the dspam executable.
The dspam.conf file will need a "Trust virtual" line in it.
There might have been something else.
Having said all this, I really appreciate the dovecot antispam plugin.
H
Harlan Stenn schrieb:
I got it working.
I got it, too! :-)
The antispam plugin cannot exec the dspam binary. Choices include figuring out what user/group are needed (dspam is suid root, executable by the root or the mail group only, and dovecot will exec it as virtual/virtual), or opening up the execute privs on the dspam executable.
I needed to add vmail (the dovecot/postfix virtual user) to dspam's group in /etc/group: dspam:*:[group id]:vmail
The dspam.conf file will need a "Trust virtual" line in it.
and this did probably the trick, too.
There might have been something else.
Having said all this, I really appreciate the dovecot antispam plugin.
As I do :-)
Thanks for help, Damian
participants (4)
-
Damian Lubosch
-
Harlan Stenn
-
Johannes Berg
-
mouss