how to configure centos 6 + sendmail with multiple domain

Discussion in 'Installation/Configuration' started by GioMBG, Sep 23, 2011.

  1. GioMBG

    GioMBG New Member

    Hi All,
    I have a centos 6 + sendmail that go perfect on the unique domain set, it send and regularly receive without problem on this unique domain.
    Now I have point to this machine a new domain, how I have to do to be able the machine to receive and send with this new domain?
    thx
    GioMBG
     
  2. nbhadauria

    nbhadauria New Member

    Method 1

    The first step is to make sure that the following feature is included in your sendmail.mc file prior to installing Sendmail:
    FEATURE(`virtusertable', `dbm /etc/mail/virtusertable')dnl

    This lets Sendmail know that you will be creating a virtual user table to allow support for multiple domains.

    Once that is set up and Sendmail is installed, you can work with virtual hosting by using the file /etc/mail/virtusertable, which will look something like this:

    [email protected] tom
    [email protected] harry
    [email protected] tom2
    @domain1.com root

    The first argument above is the intended recipient as received by Sendmail, and the second argument is the target is for local delivery (or for forwarding to another Internet e-mail address). On mail servers that host mail for many domains, it might be a good idea to create a separate file for each domain and concatenate them with a simple script.

    After creating the necessary /etc/mail/virtusertable, there's one more step: A database must be created. Sendmail will not load the plain text file in this case but will look for virtusertable.db. You can create this file with the following command (run as root):

    makemap dbm /etc/mail/virtusertable < /etc/mail/virtusertable

    Method 2:

    Use Webmin
     

Share This Page