Very newbie relaying question

René Berber r.berber at computer.org
Thu May 3 18:19:01 IST 2007


Declan Grady wrote:

[snip]
> What do I need to do to my sendmail config to permit mail from my domain
> to be only accepted from internal IP's ?
> 
> I'm guessing I need to change my /etc/mail/access file somehow ?
> Currently it has (among other things)
> 
> mydomain.com             RELAY
> localhost.mydomain.com   RELAY
> mail.mydomain.com        RELAY
> mailserver.mydomain.com  RELAY
> mydomain.ie              RELAY
> exchange_server_name     RELAY

You are using the old syntax, which may not be what you want.

If all your server IPs are public then you are on the right track, if your 
servers have internal/external addresses you are better off using the internal ones.

An example of what you can do is access as:

# Allow relying from LAN
Connect:192.168.0                       RELAY
Connect:127.0.0.1                       RELAY
Connect:exchange_server_IP              RELAY
# Whitelist
Connect:other_external_IP               RELAY

And don't forget to 'compile' access (i.e. makemap hash /etc/mail/access < 
/etc/mail/access).
-- 
René Berber



More information about the MailScanner mailing list