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 Feisty
--------------------------
1- Install exim4.
# apt-get install exim4

2- reconfigure to receive email directly, and to send via a smart host

# dpkg-reconfigure exim4-config
Small files: No
Type of configuration: mail sent by smarthost; recevied via SMTP or fetchmail
System mail name: your mail domain (mine is horgoth.com)
IP-Address to listen on: your ip address (mine is 144.38.212.50)
Other destinations: your mail domain (mine is horgoth.com)
Machines to relay for: * See note below
smarthost: sol.cs.dixie.edu
Hide local mail name: No
Minimal DNS Queries: 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.212.48/28w.
Other specific IP addresses may also be added. (See
step 3 below for another method of achieving this result.)

3- Allow local network computers to send email out.
# emacs /etc/exim4/update-exim4.conf.conf
Edit the relay_nets line. This configures hosts that you will accept
SMTP sending from. (Outlook, etc.)
dc_relay_nets=' is already installed'

4- Update the real exim4 configuration file(s)
# update-exim4.conf

5- Restart the server with the new configuration
# /etc/init.d/exim4 restart


SMTP (MTA) Exim4 on Ubuntu Feisty
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
Small files: No
Type of configuration: mail sent by smarthost; no local mail
System mail name: This hosts dns name (mine is ns1.horgoth.com)
IP-Address to listen on: your 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 horgoth.com)
smarthost: your domain's MTA (mine is eax.horgoth.com)
Minimal DNS Queries: No


IMAP4 uw-imapd on Ubuntu Feisty
------------------------------
1- Install the "internet super-server" package inetd, and the access
control facilty package tcpd.
# apt-get install tcpd netkit-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
Continue installing libc-client without Maildir support? Yes
Which ports should the server listen on? imaps
Enforce port selection? No


MUA mutt for local mail on Ubuntu Feisty
---------------------------------------
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 Feisty
---------------------------------------
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_force_ssl=yes
set imap_user="username"
#set imap_pass="password"

# put your server name here:
set spoolfile="imaps://horgoth.com"
# put your server name here:
set folder="imaps://horgoth.com/"

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@horgoth.com)
5- Select IMAP server
Incoming Server : your.server.name (mine is horgoth.com)
Outgoing Server : your.server.name (mine is horgoth.com)
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.



Citation: jones. (2007, November 27). Email Notes. Retrieved May 20, 2012, from Dixie State College of Utah Web site: http://dixie.educommons.net/computer-and-information-technology/systems-design-and-adminsitration-i/email-notes.
Copyright 2008, by the Contributing Authors. This work is licensed under a Creative Commons License. Creative Commons License