On Montag, 30. April 2007 11:02 Aleksander wrote:
> > What comes to my mind now: When a user moves a message from SPAM to
> > inbox, it would be nice to be able to do something directly. For
> > example, insert a markup in a table with the message_idnr, so that
> > we know we have to do this. Running a cron job every 5 minutes
> > could then just search within that table and process everything. Or
> > is searching for all marked messages cheap in terms of DB costs?
>
> I think you've misunderstood how the patch works. We do not mark
> messages in dbmail_messages or elsewhere. When a message is moved
> from or to a spam folder, a row indicating the message_idnr and
> direction (moved "from" or "to" the spamfolder) is added to an
> additional table called dbmail_cplogs.
>
> That's all what dbmail does, everything else including keeping this
> table clean is up to an external script.

Yes, you insert some data somewhere, I called this "to mark the 
message". 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.

> > 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. But we
> > should know about messages that have been already manually changed
> > by the user (eg. a SPAM that was moved to Inbox), because it can
> > happen that even after re-learning it's still recognised as SPAM.
> > That would move the message to the SPAM folder again, which must
> > not happen.
> > So we should be able to find out if a message was manually changed.
> > If it was marked as HAM, but filters still think it's SPAM, we
> > could then copy that e-mail to our SPAM department, who could have
> > a look into it and improve filters.
> > A very great opportunity to semi-automatically improve the filters,
> > right?
>
> Well it's possible to do that with the current patch I guess. 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.
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.

> To sum up, your idea is to mark messages as spam in dbmail (not only
> in message headers), while this patch simply logs which messages were
> moves and in which direction. Correct?

I think I should answer no here. The message is marked as SPAM, but in 
mailheaders, not dbmail.

> 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

Now you can easily search for messages to recheck (which were checked 
within the last 24 hours), or only messages where 4.5 < points < 7 
(messages near the 5 points SPAM limit), or whatever else you need.

mfg zmi
-- 
// Michael Monnerie, Ing.BSc    -----      http://it-management.at
// Tel: 0676/846 914 666                      .network.your.ideas.
// PGP Key:         "curl -s http://zmi.at/zmi.asc | gpg --import"
// Fingerprint: EA39 8918 EDFF 0A68 ACFB  11B7 BA2D 060F 1C6F E6B0
// Keyserver: www.keyserver.net                   Key-ID: 1C6FE6B0

Attachment: pgpj4I94omXU5.pgp
Description: PGP signature

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

Reply via email to