Hi,

I got this domain example.tld for which I need to relay all mail FROM
this domain through a specific mail server. For this I tried to deploy
sender_dependent_default_transport_maps.

main.cf:
--------
default_transport = smtp
mydomain = example.info
relay_domains =
        $myhostname, localhost.$mydomain, example.tld, example.info
relay_transport = relay
relayhost =
smtp_fallback_relay = $fallback_relay
transport_maps = hash:/etc/postfix/transport
sender_dependent_default_transport_maps =
        hash:/etc/postfix/sender_dependent_transport

/etc/postfix/sender_dependent_transport:
----------------------------------------
@example.tld             smtp_example:

master.cf:
----------
smtp_example unix - - y - - smtp
        -o syslog_name=postfix-example
        -o relayhost=[example_server1]:25
        -o smtp_fallback_relay=[example_server2]:25

telnet localhost 25
        HELO mx1.example.info
        MAIL FROM: <robert.dah...@example.tld>
        RCPT TO: <robert.dah...@gmx.net>
        DATA
        Test
        .
        QUIT

I do see that the syslog_name postfix-example gets used and it only gets
used when the sender is in @example.tld .

But mail does not get relayed through example_server1 but by resolving
the recipients domain through DNS:

Feb 13 12:09:29 mx1 postfix-example/smtp[19556]:
        DA87DA66B4: to=<robert.dah...@gmx.net>,
        relay=mx01.emig.gmx.net[212.227.17.5]:25,
        delay=3.3, delays=3/0/0.12/0.2, dsn=2.0.0,
        status=sent [...]

Could someone give me a pointer to what's wrong here? Thanks in advance!

Kind regards,
Robert

Reply via email to