0

I configured my postfix server to relay all received mails to smtp.example.com with relayhost. This server doesn't accept mails from an external source. So only scripts are sending mails.

Is it possible to configure postfix that all mails with a specific mail address in FROM field, like script@domain.net (or also the whole domain: domain.net) are send directly by the server to the corresponding mx server for the TO-address, instead of using the specified relay host?

I found one possibility to specify a specific host if a specific mail address is in the TO field, but not the FROM field: How can I configure Postfix to ignore relayhost for some domains? and http://www.postfix.org/transport.5.html

Thanks!!

Stefan Profanter
  • 365
  • 1
  • 5
  • 17
  • or also the other way around is possible where all mails with @example.com in from field are relayed to a specific host, all others sent directly. – Stefan Profanter Oct 10 '12 at 16:04

1 Answers1

1

You didn't look closely enough.

You'll want sender_dependent_relayhost_maps or one of the things that override it.

84104
  • 12,905
  • 6
  • 45
  • 76