My work email has migrated to M$ Exchange Server, with M$ Outlook Web Access. Eurgh. No more POP3 retrieval to my GMail account.
I restored sanity using an Ubuntu server as follows. Needless to say, this requires that (a) the exchange server allows IMAP access and (b) the SMTP server for your machine will relay mail outside of your domain.
Updated: to do it all via procmailrc, without .forward
Updated: to poll folders other than Inbox
- Install fetchmail and edit /etc/fetchmailrc:
- Make /etc/fetchmailrc look something like this:
sudo apt-get install fetchmail
sudo nano -w /etc/fetchmailrc
set daemon 300
poll your.exchange.server protocol imap username “user” password “pass” smtpname “user@gmail.com” ssl
replacing your.exchange.server, user (exchange), pass (exchange) and user@gmail.com (your GMail) as appropriate.
To poll folders other than “Inbox”, you can append the “poll” line in fetchmailrc with the term “folder” and a comma-separated list of names, e.g.:
poll your.exchange.server protocol imap username “user” password “pass” smtpname “user@gmail.com” ssl folder “Junk E-mail”,”Inbox”
Just in case a real mail slipped into your Exchange junk.
Then:
sudo chmod 600 /etc/fetchmailrc
Finally:
sudo /etc/init.d/fetchmail start
and “tail -f /var/log/mail.log” to make sure that all is OK. You can also try “fetchmail -v” first and look for output similar to that given by this handy guide.
I found your tip extremely useful, thanks a lot!
M.
Hey — this looks great, and I would like to use it, but I don’t think that I have the mail server set up properly on my local ubuntu machine. Do you know of any guides to do this? Thanks!
Try Google, or the Ubuntu community documentation.
Does UQ have IMAP turned on? Do you know the server address?
“John Doe”: It does and I do. exchange.uq.edu.au works for me.
I think you have a local stalker ;-]
:) yeah, what’s with the anonymity?
hahaha, don’t check my ip. I’m in the building!!.. Or next door..
Thank you very much for the very useful tip!
Our local university has also switched to Exchange, and I can’t stand it…