I myself have such a "mail hamster" setup running just fine, which I mentioned a few weeks ago on this list [2]. You might find that post helpful.
The general idea is to use Getmail to poll the remote mail servers (I poll two POP servers and three IMAP-SSL servers), retrieve messages, optionally scan them for viruses and spam and then hand them over to your local Dovecot server using Dovecot's LDA "deliver". See [3] for a nice picture :) If you skip virus and spam scanning the configuration for a single remote IMAP server boils down to:
Thanks for that - really useful post. I've been using fetchmail for ages which gets the amil and uses Procmail to apply some processing rules and deliver the messages to the appropriate folders. But I'll check Getmail now. I've been running procmail for years and have recently been toying with the idea of replacing that with dovecot-sieve but have been a bit reluctant to mess with things. But I'd also like to get Open-Xchange up and running and this requires sieve so that's why I'm looking at replacing Procmail.
Great to hear someone's done it already and put together some nice documentation.
Regards, Phill