Naefen Raphaël
2006-Sep-23 14:52 UTC
[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
Timo Sirainen
2006-Sep-23 15:40 UTC
[Dovecot] Need to detect event: a user move a message to a “spam folder” (for antispam filter)
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. -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 186 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20060923/83cf5c9f/attachment.bin>
Peter Fern
2006-Sep-25 12:02 UTC
[Dovecot] Need to detect event: a user move a message to a “spam folder” (for antispam filter)
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).Search the list archives, this has been implemented before...