Gary Aitken:
> On 2/17/21 2:17 PM, Wietse Venema wrote:
> > Gary Aitken:
> >> < mail-pf1-f170.google.com[209.85.210.170]: DATA
> >>> mail-pf1-f170.google.com[209.85.210.170]:
> >>     554 5.5.1 Error: no valid recipients
> > 
> > That is incomplete. There is also an RCPT TO command, plus a response
> > from Postfix that says why the recipient is rejected.
> 
> Thanks, here's what I see:
> 
> 3096  RCPT TO

This is the line that I was looking for. 

        NOQUEUE: reject: RCPT from mail-pf1-f182.google.com[209.85.210.182]:
          554 5.7.1 <someb...@postfix-server-domain.com>: Recipient
          address rejected: Access denied; from=<m...@other-domain.com>
          to=<someb...@postfix-server-domain.com> proto=ESMTP
          helo=<mail-pf1-f182.google.com>

Here is the rule that does it:

    smtpd_recipient_restrictions =
      permit_mynetworks,
      reject

According to debug logging:
    generic_checks: name=permit_mynetworks status=0
    generic_checks: name=reject

permit_mynetworks returns no match, therefore the recipient is rejected.

Documentation: 

http://www.postfix.org/postconf.5.html#permit_mynetworks

       permit_mynetworks
              Permit the request when THE CLIENT IP ADDRESS matches
              any  network or network address listed in  $mynetworks.

http://www.postfix.org/postconf.5.html#mynetworks

mynetworks (default: see postconf -d output)
        ...
       Specify a list of network addresses or network/netmask
       patterns,  separated  by commas and/or whitespace. Continue
       long lines by starting the next line with whitespace.
        ...

Note the "CLIENT IP ADDRESS". You have domain names in mynetworks.

        Wietse

Reply via email to