Score:0

postfix multiple domain relay host

in flag

I'm failing at getting postfix to handle relaying for multiple domains.

The situation:

I'm trying to set up a mail relay for multiple entities each with multiple domains.

Mails from any given entity to itself should be relayed to that entitys local MS Exchange server, all other mail should be relayed via an external mail server.

What I've tried:

master.cf:
    localhost:6127  inet n - y - - smtpd
        -o relayhost=
        -o transport_maps=/dev/null
        -o syslog_name=postfix/myTest
        -o sender_dependent_relayhost_maps=hash:myTest_senders
        -o default_transport=smtp:external.Mail.Server:587

myTest_senders:
    myTest.dom  relay:[internal.exchange.server]:25     # also tried smtp: ...


main.cf:
    transport_maps =  hash:/etc/postfix/transport

/etc/postfix/transport
    myTest.tld  smtp:[127.0.0.1]:6127

What happens:

Mails for [email protected] are correctly routed to localhost:6127 and, if the sender is [email protected], the result is "554 5.4.0 Error: too many hops"

I'm completely stumped here and would greatly appreciate any pointers.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.