top curve

Mail System

The mailing system within the CS department is a multi-step process in which mail is filtered and passed through various programs to deliver the correct mail to the person to whom it belongs. Several steps are taken to eliminate as much SPAM as is possible.

Sendmail Child

The Sendmail child is where the whole process starts. Sendmail is initialized by a message from an outside MTA (Mail Transfer Agent) which routes the mail to our system. This Sendmail child simultaneously activates the relaying check as well as mail.log.

Mail.log

When you log-in to a MUA (Mail User Agent), like Outlook or Netscape, a record of your IP address is recorded in the mail.log. This creates a listing of valid IP addresses which are accepted as sources of emails. Mail.log is scanned periodically by poprelayd.

Poprelayd

Poprelayd can be found in /etc/mail/poprelayd. Poprelayd takes the addresses from mail.log and keeps a listing of current IP addresses from which emails will be allowed to emanate. This file changes with each scan of mail.log. One IP address is valid for 720 mins (12 hours). This means that logging in to a MUA client once will establish a valid source of emails for 12 hours after signing in. For example, if you were to sign on to your email and then leave it up for the weekend, when you went to send an email on Sunday afternoon, your IP address would not be on the mail.log listing. What is the significance of this? Poprelayd is accessed during the relaying check.

For more information on poprelayd and to view the code, see the Poprelay Home Page.

Relaying Check

This is the point of the process where poprelayd is used. Popip.db is run when the relaying check is initiated. Popid.db checks to see if the mail that was received has a matching address in the poprelayd list. Since the poprelayd list is updated so often, this check eliminates the emails with false senders.

Sendmail Milter #1

At this point, the message is sent to Miltrassassin. "Miltrassassin is a sendmail milter, to connect sendmail to the spamd from the spamassassin package. The milter is multithreaded and implements the spamd protocol version 1.2 for tcp connection to spamd." During this process, the message is examined and given a SPAM score. What happens to the message from here is based on the level on which its SPAM score lies. If given a score below 20, nothing is done the message and it is passed on to the next step. If given a score greater than 20, headers containing the SPAM level and status are inserted. "Miltrassassin is lightweight because it does not support body substitution, but users can [still] choose between 3 options for the spam report which is added to the message header." If a SPAM score happens to be greater than 50, the title "[Likely SPAM]" is inserted in the subject line.

A .pdf file is available for those who would like more exhaustive information about avmilter.

Delivery Routing

After the message has gone through all of this filtering, it is routed to the correct destination. This is done by first accessing two user files: /etc/aliases and the .forward file.

/etc/aliases

This file is exactly what it sounds like. If a message comes in addressed to an alias, this file is checked to see where the message should be routed to. Within this file is a list of aliases paired with the address of where they want to be sent. If the alias is found in the file the message is sent to the main address, if an alias is not in the list the message is bounced back. Please see our requesting aliases page to have an alias setup for you.

.forward

The .forward file is another file that gets referenced during the routing of an email. If a .forward exists in a profile, the mail system opens it and forwards the email from the original address to the one(s) in the .forward file.

For more in-depth information about /etc/aliases and .forward, or to learn how to configure your own settings, see the manpage for aliases

Child Exits

The mail has now gone through all of our processing steps. It should now be at the desired location and the sendmail child is done with the message.