Email Notes
Glossary
--------
Sending User:
An entity creating and sending messages to another entity.
Reading User:
An entity reading, archiving, and deleting messages from another entity.
Mail User Agent (MUA):
An application used by Sending Users to compose and dispatch messages.
An application used by Reading Users to read, archive, and delete messages
that have been received.
Mail Transport Agent (MTA):
A server used to send, receive, and forward messages from one location
to another.
Mail Delivery Agent (MDA):
A server used to store messages into User Mail Boxes.
Remove Mail Box Server:
A server used to allow remote access to a User Mail Box for reading,
archiving and deleting messages.
User Mail Box:
A collection of messages usually stored on secondary memory, like hard
drives. A mail box may be stored as a single file, a collection of files
and directories, or in a database.
Several standard mail box formats exist. The two common formats in the
open-source world are "mbox" and "maildir". The mbox format stores all
messages in a single file, while the maildir format stores messages in
a collection of files and directories.
Files, Directories and Configurations Of Interest
-------------------------------------------------
Configuration
-------------
/etc/exim4/
/etc/exim4/exim4.conf.template
/etc/exim4/update-exim4.conf.conf
/var/lib/exim4/config.autogenerated
/etc/mailname
/etc/aliases
/home/username/.muttrc
/home/username/.forward
Logs
-------------
/var/log/exim4/mainlog
/var/log/exim4/rejectlog
Mailboxes
-------------
/var/spool/mail/username
/home/username/mbox
/home/username/Mail/
Step-by-step instructions
-------------------------
SMTP (MTA) Exim4 on Ubuntu Hardy
--------------------------
1- Install exim4.
# apt-get install exim4
2- reconfigure to receive email directly, and to send via a smart host
# dpkg-reconfigure exim4-config
Type of configuration: mail sent by smarthost; recevied via SMTP or fetchmail
System mail name: your mail domain (mine is maildemo.utahsg.net)
IP-Address to listen on: your ip address (mine is 144.38.211.189)
Other destinations: your mail domain (mine is maildemo.utahsg.net)
Machines to relay for: * See note below
smarthost: stumail.cs.dixie.edu
Hide local mail name: No
Minimal DNS Queries: No
Delivery method for local mail: mbox format in /var/mail/
Split configuration into small files? No
* NOTE ON RELAYS
If only command line MUAs on the same system as the MTA
will be used to send email, then the relay list should be
left blank.
To allow MUAs from the local network to use the
MTA to send outgoing email, the local network will need
to be identified. The local network in the CIT lab
is 144.38.192.0/19. My local network is 144.38.211.160/27.
Because we will want CIT machines to use Outlook or evolution
to send email through our systems, we should use the CIT network.
Other specific IP addresses may also be added.
SMTP (MTA) Exim4 on Ubuntu Hardy
Satellite Systems
--------------------------
1- Install exim4.
# apt-get install exim4
2- reconfigure to not receive email, and to send via a smart host
# dpkg-reconfigure exim4-config
Type of configuration: mail sent by smarthost; no local mail
System mail name: This host's dns name (mine is ns1.utahsg.org)
IP-Address to listen on: your local ip address (mine is 127.0.0.1)
Other destinations: your mail domain (mine is empty for no local delivery)
Visible domain name for local users: The domain name (mine is utahsg.org)
smarthost: your domain's MTA (mine is mail.utahsg.org)
Minimal DNS Queries: No
Split configuration into small files? No
IMAP4 uw-imapd on Ubuntu Hardy
------------------------------
1- Install the "internet super-server" package inetd, and the access
control facilty package tcpd.
# apt-get install tcpd openbsd-inetd
2- Install the uw-imapd package
Other packages may be required for uw-imapd to work correctly.
They should be automatically installed by apt-get.
# apt-get install uw-imapd
3- Reconfigure uw-imapd to work correctly.
# dpkg-reconfigure uw-imapd
Which ports should the server listen on? imap2, imaps
Enforce port selection? No
MUA mutt for local mail on Ubuntu Hardy
---------------------------------------
1- Install the mutt package
# apt-get install mutt
2- Install the mailx package
# apt-get install mailx
MUA mutt for remote mail on Ubuntu Hardy
---------------------------------------
1- Install the mutt package
# apt-get install mutt
2- Configure .muttrc to use the remote server
$ emacs ~/.muttrc
Add these lines:
## begin imap ##
set imap_authenticators="gssapi:cram-md5:login"
set imap_user="username"
#set imap_pass="password"
# put your server name here:
set spoolfile="imaps://mail.utahsg.org"
# put your server name here:
set folder="imaps://mail.utahsg.org/"
set header_cache="~/.mutt_header_cache/"
## end imap ##
MUA Outlook Express for remote mail on Windows
----------------------------------------------
1- Tools/Accounts...
2- Add->Mail...
3- Display Name : Real name (mine is Emilio Lazardo)
4- E-mail address: email@address (mine is lazardo@utahsg.org)
5- Select IMAP server
Incoming Server : your.server.name (mine is mail.utahsg.org)
Outgoing Server : your.server.name (mine is mail.utahsg.org)
6- Account name: user account name on server (mine is lazardo)
Password: I choose to leave this blank since it is a login password too.
Remember Password: uncheck
Using SPA: uncheck
7- Select the new account listing, and choose "Properties"
8- Select the "Advanced" tab.
9- Underneath "Incoming mail", check the box for
"This server requires SSL"
10- Click "Apply" and "OK" buttons.
11- Close the dialog box.
System-Wide Email Aliases
-------------------------
1- Edit /etc/aliases
2- Add lines to translate the user part of an email destined for
this system.
For example, the following line will translate bedrock@mydomain
to send copies of messages to each of fred, wilma, and pebbles
on the mydomain mail server as well as to barney@rubbledomain.
bedrock: fred, wilma, pebbles, barney@rubbledomain
The bedrock account will not receive a copy of the message.
In fact, bedrock need not be an actual account or group.
Per-User Automated Forwarding
-----------------------------
1- Edit ~/.forward, insert the email address where this user
wants to have all messages sent.
Now all email for this user's account will be forwarded on to
the new address. The process is for the MDA to modify the
header fields of the message to send them to the address in
the .forward file. It then sends the message by giving it
back to the MTA for delivery.
Note that the .forward file has more sophisticated uses,
including forwarding to multiple accounts, forwarding
while keeping a copy, and applying arbitrary processing
filters such as procmail.