postfix not relying mail from remote hosts

Solution 1:

Postfix is asking what to do when it receives email for not your domain.

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination

That should work and it also keeps you from relaying mail for spammers.

Solution 2:

As per the last line of the posted log, you need to change your smtpd_relay_restrictions configuration to include one of the following (personally, I would use reject to explicitly reject anything I don't permit):

  • reject_unauth_destination
  • defer_unauth_destination
  • reject
  • defer
  • defer_if_permit
  • check_relay_domains

The smtpd_relay_restrictions option (as with most of the restriction options within Postfix) reads much the same as an iptables firewall chain - the first rule to match the content wins, and the last in the chain is used if no others match, so you must have a "catch-all" option defined as the last option in the chain.