Answer the question
In order to leave comments, you need to log in
Postfix, how to allow not everyone to send to the outside world?
Greetings!
It is necessary to allow sending to the outside world to several users, the remaining users only local correspondence.
Tried like this:
main.cf file
smtpd_recipient_restrictions = check_sender_access texthash:/etc/postfix/restricted_senders, ....
smtpd_restriction_classes = local_only
local_only = check_recipient_access texthash:/etc/postfix/local_domains, reject
[email protected] local_only
[email protected] local_only
[email protected] local_only
mx.test.ru OK
Answer the question
In order to leave comments, you need to log in
By the method of gouging the brain and poke, the solution turned out like this.
file /etc/postfix/restricted_senders change to this:
mx.test.ru local_only
[email protected] permit
[email protected] permit
[email protected] permit
smtpd_recipient_restrictions = check_sender_access ldap:/etc/postfix/restricted_senders.cf,
check_sender_access texthash:/etc/postfix/restricted_senders,
...,
...
smtpd_restriction_classes = local_only
local_only = check_recipient_access texthash:/etc/postfix/local_domains, reject
server_host = 192.168.111.2
server_port = 389
version = 3
bind = yes
start_tls = no
bind_dn = [email protected]
bind_pw = 123qwe
search_base = ou=Struktura,dc=developer,dc=com
scope = sub
query_filter = (&(mail=%s)(objectClass=person)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))
result_attribute= postalCode
debuglevel = 0
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question