Files that affect your mail
The default mail setup at Nevis works for most users. However, if you'd like finer control over your e-mail, mail notifications, mail forwarding, spam processing, mail filtering, or are trying to fix a mail problem, the following information can be useful.
In the descriptions below,
$user
is the name of your Nevis
Linux cluster login account.
/a/mail/inbox/$user
This is the file that contains the contents of your INBOX. On the mail server, it's located in
/mail/inbox/$user
, but the above path makes the file visible on other the other systems on the cluster via
automount.
/a/mail/folders/$user
This is the default location of your
IMAP mail files. On the mail server, this path is
/mail/folders/$user
, but the above path makes the file visible on other the other systems on the cluster via
automount.
/a/mail/folders/$user/.subscriptions
This file contains the list of IMAP folders that you see in your mail reader. For the most part, you don't have to change the contents of this file; you can drag, drop, create, (un)subscribe, etc., using your mail program. But every once in a while, it's easier to edit this text file than it is to manually click on lots of different folders.
/a/mail/forward/$user
or ~/.forward
The forwarding file controls how your e-mail is
forwarded, and can also be used to automatically send
vacation messages.
There are two places where you can put your forwarding instructions:
/a/mail/forward/$user
or
~/.forward
. The latter name is the standard location for a forwarding file, and it's supported at Nevis. The former location is preferred, however, since the file will remain available to the mail server if your home directory becomes unavailable; e.g., if your
group's server goes down.
If you have both files
/a/mail/forward/$user
and
~/.forward
, only the lines in the former will be interpreted. The latter will be ignored.
/a/mail/procmailrc/$user
or ~/.procmailrc
Procmail
is a program that delivers your mail to your INBOX. You can create a file
/a/mail/procmailrc/$user
or
~/.procmailrc
file to filter messages, automatically direct mail into certain folders, and other advanced operations.
There are two places where you can put a procmail command file:
/a/mail/procmailrc/$user
or
~/.procmailrc
. The latter name is the standard location for a procmail file, and it's supported at Nevis. The former location is preferred, however, since the file will remain available to the mail server if your home directory becomes unavailable; e.g., if your
group's server goes down.
Many mail readers (such as
Thunderbird
) have similar facilities. The advantages of using procmail are:
- Procmail offers more flexibility than most mail readers. For example, most mail readers cannot send an e-mail in response to a particular message you receive; procmail can.
- Procmail runs on the mail server, which means it operates on your e-mail as it receives it. A mail reader can only process your messages as it reads them off the server. In particular, if you read mail using more than one computer or more than one mail-reading program, you might want to put your mail filtering in procmail instead of duplicating that functionality on different machines and programs.
The disadvantage is, of course, complexity; procmail uses its own
command language
.
If you're interested in exploring procmail, I recommend the following resources:
If you have both files
/a/mail/procmailrc/$user
and
~/.procmail
, the commands in
both will be executed. Be careful! This is not the behavior of the forwarding files described above!
~/.spamassassin/user_prefs
For the most part, you can ignore the contents of your
~/.spamassassin/
directory, which is automatically created for you the first time you receive mail at Nevis. The one file that you might want to look at is
~/.spamassassin/user_prefs
, which allows you to control the functionality of
SpamAssassin
.
Your mail reader may also offer spam-filtering options. The advantages of
SpamAssassin
are similar to those of using procmail:
- SpamAssassin
offers more flexibility than most mail readers. For example, you can control the exact weighting assigned to each one of the tests
that SpamAssassin
performs.
- SpamAssassin
runs on the mail server, which means it operates on your e-mail as it receives it. A mail reader can only process your messages as it reads them off the server. In particular, if you blacklist
an address in ~/.spamassassin/user_prefs
, it will be bounced by the mail server and never get into your INBOX.
If you're interested in configuring
SpamAssassin
, I recommend the following resources:
Files on the mail server
The following files are included on this page to be complete. Since they're located on the mail server, and users don't have login access to the mail server, you won't be able to inspect these files unless you're a systems administrator.
/etc/mail/
This directory contains the configuration files for the
sendmail
program, which handles the
SMTP
services on the mail server. The main sendmail configuration file is
/etc/mail/sendmail.mc
.
The file
/etc/mail/mimedefang-filter
controls
MIMEDefang, which strips suspicious attachments from mail messages.
/etc/dovecot.conf
The configuration file for
dovecot
, the program that handles
IMAP and POP3
services on the mail server.
/etc/sysconfig/spamass-milter
A
milter
is a "mail filter."
SpamAssassin
(and
MIMEDefang) are implemented on our mail server as filters, which means they can bounce messages before they have been fully received. (Among other benefits, this means that we're never responsible for sending back spam- or virus-laden messages; it's the mail server that sent the message that has to do it.) The file
/etc/sysconfig/spamass-milter
controls the operation of
spamass-milter
, the milter program that calls
SpamAssassin
for each message as it's received.
/var/indexes/$user/
IMAP maintains an index of the headers of each message in your mail folders, so it doesn't have to re-read the entire folder every time you click on it in your mail reader. The indexes are kept in
/var/indexes/$user/
.