Exim4: Deny outgoing emails with specific destination domains to being sent to the smarthost
Posted
by
Yoann P
on Server Fault
See other posts from Server Fault
or by Yoann P
Published on 2014-08-22T10:27:08Z
Indexed on
2014/08/23
16:24 UTC
Read the original article
Hit count: 316
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,
© Server Fault or respective owner