Jacky Chan wrote:
Dear All,
As subject. Does the following configuration meet the subject?
192.168.1.55 and 192.168.1.56 can only send mail to subdomain1.abc.com,
subdomain2.abc.com
And others IP in 192.168.1.0/24 can send mail to subdomain1.abc.com,
subdomain2.abc.com and outsiders, is that achieved by the following
configuration?
#/etc/postfix/main.cf
mynetworks = hash:/etc/postfix/access
smtpd_client_restrictions = check_client_access hash:/etc/postfix/access
smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination
smtpd_restriction_classes = local_only
local_only = check_recipient_access hash:/etc/postfix/local_domains, reject
# /etc/postfix/access
192.168.1.55 REJECT
192.168.1.56 REJECT
192.168.1.0/24 OK
# /etc/postfix/local_only
subdomain1.abc.com OK
subdomain2.abc.com OK
No, the above will not work, there are multiple errors.
Use the example I sent you earlier, and read the documentation
for mynetworks I pointed out to you in the earlier mail.
Feel free to ask any question you may have about using
mynetworks, but don't make up your own syntax.
For your stated problem you do not need
smtpd_restriction_classes, nor an access map. The mynetworks
parameter is intended exactly for what you have asked for.
--
Noel Jones