[Exim] relay AND routing

Top Page
Delete this message
Reply to this message
Author: Aram Galestian
Date:  
To: exim-users
Subject: [Exim] relay AND routing
Hi,,
I know this is very common question but i have not found any answer
We use Exim 4 as Gateway server for inbound and outbound routing.
There is some problem i have not a qlue to resovl
1- I need to allow my internal server us exim to relay outbound messages.
But Exim do not allow my server to relay..!

2- I need prevent all messages from @mydomain.com to @mydomain.com
it case. i wan to prevent any SMTP hosts to fake user1@mydomain to send
user2@???

Here is summery of my config
domainlist local_domains = @ : lsearch;/etc/exim/localdomains (contain
mydomin.com)
domainlist relay_to_domains =
hostlist relay_from_hosts = 172.31.11.5:172.31.11.3:127.0.0.1
acl_smtp_rcpt = acl_check_rcpt

begin acl

acl_check_rcpt:
accept hosts = :

  deny    local_parts    = ^.*[@%!/|]


  accept  local_parts    = postmaster:ravms:Mailer-Daemon
          domains        = +local_domains


  require verify         = sender/no_details


   deny    message       = host is listed in $dnslist_domain
          dnslists       = sbl.spamhaus.org : \
                           relays.ordb.org : \
                           opm.blitzed.org


  accept  domains        = +local_domains
          endpass
          message        = unknown user
          verify         = recipient/defer_ok/callout=5s/callout_defer_ok


  accept  domains        = +relay_to_domains
          endpass
          message        = unrouteable address
          verify         = recipient


  accept  hosts          = +relay_from_hosts
          # verify       = recipient


  accept  authenticated  = *?deny    message        = relay not permitted,
  not authenticated



   deny    senders       = *@partial-dbm;/etc/exim/access.db : \
                           dbm;/etc/exim/access.db


  deny    message        = unrouteable address
           hosts          = !127.0.0.1/8:0.0.0.0/0
!verify         = recipient