AlpineWeb Home
Search: For:   ~ Advanced Search  
  Support Home     Documentation     Knowledgebase     Help Desk     Blog 
Hosting > Managed Private Servers > Getting Started > Thursday, August 28, 2008

FreeBSD MPS: Getting Started Guide - Managing Email


All user email boxes reside in the /var/mail directory. The system automatically creates email boxes for server users. If no other email routing settings (such as aliases or virtmaps) are configured, the username is the default valid email for all domains that resolve to the server. For example, if domain1.com and domain2.com resolve to the server, for the user bob, both bob@domain1.com and bob@domain2.com would deliver email to the /var/mail/bob email box. The system checks for matches in email routing and addresses in the following order and delivers to the first match it finds:
  1. virtmaps
  2. aliases
  3. users
This section discusses virtmap, catchall, and alias configurations.
Note: To edit the virtmaps and aliases files, you must be the root user. You can become the root user by typing su at the command line and supplying the root user password.

Configuring Virtmaps

Virtmaps route the full email address (both sides of the @) to a local user, alias, or remote email address, but cannot map to files or programs. Only aliases can route email to a file or program. A virtmap consists of the virtmap and its destination, or mapping. For example, a virtmap for bob@domain1.com could be mapped to the user bob with the following virtmap entry:
bob@domain1.com       bob
Virtmaps allow you to create email addresses without the need to create a corresponding user. For example, a virtmap for bob@domain2.com could be mapped to bob@remotedomain.com with the following virtmap entry:
bob@domain2.com       bob@remotedomain.com
In this example, remotedomain.com would indicate a remote domain which does not resolve to your MPS v3.

Specify virtmaps in the /etc/mail/virtusertable file, with one virtmap entry per line. The virtusertable.sample file provided with each server contains example virtmaps. You can change virtmap settings by editing the virtusertable file and then executing the vnewvirtmaps command from the command line to load the new virtmaps into the system. Changes to virtmaps will not be used by the MPS v3 until you execute vnewvirtmaps.

Configuring Catchalls

Catchall virtmaps should be used sparingly. Spammers often send many emails to every conceivable address for a domain, often numbering in the thousands. A catchall virtmap would cause the system to receive all of these emails and map them to the recipient.

A special virtmap called a catchall maps all email not otherwise configured with a virtmap for a given domain to a single recipient. For example, the following catchall virtmap would map all email not configured with another virtmap for the domain company.com to the joe user:
@company.com       joe
If no virtmap exists for an email address, and a catchall virtmap is configured for the domain, the system would route all email sent to that address to the catchall virtmap.

Configuring Aliases

Email aliases forward email to a user, another alias, email address, list of addresses, file, or program. Aliases allow you to create email addresses without the need to create a corresponding user. For example, the following alias would forward email sent to webmaster@domain.com to the stan user:
webmaster:       stan
Aliases also allow you to send email to a list or to a program. For example, the following alias would forward email sent to sales@corporation.com to the bob, joe, and stan users:
sales:       bob,joe,stan
For long email lists, place the emails in a file, one address per line, and use the include option. For example, the following alias would forward email sent to promotion@website.com to all addresses in the /lists/promotion file:
promotion:     :include:       /lists/promotion
Specify aliases in the /etc/mail/aliases file, with one alias per line. You configure the aliases by editing the aliases file according to your needs. After making changes to the file, execute the vnewaliases command from the command line to load the new aliases into the system. Changes to aliases will not be used by the MPS v3 until you execute vnewaliases.

The system only considers the first portion of the email address (before @) for aliases. To map an entire email address to a certain recipient, use a virtmap.


Technical Support
° Getting Started Guides
  FreeBSD
° Basic Hosting Help
° Signature Hosting Help
° VPS v1 Help
° VPS v2/3 Help
° MPS v2/3 Help
  Linux
° VPS v3 Help
° MPS v3 Help
  SaaS
° Sugar CRM
  DNS
° Domain Name Service
° Domain Registration
° Help Desk
° Knowledgebase
° Support Policies
° Disclaimer

° AlpineWeb Home
° Compare Hosting Plans
° Network Topology

° Rates & Fees
° Order Center




  Home | Site Map | Customer Backroom Copyright  ©  1997-2008  AlpineWeb Design