Originally posted by Netizen
Sounds like you need to check out fetchmail....
You set the script to run at every 5 minutes if you want and then it will download the mail to your local mailbox.
Fetchmail does seem to be what I want. Unfortunately, it's not exactly what I want. I've been reading alot about this, and I know exactly what I want to do now. I am still stumped as to how to go about doing it.
I want to:
1) Connect to a remote POP3/IMAP server
2) Download all the messages present to a local .maildir, and delete them from the remote server
3) Make the messages available from my machine via a local IMAP server
4) Give myself a web frontend to read the messages
I know how to do 3 and 4 with courier-imapd and squirrelmail respectively.
What eludes me however is how to do 1 and 2. I'm trying to figure out if I can do this with fetchmail. However, from what I understand fetchmail will pick up the mail but wants to rebroadcast it to a SMTP server. I don't quite know of a SMTP server that will allow me to dump messages into local maildirs. I have ssmtp on my machine, but that only seems good to forward to another machine's MTA. Sendmail seems too much of a behemoth for me to configure. I had postfix installed briefly, but don't quite know how to set it up to do what I want either.
Can anyone help?