Difference between revisions of "Mail"

From CSCWiki
Jump to navigation Jump to search
(document mail setup)
Line 1: Line 1:
Configuring your mail client with our systems:
+
== Reading your mail ==
  
== ''Pine'' ==
+
You can use any user agent that support maildir locally (mutt, alpine, etc), and any client that support POP3 or SMTP either locally or remotely. We also have [http://mail.csclub.uwaterloo.ca/ webmail].
  
You must create a ~/.pinerc file that contains the following:
+
Here are the details:
  
smtp-server=caffeine.csclub.uwaterloo.ca/novalidate-cert
+
* maildir
 +
** Location: $HOME/.maildir/
 +
 
 +
* POP3
 +
** Hostname: caffeine.csclub.uwaterloo.ca
 +
** SSL encryption required
 +
** Port: 995
 +
 
 +
* IMAP
 +
** Hostname: caffeine.csclub.uwaterloo.ca
 +
** SSL encryption required
 +
** Port: 993
 +
 
 +
== Technical Details ==
 +
 
 +
=== Mail Transfer (Incoming) ===
 +
 
 +
[http://www.postfix.org/ Postfix] is our MTA and runs on caffeine. Incoming mail is received inbound on smtp/25 or ssmtp/465 and goes through a sequence of filters before being delivered to users.
 +
 
 +
We are using the following filters for incoming mail, to combat spam and malware:
 +
 
 +
* ClamAV via ClamSMTP
 +
* zen.spamhaus.org RBL
 +
* Greylisting with postgrey
 +
 
 +
The latter two reject truckloads of spam, preventing them from reaching your inbox. The former helps keep us from passing malware along. Greylisting adds a delay to mail delivery from unknown servers, but after a small number of successes they will be auto-whitelisted. If that isn't good enough, ask systems-committee@csclub.uwaterloo.ca to whitelist all mail to your address.
 +
 
 +
=== Mail Delivery ===
 +
 
 +
User mail is delivered, by default, to procmail. This is configurable by adding a comma-separated list of destinations in $HOME/.forward. See aliases(5) for more details.
 +
 
 +
Procmail, in turn, writes mail to $HOME/.maildir unless instructed otherwise. You can customize procmail by editing $HOME/.procmailrc. See procmailrc(5) for more details.
 +
 
 +
==== Failures ====
 +
 
 +
If you are out of quota or another error occurs writing to your home directory, procmail will deliver your message to /var/mail/$USER on the mail server. If that too fails, caffeine is probably on fire. The message will be returned to the queue where it will eventually bounce.
 +
 
 +
=== Mail Retrieval ===
 +
 
 +
We use [http://www.dovecot.org Dovecot] as a POP3 and IMAP server. It reads the messages from $HOME/.maildir, so if you have procmail deliver elsewhere they will not work for you.
 +
 
 +
=== Mail Submission (Outgoing) ===
 +
 
 +
On caffeine, outgoing mail is submitted directly to Postfix via sendmail(1) wrapper or on submission/587 and then queued for delivery to its destination. The other systems do have sSMTP, which relays mail through caffeine immediately without any queue or daemon.
 +
 
 +
A cron job on caffeine makes a hash table out of /etc/hosts, and any address present in the table will be able to relay mail. Systems must be added to /etc/hosts before sSMTP will function.

Revision as of 01:02, 7 November 2007

Reading your mail

You can use any user agent that support maildir locally (mutt, alpine, etc), and any client that support POP3 or SMTP either locally or remotely. We also have webmail.

Here are the details:

  • maildir
    • Location: $HOME/.maildir/
  • POP3
    • Hostname: caffeine.csclub.uwaterloo.ca
    • SSL encryption required
    • Port: 995
  • IMAP
    • Hostname: caffeine.csclub.uwaterloo.ca
    • SSL encryption required
    • Port: 993

Technical Details

Mail Transfer (Incoming)

Postfix is our MTA and runs on caffeine. Incoming mail is received inbound on smtp/25 or ssmtp/465 and goes through a sequence of filters before being delivered to users.

We are using the following filters for incoming mail, to combat spam and malware:

  • ClamAV via ClamSMTP
  • zen.spamhaus.org RBL
  • Greylisting with postgrey

The latter two reject truckloads of spam, preventing them from reaching your inbox. The former helps keep us from passing malware along. Greylisting adds a delay to mail delivery from unknown servers, but after a small number of successes they will be auto-whitelisted. If that isn't good enough, ask systems-committee@csclub.uwaterloo.ca to whitelist all mail to your address.

Mail Delivery

User mail is delivered, by default, to procmail. This is configurable by adding a comma-separated list of destinations in $HOME/.forward. See aliases(5) for more details.

Procmail, in turn, writes mail to $HOME/.maildir unless instructed otherwise. You can customize procmail by editing $HOME/.procmailrc. See procmailrc(5) for more details.

Failures

If you are out of quota or another error occurs writing to your home directory, procmail will deliver your message to /var/mail/$USER on the mail server. If that too fails, caffeine is probably on fire. The message will be returned to the queue where it will eventually bounce.

Mail Retrieval

We use Dovecot as a POP3 and IMAP server. It reads the messages from $HOME/.maildir, so if you have procmail deliver elsewhere they will not work for you.

Mail Submission (Outgoing)

On caffeine, outgoing mail is submitted directly to Postfix via sendmail(1) wrapper or on submission/587 and then queued for delivery to its destination. The other systems do have sSMTP, which relays mail through caffeine immediately without any queue or daemon.

A cron job on caffeine makes a hash table out of /etc/hosts, and any address present in the table will be able to relay mail. Systems must be added to /etc/hosts before sSMTP will function.