Exim4: Deny outgoing emails with specific destination domains to being sent to the smarthost
- by Yoann P
I try to deny outgoing emails with specific destination domains to being sent to the smarthost but unsuccessfully.
I'm on a debian "squeeze" configured to use a smarthost.
vi /etc/exim4/conf.d/acl/30_exim4-config_check_rcpt
Add right after "acl_check_rcpt:"
deny
message = Domain $domain is prohibited for outgoing mails
domains = lsearch;/etc/exim4/restricted_domains
Reload exim, but the mails to the restricted domains continue to go out
I also tried to add the acl_not_smtp after reading this post but without success either.
vi /etc/exim4/conf.d/main/02_exim4-config_options
Add "acl_not_smtp = acl_check_not_smtp"
vi /etc/exim4/conf.d/acl/30_exim4-config_check_rcpt
And add at the top of the file
acl_check_not_smtp:
deny
message = Domain $domain is prohibited for outgoing mails
domains = lsearch;/etc/exim4/restricted_domains
Can anybody point me what i'm doing wrong please?
Thanks,
Best regards,