An alias is simply a forwarding e-mail address. Each e-mail alias you create simply forwards e-mail on to any other e-mail address that you specify. E-Mail aliases are often used to create handy replacements for long or difficult-to-remember e-mail addresses. They can also be used to create generic e-mail addresses such as webmaster@yourcompany.com and abuse@yourcompany.com which can be pointed to new accounts as your personnel changes. You can also forward the messages to a program, such as an E-mail autoresponder.

E-mail aliases apply only to the username part of an E-mail address. This means that the domain portion of the recipient address is ignored. If you want to use domain-based E-mail forwarding, try using the E-mail Virtmaps feature of your Virtual Private Server.

Creating E-mail Aliases

A list of the E-mail aliases on your Virtual Private Server is stored in the ~/etc/aliases file. You can modify your aliases by editing the ~/etc/aliases file online (using SSH or Telnet), or using iManager.

An alias will look something like this:

aliasname: recipient@yourcompany.com

The important elements are an alias name, the colon (:), and the recipient address.

The alias name can be just about anything, as long as it doesn't include a reserved character (such as the @ symbol, spaces, etc.).

The recipient name can be another alias, a local user, a remote user, a list of users, or a program. The following examples demonstrate a few possible aliases you could use.

  • A single alias:
webmaster: you@your-isp.com
  • A single alias to multiple recipients:
webmaster: you@your-isp.com, someone@YOUR-DOMAIN.NAME
  • An alias to a file containing a list of recipients (one recipient per line):
listname: :include: /path/to/file
  • An alias that calls a program (in this case, autoreply):

info: YOU@YOUR.ISP, "|/usr/bin/autoreply -f info-reply -a info"

There are a number of other things you can do with the aliases file. More information can be found in the man page:

 

% man aliases

Once you have set up your aliases the way you want them, you will need to run the vnewaliases command to create a database file that sendmail can use.

% vnewaliases

Removing Aliases

To remove an alias from your Virtual Private Server, simply remove the alias from the ~/etc/aliases file and run vnewaliases.

Please note: the information on this page applies to ITS web hosting plans. It may or may not apply to other environments. If you are looking for a feature described here, or better support from your hosting provider, please consider hosting your site with ITS!

1555 N Naperville/Wheaton Road, Suite 107
Naperville, IL 60563
phone 630.420.2550
fax 630.420.2771