The DOMAIN variable used to show the email address contains the full hostname of the domain (host.example.com). I don't think there's a "short" domain name variable that contains just example.com.
The email address for each user actually is email@example.com
. Accepting mail as firstname.lastname@example.org
is done via an email server alias (which must be added to each vsite manually). That's how you can have two separate virtual sites on the server, host1.example.com and host2.example.com, and ensure mail gets delivered to the proper domain. Note that in the example above, only one of the two vsites could have the email alias "example.com" and accept all mail for email@example.com
addresses. Mail to the other domain would have to be user@hostN.example.com
If the mail server alias field is set for a vsite, internally (in the sendmail file /etc/mail/virtusertable) mail addressed to firstname.lastname@example.org
is rewritten to be to email@example.com
, which is then aliased to a local username. By default, the RaQ only accepts mail addressed to firstname.lastname@example.org
As a side note, this email address "rewriting" is the reason that you should never use CNAME records to define your hosts (www.example.com,
example.com, mail.example.com, etc) for a Cobalt-hosted domain; always use A records. Because of the address "rewriting", a CNAME record for www.example.com,
pointing to example.com, can cause a DNS lookup loop and the dreaded "Max recursion" error.