<<< Date Index >>>     <<< Thread Index >>>

Re: Running a shell command while saving messages to mailboxes



Am 2004-12-16 11:24:57, schrieb Sébastien Hinderer:
> Dear all,
> 
> Is it possible to pipe a message throuhh a shell command when saving it
> to a mailbox ?
> The aim is to feed spamassassin automatically with all ham messages as
> soon as they are saved to a milbox which is not =spam.
> This would avoid having to call sa-learn regularly on several mailboxes,
> which is anyway something non-trivial (atleast for me) as soon as
> mailboxes ar stored in maildir format.

Ehm, wehre is the problem ?

Use 

find $HOME/Maildir/ -type f -mtime -1 -exec sa-learn --ham {} ';'

and run it from cronjob daily.
Better is it, if you make a script, which create a list of files
which are in "cur" and not in "tmp" and "new" because they are not
checked by you. 

This will work, even if your procmail/maildrop filter already SPAM
because they go automaticly into "new".

> Any help sincerely appreciated.
> Many thanks in advance,
> Sébastien.

Greetings
Michelle

-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/ 
Michelle Konzack   Apt. 917                  ICQ #328449886
                   50, rue de Soultz         MSM LinuxMichi
0033/3/88452356    67100 Strasbourg/France   IRC #Debian (irc.icq.com)

Attachment: signature.pgp
Description: Digital signature