Re: Email Gateway solution

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 10, 2005 at 09:33:09AM -0500, Steve Buehler wrote:
> I am trying to setup a mail gateway using Sendmail.  We have a 
> server2 (with 200 domains) that we would like to lighten the load on 
> by having all outgoing mail go through a mail gateway for virus 
> checking.  This is already working.  Running SpamAssassin, 
> MailScanner and ClamAV along with all of the websites really slows 
> things down and that is why we are wanting to do this.  What I now 
> want to do is to setup the mail gateway as the incoming mail server 
> for all domains on server2, virus and spam check the emails, then 
> send them on to server2 for local delivery.  I don't know how to set 
> this part up and was hoping somebody here could help me.  I can setup 
> the MX records to point to the gateway, but don't know how to setup 
> the gateway to send all of the mail onto server2 after checking for 
> spam and viruses.

You can do this by configuring mailertable, access, and local-host-names

For example, to route all the mail from example.domain to
relay.example.domain, follow these instructions:

[root@post1 mail]# cat mailertable
# External relay mailertable
#
# Routing overview (MX, external mailertable, internal local-host-names)
#
# Mail to each domain (virtual or otherwise) hosted is directed via MX
# records to the external mail relay systems.  The access database is
# consulted to determine if the mail should be relayed.  If relaying is
# permitted for the domain and if the external relay has a mailertable
# entry for the domain, it is used to further route the message,
# otherwise the message is routed to the next lower precidence MX host.
# If there is neither a mailertable entry nor another MX host the mail
# is bounced.
#
# Once the mail reaches the internal mail relay, the relay compares the
# destination address with its list of local names, and if there is a
# match, the message is further routed via aliases or virtusertable
# entries.  If there is no match, the mail will bounce.
#
# Simple rules:
#
# External relay /etc/mail/access 
        example.domain          RELAY
#
# External relay /etc/mail/mailertable 
        example.domain          relay:relay.example.domain
#
# Internal relay /etc/mail/local-host-names
#       example.domain
#
# To rebuild the mailertable database: 
#       makemap hash /etc/mail/mailertable.db < /etc/mail/mailertable
#
###############################################################################
#
# Primary domain name
#
example.domain                  relay:relay.example.domain

-- 
Ed Wilts, RHCE
Mounds View, MN, USA
mailto:ewilts@xxxxxxxxxx
Member #1, Red Hat Community Ambassador Program

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux