|
Email Services (1)
pg. 5
| This chapter has been updated to
reflect changes to our email services as a result of our upgrade to
Sendmail 8.9.3. New and improved features include user controlled
mail forwarding for your users and improved anti-spam and anti-relay
protection, as well as the new etc/mail directory structure and mail
delivery precedence. |
Our Unix mail servers, which run sendmail version 8.9.3,
include many standard and optional features, including:
Strong anti-spam and anti-relay protection
Email Aliasing (also known as Mail Forwarding or Redirecting)
Auto-responders (also known as 'vacation' or 'out of office' messages)
Multiple POP accounts (mailboxes)
Web-based administration using VAdmin Suite
Web-based mail access
Much, much more!
How Your virtual server Handles Email
Your virtual server comes set up with one email account, which uses the same
username and password as your administrative login and has the email address of
"username@yourdomain.com" where username is your administrative username and
yourdomain.com is the domain name of your virtual server.
With the virtual server you can add an unlimited number of email accounts where
you can receive and store email messages until they are picked up.
Additionally, an email alias with the address "webmaster@yourdomain.com" is
pre-configured to redirect messages to the email address that you supplied when
signing up for your account. Therefore, your virtual server already handles
email for these two different email addresses.
Email messages are stored in accounts on your virtual server and can be picked
up and read using an email client program. You can also read the mail for your
virtual server's administrative email account through a SSH session using a
program called Pine. For more information about Pine, please refer to the
section, Using Pine as Your Administrative Email Client.
Sending
Mail
If there is a problem along the route from your virtual server to the recipient,
your virtual server will queue the outgoing message in the ~/usr/spool/mqueue
directory and try to send it again when the problem is corrected.
Mail that is sent to an invalid email address or cannot be sent for some other
reason will be returned to you along with a description of why your virtual
server could not deliver it.
Receiving Mail
When setting up aliases, virtmaps, and email accounts, you should take into
consideration the way your virtual server handles incoming mail. Doing so will
help you avoid forwarding mail to the wrong destination.
Your virtual server processes incoming mail in the following order:
virtmaps -> aliases -> .forward files -> users -> catchall
When email addressed to someone at your domain name arrives, your virtual server
will attempt to complete its delivery according to the names of your virtmaps,
then your aliases, and so on. If the mail address is not defined in any of these
locations, the mail bounces back to the sender as undeliverable.
It is important to note that all virtmaps are processed before any aliases, and
likewise all aliases are processed before any users, and so on. Therefore, if
you have an alias and an email account on your virtual server with the exact
same name, mail will always be sent to the address defined by the alias rather
than the email account.
Setting Up an Email Client
To use your virtual server's email capabilities from your desktop computer, you
must first obtain and configure an email client program. There are many free
clients available, any of which will work well with your virtual server's email
service. For Windows users, we recommend using Microsoft Outlook or Outlook
Express, Netscape Mail, or Eudora.
Your email client will require, at a minimum, the following basic information:
Your email address.
The name of your email account.
A password to access your email.
The domain name of your email server
Some clients ask you to specify both an incoming and an outgoing mail server.
Because your virtual server acts as both the incoming and outgoing mail server,
you can enter your domain name in both cases.
You should consult the documentation that accompanies your email client program
for complete instructions on how to configure it.
Your virtual server supports two different incoming mail protocols: (Post
Office Protocol) and IMAP (Internet Message Access Protocol). Some email
programs allow you to use both of these protocols, and some do not. Others
support both but only allow you to use one at a time. Because these two
different protocols behave differently, we will discuss the advantages and
disadvantages of each.
Using POP on Your Virtual Server
POP (Post Office Protocol) is a simple incoming mail protocol that can be
thought of as a "store-and-forward" service. With POP, your email is saved in a
mailbox on your server, and is transferred to your email client when you check
it. Once they are downloaded, your email messages are no longer maintained on
the server. POP is the best choice when you always read your email messages from
the same computer, but is somewhat inconvenient to those who need access to all
of their messages from many locations.
Using IMAP on your Virtual Server
IMAP (Internet Message Access Protocol) is a client-server protocol in which
email is received and held for you by your virtual server. Using your IMAP-enabled
email client, you can view just the header information (who it is from, the
subject, the date it was sent, etc.) and then decide whether to download a copy
of the mail. This way, mail is kept on the server and is accessible from any
location.
You can also create directories on your virtual server through an IMAP
compatible email client so that your stored email messages are easy to organize.
Telecommuters will find IMAP especially useful. However, if the mail is only
accessed from one location, then POP works best because it was designed to
support "off-line" message access. Some of the more prominent email clients that
support IMAP are Microsoft Outlook 98, Outlook Express and Eudora Pro 4.0 and
above.
Using Pine as Your Administrative Email Client
Your virtual server comes with a built-in email client for the administrative
email account. PINE (Program for Internet News and Email) allows you to read and
send mail from your administrative email account through a SSH session. Because
Pine is run through the Telnet service, it is only available to the
administrative user–not to additional email users that you add.
Due to its speed and efficiency, many people prefer Pine to the email clients
that are run on their desktop computer. For more information about Pine, please
refer to the University of Washington's Pine Information Center at the following
URL:
http://www.washington.edu/pine/
If you'd like to use Pine as a client for your administrative email account,
you'll need to configure it according to the instructions below.
Configuring Pine
To configure Pine as the client for your administrative email account, SSH to
your virtual server and enter the pine command at your virtual server's command
prompt. After you enter the pine command, the main menu displays. Follow these
steps to configure pine:
Press S for setup, and then C for configure.
Using your arrow keys, select smtp-server, then press Enter. The following
prompt appears:
Enter the text to be added :
Enter the following at the prompt, where yourdomain.com is your domain name:
yourdomain.com
Select inbox-path, then press Enter. The following prompt appears:
>Change field inbox-path value :
Enter the following at the prompt, where username refers to the username for
your virtual server:
>~/usr/mail/username
After typing the above inbox-path, press Enter.
Press E to exit, Y to save changes, and Q to quit Pine.
The next time you start the program through the pine command, you'll be
accessing your administrative email account.
Additional Information about Pine
The Pine program comes with an extensive help file that is available by pressing
"?" from within the program. A more condensed help file is available by typing
the following from your command prompt:
man pine
In addition, the Pine Frequently Asked Questions (FAQ) list is available at the
following URL:
http://www.washington.edu/pine/faq/
Email
Accounts
Email accounts, which are often called "POP accounts," allow you to receive,
store, and retrieve email messages. An email account for the administrative user
was automatically set up for you when you ordered your virtual server.
The virtual server system can support an unlimited number of email accounts,
which you can set up at any time using the vadduser command at the command
prompt.
Creating Email Accounts
To create a new email account on your virtual server, SSH to your virtual server
and enter the vadduser command at your virtual server's command prompt. The
following series of prompts appear:
Email/FTP User Name:
Choose a username up to 16 characters in length and press Enter. The email
address for the account will be this username followed by an @ symbol and your
virtual server's domain name. The new account will work with any domain name
associated with your virtual server.
Email/FTP password:
Type in a password and press Enter. You will be asked to confirm the password to
make sure that you typed it correctly. For security purposes, this password is
not displayed on the screen.
Full name:
Although the full name is optional, it can help you as an administrator to keep
track of multiple email accounts on your virtual server.
E-mail, yes or no [yes]:
If you choose to add an email account for the user, the following prompt
appears:
Do you want an "email disk quota" set on this account?
If you answer yes to the above prompt, you are then asked to enter the number of
megabytes (MB) to limit the user to.
If you do wish to provide FTP access for this user, press Y, Enter. You'll then
be asked for further details regarding the FTP access, including the location of
the user's "home directory." Please note that the location you choose will also
be the location of the user's IMAP start folder. This means that, if any users
have the same access points, they will also have potential access to other
users' mail folders! Therefore, be careful not to setup more than one user with
the same home directory.
The following message appears on your screen to verify that the account was
successfully created:
Email/FTP User added successfully
Managing Email Accounts
You can issue the following commands to manage the email accounts (users) on
your virtual server:
| vlistuser |
Displays information about all active users with
an email account on your virtual server |
| vedituser |
Changes the personal information for a user
account on your virtual server. You will be prompted for the name of the
email account you wish to edit, after which will need to reenter their
information. |
| vrmuser |
Removes a user account from your virtual server.
You will be prompted for the name of the user you wish to remove. A
confirmation message verifies that the user was removed from your
system. |
| vpasswd
username |
Changes the password for any email account on
your virtual server, including the main administrator. The username is
the name of the account whose password you wish to change. |
Email Aliasing (Forwarding)
An email alias is a type of email "pointer" that receives email at a specified
address and then forwards it someplace else. One email alias can point to
multiple email addresses, and multiple aliases can point to a single address.
One practical use of email aliasing is to create an alternate, easy-to-remember
address for a long or awkward email account. This is similar to the practice of
using words or phrases in place of telephone numbers. For example, a customer
might have trouble remembering a phone number such as 1-800-932-8437 but have
little difficulty remembering 1-800-WEATHER. Likewise, if you have an awkward
address such as "11243.332@somedomain.com," you may wish to provide an alias
such as "bob@yourdomain.com" that is easier to recall and points to the same
destination.
You can also use email aliasing to distribute email messages to a particular
group of people. For example, if you have a group of friends or business
associates to whom you regularly send group mail, you could create an alias
called "everyone@yourdomain.com" that forwards mail to everyone in that group.
Finally, aliases can be used to give a small organization a larger, corporate
appearance. Instead of telling people to send questions regarding sales,
support, employment, and general information all to the same address, you can
create aliases at "sales@yourdomain.com," "support@yourdomain.com,"
"jobs@yourdomain.com," and info@yourdomain.com," all of which could be
redirected to a single address.
Creating Email Aliases
Before you start creating email aliases, it's important to note that it is
possible to associate more than one domain name with a single virtual server.
Doing so is called Virtual Hosting, a feature that is fully explained in the
Virtual Hosting chapter. When using email aliases on a virtual server with
multiple domain names, you need to combine aliasing with virtual mapping. This
and other special considerations are discussed later in this chapter.
A virtual server's email aliases are defined in a file called aliases, which is
located in your virtual server's ~/etc/mail directory. To view the aliases that
are currently defined on your virtual server, SSH to your virtual server and
type the following at the command prompt:
cd ~/etc/mail
more aliases
The contents of the ~/etc/mail/aliases file look something like the following by
default:
#
# >>>>>>>>>> The program "vnewaliases" must be run after
# >> NOTE >> this file is updated for any changes to
# >>>>>>>>>> show through to your virtual sendmail.
#
# Basic system aliases -- these MUST be present.
MAILER-DAEMON: postmaster
postmaster: webmaster
# Add your own aliases here
# (aliases are in the form <alias: mail address>
# (for example: webmaster: user@domain.com)
webmaster: you@yourisp.net
Any line in the aliases file that begins with a pound sign (#) is a comment.
Comments have no effect on your virtual server's email aliasing. When your
virtual server was initially set up, we created an alias for you called
webmaster that points to the email address you supplied when you ordered your
virtual server. As a result, any mail sent to "webmaster@yourdomain.com" will be
automatically forwarded to your existing email address (assuming you have one).
Email aliases must be set up in the following format:
alias: destination
The alias can be any valid email name (a name that contains only a-z, 0-9, the
underscore, dot, and dash characters). The destination can be either the
username for an email account that is housed on your virtual server, a complete
email address for a domain that is not housed on your virtual server, or even
another alias on your virtual server.
You MUST separate the alias from the destination with a colon (:). If you're
using an alias to forward mail to another alias or email account on the same
virtual server, DO NOT include the @ sign or the domain name. The alias name
will be active for any and all domain names that you have associated with your
virtual server.
For example, suppose that the domain name of your virtual server is abc.com, and
that you want all mail sent to "dave@abc.com" to be forwarded to an existing
email account at "dave123@isp.com." You would need to add the following line to
your aliases file:
dave: dave123@myisp.com
As an exercise, create a sales alias for your virtual server. Enter the
following command at your virtual server's command prompt:
cd ~/etc/mail
You should now be in the directory that contains the aliases file for your
virtual server. Before editing any important file on your virtual server, it's a
good idea to make a backup copy using the cp command. To do so, enter the
following command at your virtual server's command prompt:
cp aliases aliases.bak
This creates a backup copy of your aliases file named aliases.bak, which you can
copy back to aliases if you accidentally make a mistake.
To edit the aliases file, enter the following command:
pico aliases
This will start the pico online editor and open the aliases file. Use the arrow
keys on your keyboard to scroll to the end of the file, then add the following
line to the end of the file:
sales: your_email_address
Substitute your_ email_ address with an email address that you currently use,
another alias on your virtual server (such as webmaster), or the username for a
POP account that exists on your virtual server (such as the main administrative
account). At the end of the line, hit Enter a couple of times. UNIX tends to be
better behaved when it finds a hard return or two at the end of any text file.
Finally, exit pico and save your changes by pressing Ctrl+X, Y, Enter.
Your new aliases file has now been saved, but your new alias is not yet active.
Before your new aliases can take effect, you need to inform your virtual server
that the aliases file contains new information so it can load the information
into its alias database.
To tell your virtual server that you've updated your aliases file, enter the
following at the command prompt:
vnewaliases
If no error message appears, everything worked properly. If an error message
does appear, you should reopen the aliases file, look for any errors, and then
repeat the vnewaliases command.
Test your new alias by sending email to the address you just created. If you
followed the exercise above, you could send an email to "sales@yourdomain.com,"
substituting yourdomain.com with your actual domain name, and it should arrive
at the destination you indicated in the aliases file.
Creating Multiple Aliases and Destinations
You can set up your aliases file to point multiple aliases to a single
destination, or to point a single alias to multiple destinations. When pointing
an alias to multiple destination addresses, separate each address with a comma
like this:
alias: user1@domain.com, user2@domain.com
To send mail from one alias to another, you could do the following:
alias1: user1@domain.com, user2@domain.com
alias2: alias1
Note in the above example that the destination of alias2 does not contain the @
sign or domain name, because it points to an alias on your virtual server.
To add comments to the aliases file (for example, to help track who each alias
belongs to), place a # before the comment like this:
# Type your comments here, after the pound sign.
Finally, it is important to remember that any changes to your aliases file will
not take effect until you run the vnewaliases command from the command prompt.
Creating Aliases for Virtual Users
Users that have been added with the vadduser command can set up a .forward file
in their home directory that will forward incoming mail to the address specified
in that file.
To do so, follow the steps below:
1) Locate the user's home directory. Assume for the purpose of this example that
you have a user named 'mike' on your virtual server:
cd ~/usr/home/bob
2) Create the .forward file within the user's home directory:
pico .forward
3) Enter a valid email address to which all incoming mail should be forwarded,
for example:
mike@somedomain.com
4) Test the alias by sending mail to 'mike@yourdomain.com,' where yourdomain.com
is your actual domain name.
The mail should be forwarded to the email address specified in the .forward
file.
To remove the alias, simply remove the .forward file from the user's home
directory.
Virtual Email Mapping – Virtmaps
Using more than one domain name on a virtual server is called Virtual Hosting,
which is explained in greater detail in the Virtual Hosting chapter.
Email accounts and email aliases apply to any and all of the domain names
associated with your virtual server. For example, if the domains 123.com and
abc.com both point to your virtual server, then an alias on your virtual server
called "webmaster" will redirect mail sent to both webmaster@123.com and
webmaster@abc.com.
However, what if you want webmaster@123.com to go to a different account than
webmaster@abc.com? The solution to this problem is Virtual Email Mappings, or
virtmaps.
A virtmap is similar to an email alias, in the sense that it points one email
address to another. There are, however, some very important differences between
virtmaps and aliases:
Virtmaps are located in a separate file than email aliases. Both files are
located in the ~/etc/mail directory, but aliases are stored in a file called
aliases, while virtmaps are located in a file called virtmaps.
A virtmap must be defined as an entire email address (including the @ and the
domain name), followed by a space or tab, followed by a destination.
Unlike an alias, a single virtmap cannot point to multiple addresses. A virtmap
can, however, point to an alias that in turn points to multiple addresses. A
virtmap can also point to an email account, another virtmap, an alias, or a
complete email address located on another server.
Creating a Virtmap
To create a virtmap, follow the steps below:
Open a SSH session to your virtual server.
Go to your virtual server's ~/etc/mail directory by typing the following at the
command prompt:
cd ~/etc/mail
Open the virtmaps file in the pico editor by typing the following at the command
prompt:
pico virtmaps
Use your arrow keys to move to the end of the file and add a line similar to
this:
name@yourdomain.com destination
Replace yourdomain.com with the domain name of your virtual server. The name can
be any name you choose. The destination can be an email account, an alias, or
another virtmap on your virtual server, or the complete email address of a user
that is not located on your virtual server. You should not use a domain name in
the destination if the destination user is located on your own virtual server.
Note that, unlike the aliases file, you do not use a colon to separate the name
from the destination. Instead you use a space or a tab. There are correct
examples of virtmaps in your virtmaps file itself, which are commented out with
a # sign.
Exit the pico editor, saving the changes you made to the virtmaps file.
Type the following at the command prompt:
vnewvirtmaps
The vnewvirtmaps command loads the new virtmaps into the virtmaps database. New
entries in your virtmaps file will not take effect until you run this command.
The
virtmaps File
By default, no virtmaps are defined and the virtmaps file looks something like
the following:
NOTE: The text in the first section below appears only if you have updated your
virtmaps file through the VAdmin Web interface.
# This file has been updated by VAdmin.
# Some lines may have been edited in order to support catch-all
# addresses and/or aliases that point to multiple recipients.
#
# Virtmaps support virtual hosts and catch-alls; Aliases don't.
# Aliases support multiple recipients; Virtmaps don't.
# To provide the functionality of both virtmaps and aliases,
# each email is sent to a virtmap, which then forwards it to an
# alias, which in turn forwards it to the recipients. This process
# may require VAdmin to add extra lines to this file.
# When viewing your aliases through the VAdmin web interface,
# none of these extra lines will be displayed.
#
# EXAMPLES:
#
# To forward email from "webmaster@domain.org" to the users "tom"
# and "dick" and "harry", VAdmin will create the following virtmap:
# webmaster@domain.org webmaster-at-domain.org
# ...as well as the following alias:
# webmaster-at-domain.org: tom, dick, harry
# Email sent to the "webmaster" alias will be forwarded first from
# the virtmap to the alias, then from the alias to the users.
#
# To create a catch-all at "domain.org" to the users "webmaster"
# and "postmaster", VAdmin will create the following virtmap:
# domain.org domain.org
# ...as well as the following alias:
# domain.org: webmaster, postmaster
# Email will be forwarded from the _catch-all_ "domain.org" to the
# _alias_ "domain.org", and from there to the webmaster and the
# postmaster.
#
# VAdmin will also create one additional virtmap for each existing
# email address -- for example, the following virtmap is created
# for the MAILER-DAEMON alias:
# MAILER-DAEMON@domain.org MAILER-DAEMON
# The additional virtmap ensures that email sent to "MAILER-
# DAEMON@domain.org" will get routed to the "MAILER-DAEMON" alias
# before it is caught by the "domain.org" catch-all.
NOTE: The following help text appears in your virtmaps file, regardless of
whether it has been modified by VAdmin:
# Simply add the virtual email address and the real email
address
# it should be mapped to. The virtual email address can be a full
# email address or a hostname. If it is a hostname then mail to
# that hostname will be sent to the real email address if none of
# the full email addresses don't match. This keeps mail for a virtual
# sub-hosted domain from bouncing.
#
# Here are some examples:
#
#(lines beginning with "#" are comments; I love comments)
#Virtual Email Address Real Email Address
#---------------------- ------------------
# webmaster@virtual1.com user@isp.com
# user@virtual1.com localuser1
# virtual1.com user@isp.com
## Note: "Unknown User" mail to virtual1.com goes to user@isp.com
#
# webmaster@virtual2.com localuser2
# user@virtual2.com someuser@aol.com
# virtual2.com localuser2
#
Like the ~/etc/mail/aliases file, the ~/etc/mail/virtmaps file can contain lines
that start with a # sign. Such lines act as comments and are ignored.
Virtual Server Lite |
Virtual Server Standard |
Virtual Server Pro |
Virtual Server Ultra |
400 megs |
1000 megs |
1500 megs |
6000 megs |
Details |
Details |
Details |
Details |
Order |
Order |
Order |
Order |
|