Re: Filtering mail in Mutt
RenX99 <renx99@earthlink.net> wrote:
>I am relatively new to debian and currently I have Mutt
>set up to recieve my email. The MTA I have running is exim
>and I am fetching mail with fetchmail.
>
>Here's my problem, I get a lot of mail and need to filter it
>into different folders but I am having problems figuring it out.
If you're using exim, try its built-in filter files. They're described
in /usr/share/doc/exim/filter.txt.gz, and are really quite easy to use
(much more so than procmail, I found).
My .forward file, with a lot of stuff cut out of the middle for clarity,
looks like this:
# Exim filter
# Catchall for bounce messages
if error_message then finish endif
# root and news/usenet go to separate mailboxes
if $h_to: contains root@riva.ucam.org then
save $home/mail/root-inbox
elif $h_to: contains news@riva.ucam.org or
$h_to: contains usenet@riva.ucam.org or
$h_subject: BEGINS "riva daily usenet report" then
save $home/mail/news-inbox
# Debian mailing lists. Try to be robust-ish here ...
elif $h_x-mailing-list contains "@lists.debian.org" then
pipe "/usr/bin/mailtonews"
[...]
endif
# Otherwise save to the main inbox
if not delivered then
save $home/mail/inbox
endif
--
Colin Watson [cjw44@flatline.org.uk]
Reply to: