Basic Virtual Domains
Sendmail allows to host multiple domains in single instance. The Basic Virtual Domain can be created using local-host-name file. When sendmail receives mail, it needs a way of determining whether it is responsible for the mail it receives. It uses the /etc/mail/local-host-names file to do this. This file has a list of hostnames and domains for which sendmail responsible for mail.
For example, if this mail server was to accept mail for the domains kiran.com and jithu.com then the file would look like this:
# cat /etc/mail/local-host-names
kiran.com
jithu.com
jithu.com. MX 10 mail.kiran.com.
Note:
The mail server will default acceptance of mail for its FQDN defined without the entry in local-host-names.
Virtual users and virtual domains:
This is defined using the virtual user table feature in sendmail configuration.The file used is virtusertable in /etc/mail. While defining the virtusertable the domain name should not exist in local-host-names.
The /etc/mail/virtusertable file contains a set of simple instructions on what to do with received mail. The first column lists the target email address and the second column lists the local user's mail box, a remote email address, or a mailing list entry in the /etc/aliases file to which the email should be forwarded.
If there is no match in the virtusertable file, sendmail checks for the full email address in the /etc/aliases file.
Defining the virtual domains and users (Keep in mind that the exact MX record has been added to respective domains):
FEATURE(`virtusertable')dnl
VIRTUSER_DOMAIN_FILE(`-o /etc/mail/virtuserdomain')dnl
VIRTUSER_DOMAIN_FILE(`-o /etc/mail/virtuserdomain') it looks up the various domains that supported by sendmail in this given path.
#compile configuration and restart the sendmail service
#edit /etc/mail/virtuserdomain
kiran.com
jithu.com
#create/edit /etc/mail/virtusertable
user1@kiran.com kiran@someotherdomain
user2@jithu.com jithu
#makemap hash virtusertable < virtusertable
#Now restart the sendmail service
Other options in virtusertable:
@fazi.com jithu
@jithuki.com kiran
@mydomain.com mailuser@remotedomain.com
No comments:
Post a Comment
tag ur valuable ideas below