[Dovecot] plugin problem
Lars Stavholm
stava at telcotec.se
Sun Sep 30 10:30:54 EEST 2007
Johannes Berg wrote:
> On Sat, 2007-09-29 at 17:03 +0200, Lars Stavholm wrote:
>
>> Well, I don't have a signature "in my hand" (when executing
>> the dspam.c code) since i don't use it, I didn't look for it,
>> and didn't retrieve it, so I would need another way of
>> identifying the recipient.
>
> Actually only setups that use virtual users need the uid-in-signature
> option, usually you can use the user who logged in to dovecot, I
> personally rely on the system user being right.
Sounds about right.
>> The problem is that with the dspam setup I'm using, i.e. 3.8.0,
>> Hash driver, shared group, etc. I usually get "signature not
>> found",
>
> The message from my plugin? I'm guessing then there's some problem with
> your setup and you didn't configure dspam to put the signature into the
> header?
I definitely have a dspam setup problem, never got the
signatures working with the hash drive.
> Anyway, I don't recommend training from pristine because of the resource
> overhead and it being hard to guarantee the message is indeed pristine,
> but if it suits you I can't stop you from doing it :)
Well, the resource overhead is there, that's for sure,
but I don't think it's that significant. In the beginning
for a new user there will be some reclassification but in
the long run, dspam misses very few spams. I've reached
+99% accuracy in a few months (for a single user, myself).
But, of course you're right, with signature is better.
However, I'm slowly getting there with the dspam plugin.
Input Options
-------------
The plugin input options was easy, it seems that dovecot
simply puts the options line into an env variable that
can be read with the getenv() call, e.g.:
dovecot.conf:
...
protocol imap {
mail_plugins = dspam
}
plugin {
# dspam path ':' spam folder ':' [no]signature ':' ignore
dspam = /usr/sbin/dspam:Spam:signature:Trash
}
...and in the dspam plugin code I simply parse the result
from getenv("DSPAM") and there's the input options.
In a future version one might add the ability to ignore
more than one folder.
Processing
----------
I've tried to setup dspam with hash drive and signatures,
to no avail, I just can't get it to work, dspam does not
find the signature in the storage area. Don't know why.
Does anyone have a dspam.conf you could share with me?
Possibly dspam build options as well?
Another (mildly stupid maybe) question: why the fork()
in the original dspam plugin? Seems to me that the fork()
+ waitpid() doesn't really allow for any advantage over
a simple popen() and read the output? I have a sneaky
feeling that I'm missing something vital here.
Cheers
/Lars
More information about the dovecot
mailing list