Mail System


Important Notes

1. To reduce abuse (spamming) of the all@bii-sg.org mailing list, this mailing list may only be used from within BII. If you are sending mail to this mailing list from outside the BII network, it will be silently dropped without notifying you.

2. You cannot use BII SMTP servers to relay mail for you when you are outside the BII network. If you want to send mail from home to non-BII addresses, you must configure your Email client to use SMTP authentication and provide your BII username/password.

Overview

BII's mail system is based on Qmail and customized/modified in various locations to suit our needs. This webpage is meant to give you a better understanding of the BII email system's architecture. We hope that with a clearer picture of how the various components are interconnected, users will be able to make best use of the capabilities (or limitations) of our Email infrastructure. The general process of mail delivery can be summarised below:

Stage What happens
1.

A user from the Internet (or from within BII) sends mail. The mail is received by the server smtp.bii.a-star.edu.sg. The user's email client has finished transmitting the mail and its job is now complete.

2.

The mail is now held in the queue while Qmail decides on how to perform delivery. For example, a single mail may have many multiple receipients, some within BII, some outside of BII.

3a.

Qmail needs to perform a delivery to an external site. If the mail delivery is successful, its job is complete. If the delivery failed with a temporary error (eg, network down), Qmail will attempt to delivery for up to 1 week. If there is a permanent error (eg, invalid destination address), Qmail gives up. The user receives a bounced mail message.

3b. The mail is delivered to a BII user's account. Each mail is stored as an individual file in directory $HOME/Maildir/new. If the user has exceeded the quota, Qmail will retry the delivery for up to 1 week.
4c. A POP service allows email clients to retrieve mail from the user's $HOME/Maildir directory. The POP over SSL service does the same job.
4b. An IMAP service allows email clients to retrieve mail from the user's $HOME/Maildir (almost similar to POP). However, the IMAP protocol has many more features than POP, for example it allows for various mail folders to be stored on the server. The IMAP over SSL service does the same job.
4a. BII's webmail service is actually an IMAP to web interface. The user's interactions with the webmail interface are translated to IMAP calls. Thus the webmail interface will always be slower than using a mail client which directly communicates with IMAP or POP.

Customizing Your Mail Delivery

  1. Users may configure the Qmail system to handle their incoming mails from a text file $HOME/.qmail. The default user account is configured with the following lines in .qmail

      |/var/qmail/bin/dot-forward .forward
      |/campus/apps/sun4u/bin/spamc -d spamassassin.bii-sg.org -s 8192 |/campus/sys/scripts/spam_folders Spam
    
    The first line reads a .forward file in the users' home and forwards incoming messages according to sendmail-style instructions if it exists. The second line routes the mail to SpamAssassin for checking and then checks the mail for spam tagging and dumps it into a Spam folder if a spam tag is present.
  2. Users are free to modify this file. However care must be taken as incorrect use of this file can cause loss to all your mails. Each line in this file is treated as a mail delivery instruction. The following examples illustrate common scenerios on how users can customize Qmail's delivery to their account.

    1. You do NOT want any of your emails to be stored in your account. Instead, you want them ALL to be forwarded to your Yahoo account joe@yahoo.com. Create a $HOME/.qmail file with exactly 1 line.

        joe@yahoo.com

    2. You want a copy of all emails sent to your Yahoo account joe@yahoo.com. Create a $HOME/.qmail file with exactly 2 lines in it.

        ./Maildir/
        joe@yahoo.com

Vacation message

  1. To enable vacation messages, we make use of 3 additional packages. dot-forward, qmail-vacation and a vacation plugin for squirrelmail.

    1. dot-forward is an addition to qmail which allows .forward style files in your home directory.
    2. qmail-vacation is a vacation replacement which is specifically for qmail. qmail-vacation stores who it has sent the vacation message to for a default 1 week. During this time it will not resend to the same address.
      To customise the vacation message, edit the .vacation.msg file. Enter "Subject: " as the first line of your .vacation.msg followed by your message body.
    3. vacation plugin for squirrelmail makes use of ftp to upload the required files to the users' home directory to enable vacation message.
  2. To enable vacation message manually, do the following:
    (replace <username> with your username)

    1. Look at your .qmail, make sure it has this:
      |/var/qmail/bin/dot-forward .forward
      |/campus/apps/sun4u/bin/spamc -d spamassassin.bii-sg.org -s 8192 |/campus/sys/scripts/spam_folders Spam
      
    2. Change your .forward file to this
      "|/campus/apps/sun4u/bin/vacation <username>"
      \<username>
      
    Otherwise look
    here

Getting rid of SPAM

  1. All BII mailboxes use SpamAssassin - a tool that recognises spam, and tags mail, which is subsequently moved to a 'Spam' folder. To configure your email account to use SpamAssassin, add the following line to your .qmail file.

      |/campus/apps/sun4u/bin/spamc -d spamassassin.bii.a-star.edu.sg -s 8192 |/campus/sys/scripts/spam_folders Spam

  2. SpamAssassin uses heuristic analysis to determine if an email is a spam. If it decides that a mail is spam, the mail header is tagged to indicate spam, and the spam_folders script then delivers this mail to your Spam folder.
  3. IMPORTANT!!!: Your 'SPAM' folder will NOT be visible if your are using POP to download the mail onto your PC. Either switch to IMAP or use webmail to check in on your 'SPAM' folder once in awhile. The AI in SpamAssassin is not 100% fullproof so you may want to check that legitimate mails are not being thrown into your 'SPAM' folder. Email in your 'SPAM' folder also takes up space, so you should delete them to ensure your disk quota is not exceeded.
  4. Mozilla, Seamonkey and Thunderbird (Mozilla's email-client) now have built in intelligent email filters which you can 'teach' to recognise spam and other junk mails. You can download mozilla and thunderbird from a local mirror.