Mailscanner gateway using sendmail

Kit Wong Kit at simplysites.co.uk
Wed Jan 16 16:03:22 GMT 2008



-----Original Message-----
From: mailscanner-bounces at lists.mailscanner.info
[mailto:mailscanner-bounces at lists.mailscanner.info] On Behalf Of Juan
Pablo Lorier
Sent: 16 January 2008 13:16
To: mailscanner at lists.mailscanner.info
Subject: RE: Mailscanner gateway using sendmail

Hi kit,

I just made a gateway and I think that what you should do is edit 
/etc/mail/mailertable and add the domains with their IPs so sendmail 
knows how to relay the mails.

Domain.1.com  smtp:[ip.addr.mail.srv1]
Domain.2.com  smtp:[ip.addr.mail.srv2]

I think this way, the mails to domain.1.com are sent to mailserver 1 and

those to domain.2.com are sent to mailserver 2.

Check it and tell me if this is correct.
Regards
--
MailScanner mailing list
mailscanner at lists.mailscanner.info
http://lists.mailscanner.info/mailman/listinfo/mailscanner

Before posting, read http://wiki.mailscanner.info/posting

Support MailScanner development - buy the book off the website!

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
----------------------------------------------------
Yes that is correct.

Setting up 'mailertable'

To set up 'mailertable', you need to edit your sendmail .mc file and add
the following line:

FEATURE(`mailertable')

After doing this, you need to using the script supplied with the
Sendmail source to rebuild your configuration file.

Now, open your new Sendmail configuration file and look for this (it
should be in the first couple hundred lines of the file):

Kmailertable hash /etc/mail/mailertable


This defines where the 'mailertable' file should be, and in this case it
is in /etc/mail.

Now let's go back to my previous example of being a secondary MX host
for friendsdomain.com. If I wanted to do this with 'mailertable', I
could add the following line to my /etc/mail/mailertable:

friendsdomain.com      smtp:[mx1.friendsdomain.com]

After editing this file, you must create a database map of this file for
Sendmail to read. Do this by running:

/usr/sbin/makemap hash /etc/mail/mailertable.db < /etc/mail/mailertable

Now all that's left to be a secondary MX host for friendsdomain.com is
to add the domain to your relay domains file. In my case, that file is
/etc/mail/relay-domains. Add the following line:

friendsdomain.com

Then you must make sure that local-host-names do not have
friendsdomain.com in it 



More information about the MailScanner mailing list