[exim] Drop smtp connection from non-allowed-to-relay server…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: 3YSTech Services
Dátum:  
Címzett: Exim-users
Tárgy: [exim] Drop smtp connection from non-allowed-to-relay servers
Hello,

I need to restrict EXIM smtp response to only mail relay clients defined in
relay_from_hosts. I need EXIM server to reject/drop any smtp connection
from any servers other than loaclhost or mail relay clients (IPs or
hostnames).

I restrict relay to client IPs allowed to relay. I have one file for relay
clients IPs and one for hostnames : /etc/exim/relay_hosts and
/etc/exim/relay_ips.

I tried different variations of ACL below with no luck.

Any feedback is appreciated

Thanks



acl_smtp_helo = acl_check_helo

hostlist allowed_helo = lsearch;/etc/exim/relay_hosts

acl_check_helo:
    hosts = +allowed_helo
   deny message     = Not authorized relay to connect .
   log_message = Reject non relay
   deny   condition   = ${lookup
{$sender_helo_name}lsearch{/etc/exim/relay_hosts}{yes}{no}}


accept