Sunday, September 27, 2009

SENDMAIL Notes 12: Sendmail Mailertable


   
    It is a type of mail relaying. It is useful when using the virtual domains. for example if you want to forward mails to internal protected server in DMZ zone after the content scanning, mailertable can provide a solution rather than using the smarthost or nullclient.

Configuring the Mailer Table:


Configure the following in the server which is configured to recieve the mails through MX record.
Create the /etc/mail/mailertable
#vim /etc/mail/mailertable
(The format is as follows
Left Column                                      
domain name                                       
(To which domian it accepts          
the mail for)

Right Column
Routing Rules:
(Specify the mailer type(smtp or local):
user@domain or FQDN of host))
kiran.com        smtp:internalhost.kiran.com
jithu.com        smtp:jeo@mail1.jithu.com

    Here any mail that comes to domain kiran.com will be forwarded to internalhost.kiran.com and all the mail comes to domain jithu.com will forward to the user jeo at host mail1.jithu.com.

For Example:
This used primarily in the following scenario.
We have the mailertable enabled server facing the internet configured with MX record and all the mail scanning softwares. And other servers will be inside the network. So the mailertable enabled server recieves the mail primarly, scans the mail and forwards to respective servers according to the configuration in mailertable. So all the mails for a domain can be accepted by a single system and after scanning the mails can be redirected to respective sub-domains.

Now create the db file of mailertable
#makemap hash mailertable < mailertable
Now configure the sendmail for the Feature of mailertable. Edit the sendmail.mc file
FEATURE(`mailertable')dnl
    This will enable the mailertable support in sendmail.
# compile configuration file with m4 to create sendmail.cf file and restart the sendmail

No comments:

Post a Comment

tag ur valuable ideas below