Was just trying to understand what’s the best way to update mynetworks configuration.
So far, the best way I found was by having it in the extra.cf file.

I need to allow some hosts to be able to send using internal domains, and those are seen as non existing domains by MailCow.

Mailcow resides on a different infrastructure, so having those domains resolved might be a bit more complicated than just allowing certain IPs.

Is there a better way?
Any suggestion?

Adding the host’s IP to “Forwarding Hosts” doesn’t suffice?

    Have something to say?

    Join the community by quickly registering to participate in this discussion. We'd like to see you joining our great moo-community!

    DocFraggle eh no, was the 1st thing I tried. Apparently the check for reject_unknown_sender_domain happens before.

    a year later

    Same issue here…

    Any idea on how to configure postfix to “bypass” smtpd_sender_restrictions when message is sent from a configured “forwarding host” without adding the forwarder IP to “mynetwork” postfix’s variable?

    esackbauer unfortunately it’s not enough… I still get the following errors even for messages sent by IP address with “permit” in that file:

    Sender address rejected: Domain not found (in reply to RCPT TO command)

    Seems like the only way to bypass that is to add the forwarder IP into “mynetworks”…

    Looking at the restrictions, it seems coherent though….

    smtpd_sender_restrictions = reject_authenticated_sender_login_mismatch,
      permit_mynetworks,
      permit_sasl_authenticated,
      reject_unlisted_sender,
      reject_unknown_sender_domain
    No one is typing