Michael Monnerie wrote:
Yes, you insert some data somewhere, I called this "to mark the message".

Ok.

But instead of (or in addition to) this INSERT, one could call an external script, which marks or de-marks this message (I mean a true rewrite), so the content of the message is overwritten with the result. Example: the subject "penis enlargement" would become "[SPAM] penis enlargement", etc.
If you did that, you would lose the message itself, spamassasin/dspam wouldn't have the information for relearning. Well it might be a problem. I would prefer to keep the message with it's headers pristine, X-DBMail-PhysMessage-ID being the last modification.

I think I didn't explain it good: A message arrives, is recognized
by SA as SPAM, and moved into the SPAM box. The user moves it to
Inbox, via cron we learn the message as HAM.
Overnight, another cron job re-scans all messages from today. Like
this, it may find SPAM or a virus that wasn't found before.

You actually rescan all messages daily for viruses and spam, all of them?

Btw,
how do currently feed messages to antispam/virus agents, via IMAP or
do export them, get the message via sql directly?

Currently via IMAP, and without rewriting, just for learning.
OK, on one install I do dbmail-export on spam folders which is then given to sa-learn.

I'd like to rewrite messages, and I think the best would be a small standard script to do this:
dbmail-readmessage(message_idnr)
-> should output a message to stdout
dbmail-rewritemessage(message_idnr)
-> overwrite existing message with new content (rewritten headers or whatever)

Does such a method/script exist now? I guess no.
It wouldn't be too hard to do I guess.

I have to admit that tagging messages in dbmail as spam etc is
interesting, it does open up a few more possibilities.

I totally agree here: When we insert new columns into dbmail_messages, the SPAM state of the message could be saved. It should contain points (like from SpamAssassin) and the timestamp from when it was checked:
// for postgres:
points NUMERIC(5,2)
checktime TIMESTAMP DEFAULT current_timestamp NOT NULL

I'm not sure if points etc should be there too, sounds like duplicating the dspam database to me. With sa it might help, I'm not too familiar with it.

Sorry for not responding earlier,

Alex
_______________________________________________
DBmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail

Reply via email to