Re: Filtering emails in ~/Maildir
On Sat, Dec 20, 2003 at 04:36:46PM -0000, demslh wrote:
> I've jsut setup a Debian unstable box as an email server. It uses
> fetchmail to pull emails from several different pop3 accounts, which
> passes the emails to exim4, which dumps them in ~/Maildir
> I then pick up the emails using courier-imap server and an imap client.
>
> What i want to do now is filter the emails in the maildir into different
> folders.
> For instance:
> i want anything from debian-user@lists.debian.org to go into
> inbox/debian-user
> anything from my local LUG, to go in the inbox/lug folder, and so on.
>
> whats the best way of doing this? i've been trawling the net for over an
> hour, and i'm now more confused than i was to start with.
Use exim filters. The rules go in your .forward file.
Here is what I have for the debian list:
------------------------------------------
# Exim filter
if $header_to: contains "debian" then
save $home/Maildir/.debian/
finish
endif
----------------------------------------
If you have "create_directory = true"
in the local_delivery section of exim.conf
then your new Maildir's will automatically
be created.
You can read about exim filters here:
/usr/share/doc/exim/filter.txt.gz
Andy
Reply to: