Dovecot LDA, Offlineimap and Sieve
lists+offimap at protozoic.com
Fri Jun 22 01:40:15 BST 2012
On Jun 22, 2012 at 01:13 AM +0100, Johnny wrote:
>You mean, you fetch the mail via offlineimap, and then send it back to
>a single folder on the server and when fetching it with getmail retrieve
>it through Sieve? Or is is sendmail going through Sieve?
Yeah I was unclear there :)
Here's what goes on. I have a couple folders on my IMAP server. All
but one are synced with offlineimap, including INBOX, Sent, Drafts, and
some other relevant folders (work, etc.) The only one that isn't synced
is 'MailingLists'. Mail is sorted into all of these folders by the
server side sieve implementation - my imap server provides that. For
example, all mailing list mail, identified by a couple generic filters
(look for list-id headers, etc), gets put into the 'MailingLists'
On my laptop, offlineimap syncs all the folders but MailingLists. Then,
I run getmail which only retrieves mail from MailingLists. That dumps
retrieved messages into Dovecot LDA/sieve, running locally, which sorts
my mail according to specfic mailing lists and dates. For example, this
mailing list goes into a maildir 'lists/offlineimap-2012'.
So... There are two instances of sieve running. One on the server,
doing a rough sort, which gets email out of my inbox that I don't want
to have to deal with on my phone. offlineimap syncs the bulk of my
folders. Then, getmail gets the last folder and sends it through the
second instance of sieve, which sorts mail locally.
It's a bit overboard, but seems to work. If you didn't mind storing ALL
of your mail in your IMAP folders, then server side filtering is
definitely the way to go. I used to get a LOT of mailing list mail
which I didn't want stored permanently on IMAP, which is how I arrived
at my current setup. I've also looked into filtering with imapfilter
and maildirproc - both nice programs but Dovecot seems to work best for
me. imapfilter filters email remotely on the server. maildirproc
watches over local maildirs and sorts there. offlineimap works with
either, but might have to sync mail in one direction or another after
the filtering is done.
Hope that makes sense. Let me know if anything doesn't.
More information about the OfflineIMAP-project