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

Re: Running a shell command while saving messages to mailboxes



> I'm not entirely up to speed on maildir, so the "cur" may be wrong,
> but what about a cron job doing something like this? (Assuming bash.)

Thanks for this idea. It is not exactly what I was looking for, but it
is for sure an excellent alternative, if there is no better solution.
The drawback of this approach is the cron job (or some files it would
read data from) would have to be modified each time a new maildir is
added or removed.

> to get really fancy you could even write something to parse your mutt
> configuration files and extract a list of mailboxes from there.

Well IMHO, this will not work, at least not for me.
The reason is, IIRC, the mailboxes you declare in mutt's configuration
files are those mutt has to check for new mails. But I personnaly have
mailboxes not declared in the .muttrc.
Indeed, there are some mails I like having in my spool file, and saving
myself in appropriate places.

However, I just got an idea which might solve the problem:
I read my mails using fetchmail/procmail. So I could ask procmail to
pipe all messages spamassassin does not recognize as spam through
sa-learn --ham before sorting them. I could then use mutt's S binding to
re-learn these messages to spamassassin as spam, cancelling the action
--ham had.

What do all of you tRhing about this strategy ?

Thanks,
Sébastien.