A
A
Anton2015-08-13 23:49:11
Exim
Anton, 2015-08-13 23:49:11

Rule to block messages from local users?

Good afternoon.
There is Debian, exim.
It is necessary to write a rule that would prohibit sending messages by local users to any domains other than those explicitly listed in the specified file (/etc/exim4/dom). The rule is necessary for local users (not for smtp on localhost).
I tried the following:
In the file /etc/exim4/dom I registered domains, for example:

domain1.ru
domain2.ru

The config in the required block looks like this:
domainlist local_domains = lsearch;/etc/exim4/dom

acl_not_smtp = acl_check_not_smtp

begin acl

        acl_check_not_smtp:
               deny domains = !+local_domains
                        message = Bad domain

I send e-mail from the user, I get an error in the Exim log:
F=<> rejected by non-SMTP ACL: cannot test domains condition in non-SMTP ACL

What should this condition look like and is it needed at all?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question