Setting up a Gateway

Julian Field mailscanner at
Fri Jun 28 12:31:31 IST 2002

Can I just point out something:

In order to get mail from, for example, an MX 10 server to an MX 5 server,
you don't need any special sendmail rules at all. If you have a
file (or other way of getting entries into class w), then just put         RELAY
in there and it will all do it for you. You'll probably need to convert the
file into a db or hash using makemap, but I'll leave that up to you.

By definition, one of the jobs of a low priority (high number) MX server is
to forward mail to a "better" MX server. You just need to give it
permission, then leave it to it.

Then when you are sending mail, you can do what you like.

It's about time this discussion got moved to a sendmail list, it's getting
rather OT for this list.

At 10:13 28/06/2002, you wrote:
>My method (so far) is to do this:
>Both mailservers have live ip addresses as well as internal addresses.
>The external ip address on the scanner/gateway server is in dns as the MX 10
>for each domain to be scanned.
>The internal ip address on the internal server is in dns as the MX 5 for
>each domain to be scanned.
> on the internal server routes all outgoing email to the external
>ip address on the gateway server.
>What happens is:
>mail arriving goes first to MX 10 on the external address as it can't go
>direct to MX 5 on the internal address
>mail gets scanned or ignored per mailscanner rules
>scanned mail can now be relayed from MX 10 to MX 5 as both servers are on
>internal addresses
>scanned mail arrives at MX 5 and is dumped in mailboxes
>outgoing mail will always leave via the gateway server because of the
> rule
>This all seems to work ok with one major exception.
>On the (original) internal server, I queue mail for several dialup customers
>who collect by smtp/ETRN. (at present these are not being scanned).
>The sendmail rule that I have used as above sends their mail back to the
>gateway server, which then loops it back to the internal, which then
>These messages never get queued and never get collected.
>I'm open to suggestions on how to resolve this...
>Martyn Routley
>InvictaNet - The Internet in Plain English, Guaranteed
>info at
>phone: 08707 440180
>fax: 08707 440181
>Please Note:
>All services are provided on the basis that they are
>business to business and that the
>Consumer Protection (Distance Selling) Regulations 2000
>do not apply.
>-----Original Message-----
>From: MailScanner mailing list [mailto:MAILSCANNER at JISCMAIL.AC.UK]On
>Behalf Of Dan Cooper
>Sent: 28 June 2002 08:46
>Subject: Re: Setting up a Gateway
>I would be unable to follow Julians advice as layed out in the FAQ as our
>main mailserver  has to be available to the outside world.
>My plan was to just make the gateway machine a higher MX priority in the DNS
>for a particular domain, and then have sendmail place the mail in a mailbox
>on the gateway. Then a .forward file could go in the users home dir on the
>gateway machine, sending the mail to user at on the main
>This, however, did not seem to work, as the messages were not scanned by the
>gatweway prior to them being forwarded to the main mailserver.
>Any ideas why mailscanner would not scan these messages? all relevant
>domains were in the file.

Julian Field                Teaching Systems Manager
jkf at         Dept. of Electronics & Computer Science
Tel. 023 8059 2817          University of Southampton
                             Southampton SO17 1BJ

More information about the MailScanner mailing list