[Dovecot] Need to detect event: a user move a message to a “spam folder” (for antispam filter)
I’m writing an immune system based antispam filter. I need to detect when a user move a message to her spam folder (to inform the filter). I
I found “cmd_copy” in imap library so I detect the copy event. But at this level I wasn’t able to find info about which mail and which user copy this message.
My question is: Were I can find user Info to know how is moving this message in the spam folder. Ideally if I can have information about message (content or id) will be perfect.
Thanks
On 23.9.2006, at 17.52, Naefen Raphaël wrote:
I’m writing an immune system based antispam filter. I need to detect when a user move a message to her spam folder (to
inform the filter).
I guess I really should write a generic plugin which does this...
I I found “cmd_copy” in imap library so I detect the copy event. But
at this level I wasn’t able to find info about which mail and which
user copy this message.
The username is currently easiest to get with getenv("USER"). It's
guaranteed to contain the username.
As for the mail, there's the struct mail which is filled by each
mailbox_search_next() call, so you can use it to ask anything you
need about the message. See struct mail and mail_*() functions in
lib-storage/mail-storage.h. For example mail->uid gives you its uid,
mail_get_first_header() some header etc.
participants (3)
-
Naefen Raphaël
-
Peter Fern
-
Timo Sirainen