On Tuesday 21 July 2009 22:54:21 Hugo Mills wrote:
> Let's say I have an IMAP mail server that stores all my mail in a
> particular context. I don't have any control over the server itself --
> just access as a user.
>
> Does anyone know of anything I can use to filter my inbox on the
> IMAP server into different mailboxes on the same IMAP server --
> preferably without downloading and re-uploading the mails in
> question. If it supports sieve (RFC5228) rules, so much the better.
>
> I want to keep all my mails on that server -- not download them to
> some other machine, as I want to access them from a wide variety of
> places, and to take advantage of central backups.
>
> I use mutt as a mail client, so answers of the style "just set up
> rules in Thunderbird" will be ignored... :)
>
> Hugo.
Hugo,
I think you've already hit the obvious one... Sieve. just create a .sieve file
in your home directory and job done. An extract from mine is:
require "fileinto";
# Hantslug e-mails
if header :contains "To" "hampshire" {
fileinto "INBOX.HantsLUG";
}
You will also need to pipe the mail through something that understands sieve.
In my case, dovecot, I use a .forward file with the following:
" | "/usr/lib/dovecot/deliver" "
Of course, you could write your own mail parser, and enable it from
the .forward file. I use Exim & Dovecot, but it should be pretty simililar
for other setups.
Cheers,
Tim B.
--
OpenPilot - Open-source Marine Chart Plotter
Lead Developer
http://openpilot.sourceforge.net