On 6-May-2009, at 06:50, Karsten Bräckelmann wrote:
On Wed, 2009-05-06 at 01:43 -0600, ɹןʇnqן wrote:
The trouble appears to me to be that sa-learn has no concept of
whether or not it has learned a message or not.  Since all IMAP
messages are stored with unique names, is there some easy way to
create a cache of the messages it has checked and have it ignore those
messages?

SA does know about mail it already learned. However, for various reasons
it is *not* based on the file name. An obvious reason would be support
for mbox format.

Yes, but that is a different flag --mbox.

:)  And auto-learning before the mail has been passed
on to the MDA. Then there's the problem that even with Maildir format,
file names (think flags) are not guaranteed to remain static...

The last few characters will change, but I don't think the rest of the name changes. That is, the mail file named "1241641613.40384_0.mail.covisp.net:2," is always going to be named that, with maybe one or two additional characters after the ,, no matter where I move it. the first part is the epoch time followed by 5 random characters

To determine if a mail already has been learned, SA needs to have a look
at the mail.

Mightn't it be helpful if it could keep a cache of filenames?

I suppose I could do something like:

find $HOME/Maildir/.SPAM/{cur,new} -type f -ctime -1 -exec /usr/ local/
bin/sa-learn --spam {} \;

Something like that, yes. It definitely makes sense to 'find' the
messages delivered since the last sa-learn run. That line however is
*way* too inefficient, spawning an sa-learn Perl process for each
message.

Ah, yes.  good point.

find $HOME/Maildir/.SPAM/{cur,new} -type f -ctime -1 -exec mv {} /tmp/ $USER/.junk


--
Space Directive 723: Terraformers are expressly forbidden
        from recreating Swindon.

Reply via email to