fetchmail

To configure fetchmail to read your Exchange mailbox (@tue.nl address), do the following:

  1. Create a file called .fetchmailrc in your home directory, and make sure it isn't readable for others:
    $ touch ~/.fetchmailrc
    $ chmod go-rwx ~/.fetchmailrc
    
  2. Open this file with your editor, and enter the following (substituting the correct username and password):
    # set daemon 120
    set invisible
    poll webmail.tue.nl auth password protocol imap username "username" password "password" ssl
    
  3. To test, run fetchmail from the command line: $ fetchmail -v. If fetchmail is set up correctly, you will see its conversation with the Exchange mail server. It will look something like this:
    fetchmail: 6.3.6 querying webmail.tue.nl (protocol IMAP) at Wed 07 Feb 2007 12:23:32 PM CET: poll started
    Trying to connect to 131.155.4.27/143...connected.
    fetchmail: IMAP< * OK Microsoft Exchange Server 2003 IMAP4rev1 server version 6.5.7638.1 (webmail3.campus.tue.nl) ready.
    fetchmail: IMAP> A0001 CAPABILITY
    fetchmail: IMAP< * CAPABILITY IMAP4 IMAP4rev1 IDLE LOGIN-REFERRALS MAILBOX-REFERRALS NAMESPACE LITERAL+ UIDPLUS CHILDREN
    fetchmail: IMAP< A0001 OK CAPABILITY completed.
    fetchmail: webmail.tue.nl: opportunistic upgrade to TLS failed, trying to continue
    fetchmail: IMAP> A0002 NOOP
    fetchmail: IMAP< A0002 OK NOOP completed.
    ..... more lines ....
    fetchmail: IMAP< * BYE Microsoft Exchange Server 2003 IMAP4rev1 server version 6.5.7638.1 signing off.
    fetchmail: IMAP< A0007 OK LOGOUT completed.
    fetchmail: 6.3.6 querying webmail.tue.nl (protocol IMAP) at Wed 07 Feb 2007 12:23:32 PM CET: poll completed
    fetchmail: normal termination, status 1
    
  4. To test whether you can receive new mail, send an email to your @tue.nl address, and then run fetchmail once more (do allow a few minutes for the email to arrive at your Exchange mailbox). The email should now arrive in your regular Linux mailbox.
  5. To make sure that fetchmail continues to run on your Linux machine even after a reboot, edit your crontab:
    $ crontab -e
    and add a line to it:
    @reboot /usr/bin/fetchmail
  6. Finally, remove the # from the first line of the ~/.fetchmailrc file, so that the program will run in the background. Then restart fetchmail once more. It will not output anything, but it will continue to run, fetching your Exchange mail and forwarding it to your Linux account.

You can find more information about various other ways to configure fetchmail at it's homepage.


Contact us | Webmaster

Questions? Mail to helpdesk.win@tue.nl