[exim] Restrict IPs to domains Mail Delivery

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Tech Gurus
Date:  
À: exim-users
Sujet: [exim] Restrict IPs to domains Mail Delivery
I need to restrict 10 of "relay_from_hosts" IPs to send only to 5 domains
,while allowing remaining IPs to send out to any domain (current
behavior). Relay_from_hosts has around 40 IPs , one per line.

Appreciate any insight

Thanks
John


Snippets from exim 4.84_2 config


relay_from_hosts = 127.0.0.1 : net-iplsearch;/etc/exim/relay_from_hosts
domainlist relay_to_domains =


accept  hosts         = +relay_from_hosts
          control       = submission
          control       = dkim_disable_verify


# Accept if the message arrived over an authenticated connection, from
# any host. Again, these messages are usually from MUAs, so recipient
# verification is omitted, and submission mode is set. And again, we do
this
# check before any black list tests.

  accept  authenticated = *
          control       = submission
          control       = dkim_disable_verify


# Insist that any other recipient address that we accept is either in one
of
# our local domains, or is in a domain for which we explicitly allow
# relaying. Any other domain is rejected as being unacceptable for
relaying.

  require message = relay not permitted
          domains = +local_domains : +relay_to_domains