AlpineWeb Home
Search: For:   ~ Advanced Search  
  Support Home     Documentation     Knowledgebase     Help Desk     Blog 
Support Home > VPS v1 > Administration > E-mail > Monday, October 06, 2008

Virtmaps - Providing E-Mail for Virtual Subhosts


In order to provide e-mail for your Virtual Subhost customers, you will probably use the Virtual Server "virtmaps" feature. This is a proprietary feature (only available on our Virtual Servers) that we have added to sendmail, the underlying program which handles all of your VPS E-Mail.

Why Virtmaps?

An HTTP/1.1 compliant web server (like your Virtual Server Apache Web Server) can detect Virtual Subhost domains when an HTTP request is made, and it sends back the corresponding content to the client. However, an SMTP server without the virtmaps feature cannot detect Virtual Subhost domains. It can only see that subhost1.com and subhost2.com resolve to the same IP address. So, to the SMTP server, webmaster@subhost1.com and webmaster@subhost2.com are the same webmaster.

The virtmaps feature provides your Virtual Server SMTP server a method to detect the domain name of an incoming e-mail. Then, e-mail to similar usernames but different domain names can be routed differently. This allows you to configure similar domain-specific e-mail aliases (such as webmaster@subhost1.com and webmaster@subhost2.com) and map them to different e-mail addresses. The virtmaps feature also supports wild card mapping, so that any e-mail sent to a non-existing e-mail address is delivered to a "catch-all" e-mail alias or address.

It is up to you how you use the virtmaps feature to provide e-mail for your Virtual Subhost customers. Many Virtual Server administrators provide their Virtual Subhost customers with one E-Mail User Account. Then they create virtmaps (often including a catch-all virtmap as well) for the customer that map to this single POP/IMAP account.

Creating Virtmaps

There are several methods you can use to create virtmaps on your VPS
NOTE: In order for a Virtual Server to recieve e-mail for a particular domain name, that domain name must appear on the "Cw" line in the Virtual Server ~/etc/sendmail.cf file. If you ordered a domain name from us (in other words, the domain is being resolved by our name servers) then we probably added it to your VPS ~/etc/sendmail.cf file for you.
  • Telnet or SSH
    You can create a virtmaps during a Telnet/SSH session with your VPS. Connect to your Virtual Server via Telnet or SSH and do the following.
    1. Add the virtmap to your ~/etc/virtmaps file. Use an online file editor, like pico, or transfer the file to your PC in order to add the virtmap. Be sure to download and upload the ~/etc/virtmaps file in ASCII mode. The virtmap you create in your ~/etc/virtmaps file should look something like this:
      			webmaster@subhost1.com   e-mail_address1
      			webmaster@subhost2.com   e-mail_address2
      			subhost2.com             e-mail_address3
      
      The left hand side of the virtmap is the incoming e-mail address. The right hand side is the outgoing e-mail address. If the left hand side is only a domain name then all e-mail sent to that domain name will be delivered to the e-mail address on the right hand side. All e-mail is delivered to the first virtmap that matches, if there is a virtmap that matches.
    2. Run the vnewvirtmaps command.
      % vnewvirtmaps

Removing Virtmaps

If you wish to use Telnet or SSH, connect to your Virtual Server via Telnet or SSH and do the following.
  1. Remove the virtmap from your ~/etc/virtmaps file. Use an online file editor, like pico, or transfer the file to your PC in order to remove the virtmap. Be sure to download and upload the ~/etc/virtmaps file in ASCII mode.
  2. Run the vnewvirtmaps command.
    % vnewvirtmaps

Technical Support
° Getting Started Guide
  FreeBSD
° VPS v1 Help
° VPS v2/3 Help
° MPS v2/3 Help
  DNS
° Domain Name Service
° Domain Registration
   
° Help Desk
° Knowledgebase
° Support Policies
° Disclaimer

° AlpineWeb Home
° Compare Hosting Plans
° Network Topology

° Rates & Fees
° Order Center


  SEE ALSO
· Limitations of VPS Subhosting


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