petterg Guru
Joined: 25 Mar 2004 Posts: 500 Location: Oslo, Norway
|
Posted: Sun Feb 16, 2014 4:04 am Post subject: Dovecot antispam plugin never trigger dspam |
|
|
I have a new installation of dspam + dovecot + antispamplugin.
But the only sign I see of the plugin working is when dovecot log level is set to debug, I get this logentry:
Code: | Feb 16 03:25:53 localhost dovecot: imap: Debug: Module loaded: /usr/lib64/dovecot/lib90_antispam_plugin.so
|
There is no sign in the dspam log that dspam is triggered when moving mail to/from the spam folder. I suspect that the plugin lack some permissions to execute commands.
In an attempt to debug I made the following script:
Code: |
~ # cat /usr/bin/dspam-debug
#!/bin/bash
echo "$(whoami)" $@ done >> /temps/debug/dspam-debug
/usr/bin/dspam $@
|
and modified the plugin config to trigger the script rather than dspam:
Code: |
~ # cat /etc/dovecot/conf.d/90-plugin.conf
plugin {
antispam_backend = dspam
antispam_allow_append_to_spam = YES
antispam_signature = X-DSPAM-Signature
antispam_signature_missing = error
antispam_trash = trash;Trash;Deleted Items; Deleted Messages
antispam_spam = Spam
antispam_dspam_binary = /usr/bin/dspam-debug
antispam_dspam_args = --user;%Lu;--source=error;--signature=%%s
antispam_dspam_spam = --class=spam
antispam_dspam_notspam = --class=innocent
antispam_dspam_result_header = X-DSPAM-Result
}
|
The intention is that the plugin should trigger the script, which should write the parameters and executing username to a file.
The debug script has permission 777. But the dovecot plugin apparently never triggers the debug script. So I guess it never triggers dspam either when the setting is set for that.
If I set
Code: |
antispam_backend = somefake
|
there is an error logged every time a mail is moved in/out of the spam folder.
From this I think the plugin is running, but it doesn't trigger any commands. How can I debug this? |
|