NOTE - DO NOT FOLLOW THE INSTRUCTIONS ON THIS PAGE. This program is BUGGY, UNSUPPORTED and a VERY POOR CHOICE
Fully supported, secure and non-buggy email forwarding or download can now be achieved using IMAP and fetchmail (or another IMAP client). See the separate page on this site for more information on fetchmail specifically.
Accessing ITS emails via a CompSoc account
If you have a CompSoc Toast account, then you have a matching e-mail account on the server. It can give you much more features and freedom than the seperate exchange/durham.ac.uk e-mail account such as downloading mail using your favourite program.
Please be clear that means two seperate e-mail accounts, on this page we will refer to them in the following way:
- exchange (account) - managed by ITS, your username is something like d8abcd and e-mail like firstname.lastname@example.org/dur.ac.uk
- (compsoc) toast (account) - managed by the CompSoc admins. Username is your compsoc account name (e.g. fred) and e-mail address e.g. email@example.com
To access/read/view/send your CompSoc toast mail you...
- SSH onto toast and use one of the programs
- enter mail(really basic, good to test), press q to quit.
- pine and mutt are other programs installed.
- Download your mail using your favourite mail client (Outlook, Thunderbird, Evolution, etc.) via IMAP (port 993) or POP3 (port 995):
- Server: compsoc.dur.ac.uk
- Username/password: Your Compsoc/Toast login details (as in firstname.lastname@example.org)
- Security: SSL, don't use secure authentication
- Note that the certificate will be from pitta, which is toast (before it's cooked?).
Forwarding all exchange/durham mail
If you're going to use your Toast account then you probably want all the exchange e-mails being forwarded so you don't have to check that. These instructions are a bit long but they keep the headers intact so hitting 'reply' still goes to the person who sent it. Oh yes, usual disclaimer: this software works for me and seems to work for some other toast users too, but if it eats all your email we can't be held responsible for it.
Split off the e-mails
- Login to exchange using Outlook Web Access(owa) (must be in Internet Explorer so you have premium features) at http://exchange.dur.ac.uk
- Right click on the top level folder(your name), and create a new folder. We shall name the folder exfix, work out the instructions if you use a different name.
- Near the very bottom left click Rules and set up a new one that will put mail into this new folder.
- We want to forward all our mail, so all the options should be blank except at the end select 'Forward it to the specified folder', click 'specified folder' to change that to exfix.
- Save and close
A similar folder on your toast account
- SSH into your toast account, and create and edit a file .exfix (note the filename starts with a dot, that means it's a hidden/special file).
- One way is to enter vi .exfix then press i to be in edit mode of the vi editor, now type the following.
owaHost exdurf.dur.ac.uk owaPort 443 owaFolder exfix efUserAgent Mozilla/4.0 (compatible; MSIE 6.0; Exfix) owaUser d98675 owaPass Password owaAuth Basic localAddress email@example.com envelopeFrom firstname.lastname@example.org smtpHost compsoc.dur.ac.uk
- Note: the separator between the keys and the values is 'tab'. Obviously change owaUser/owaPass (above: d98675/Password) to your exchange/ITS details, and user in the last few lines to your CompSoc/Toast username.
- To save in vi press Esc, :, w, Enter, then enter :q to quit the editor.
- Then enter chmod 600 .exfix to give the right file permissions.
Moving files from exchange to toast
- Make sure there are some e-mails in the exfix folder on exchange (move an e-mail there using owa or send yourself a mail).
- Using your ssh access to toast enter /usr/local/bin/exfix3, then check your toast mail you should have the e-mails there.
- A simple way to check is to enter mail, and see if you have mail. Type q to quit the mail program.
- If that doesn't work, ask (the CompSoc/Toast admins) for help.
Automate the moving
Now it's working we want to run that script automatically.
- enter crontab -e
- like vi editor press i to edit
- add a new line (the # line is a comment) as the following:
*/20 * * * * /usr/local/bin/exfix3
- press Esc then enter :w and :q to save/quit.
- It should say crontab: installing new crontab if you did it right.
- You just added a cron job to run exfix3 every 20 minutes, you can read more about cron job writing to change the timing.
Notes about the forwarding
- The e-mails processed by exfix get moved to the Exchange/OWA's 'Deleted Items' folder.
- So you can get e-mails out of there if something breaks.
- Empty it out now and then to avoid reaching your ITS disk space limit.
- The forwarding uses its own envelope "from" and "to" fields. There unfortunately seems to be no way to retrieve the originals from Exchange. Naturally the 'Received' lines will be added to by the forwarding process too. These points are probably only important if you're doing relatively complex spam-filtering.
Last edit: Sun 21st Nov, 05:11 p.m.