[Dovecot] How do I get my mail from fetchmail into dovecot?
I have dovecot (with squirrel mail etc.) running without any problems but cannot understand how to get e-mail from a pop server into dovecot. I have fetchmail configured to pick up the mail from the pop3 server but don't understand how to get it from there into my dovecot mbox structure.
New to mail servers!
Thanks,
Michael.
On Wed, Apr 29, 2009 at 4:46 PM, Michael Steinbeck-Reeves < michael@steinbeck-reeves.uk.com> wrote:
I have dovecot (with squirrel mail etc.) running without any problems but cannot understand how to get e-mail from a pop server into dovecot. I have fetchmail configured to pick up the mail from the pop3 server but don't understand how to get it from there into my dovecot mbox
Where does fetchmail put the e-mails? Point dovecot there with "mail_location =..." then use your favorite MuA to access the e-mail.
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254733744121/+254722743223
"Clothes make the man. Naked people have little or no influence on society." -- Mark Twain
On Wednesday 29 April 2009 15:46:05 Michael Steinbeck-Reeves wrote:
I have dovecot (with squirrel mail etc.) running without any problems but cannot understand how to get e-mail from a pop server into dovecot. I have fetchmail configured to pick up the mail from the pop3 server but don't understand how to get it from there into my dovecot mbox structure.
My advice: forget Fetchmail and use Getmail [1] instead. Getmail does everything Fetchmail does, only better. The documentation is excellent, the author (and mailinglist) very responsive should you run into problems you can't seem to solve on your own and I believe there exist a number of HOWTOs on how to setup Getmail with Dovecot. Not that it's very difficult, though.
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:
~/.getmail/remote_imap_server.rc:
[options] verbose = 0 read_all = false
[retriever] type = SimpleIMAPSSLRetriever server = address_of_remote_imap_server username = username_on_remote_server password = password_on_remote_server
[destination] type = MDA_external path = /usr/local/libexec/dovecot/deliver
The destination part tells getmail to call the "deliver" program (without any commandline options) with the retrieved message. Dovecot then does the rest.
HTH
Andreas
[1] http://pyropus.ca/software/getmail/ [2] http://dovecot.org/pipermail/dovecot/2009-March/038074.html [3] http://img394.imageshack.us/img394/6148/mailhamster.png
Andreas Ntaflos Vienna, Austria
GPG Fingerprint: 6234 2E8E 5C81 C6CB E5EC 7E65 397C E2A8 090C A9B4
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
participants (4)
-
Andreas Ntaflos
-
Michael Steinbeck-Reeves
-
Odhiambo ワシントン
-
Phill Edwards