On 2013-12-03 07:42, Thomas Raschbacher wrote:
hi
I was just wondering what would be the best way to fetch mails from a
remote imap server (ISP in our case) and then store or deliver them
locally (i do not trust our connection here to make this server the MX
for the domain so I rather fetch the 2 mailboxes from the server)?
First thing that came to mind was fetchmail but I'm not completely
sure if that is the best option. Is anyone else doing something like
this, and if so how do you do it?
I just wanted to add this to the wiki but it seems it is still in
read-only mode (or I am too blind to find an edit button).
Anyway so I got this sorted out now and thought I post it here instead
so if anyone needs it they can find it at least.
The whole thing is really simple actually.
Here's an example fetchmailrc:
set syslog
set daemon 30
poll mail.myisp.com protocol IMAP
user address1@***** is ****@***** here
password ********
fetchall
ssl
lmtp
smtphost localhost/24
this is the production version already.
For testing I'd suggest to comment out the first 2 lines and instead run
it as a user with "fetchmail -v"
Also useful for testing is if you add 'keep' to the parameters and maybe
set "fetchlimit 1" making it something like this:
#set syslog
#set daemon 30
poll mail.myisp.com protocol IMAP
user address1@***** is ****@***** here
password ********
fetchlimit 1
keep
ssl
lmtp
smtphost localhost/24
also useful is "fetchmail -c" which helps test config (and passwords)
without fetching.
Last but not least don't forget to chmod 0700 this config file !!!
Hope this helps someone. And maybe I'll write a blog post and/or wiki
entry when I get time /can edit the wiki ;)
Regards
_______________________________________________
DBmail mailing list
[email protected]
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail