Wow! A response from the author of postfix itself. I am really honoured. Let me take this opportunity to thank you for writing such a great piece of software.

Next coming to the solution, I used these settings in my main.cf:

relayhost =
default_transport = smtp:[relay.example.com]

This addressed my problem perfectly.

Thanks,
Rahul.

On Sunday 11 September 2011 10:55 PM, Wietse Venema wrote:
Rahul Amaram:
I would like to know if such a thing would be feasible. I want to
disable relayhost for only mails being delivered to "relay_domains". For
delivery of mails to other domains, relayhost should be used. I tried
passing the option "relayhost=" to the relay transport in master.cf but
that did not work. Is such a thing possible?
As documented:

POSTCONF(5)                                                        POSTCONF(5)

relayhost (default: empty)
        The next-hop destination of non-local mail; overrides non-local domains
        in recipient addresses. This information is overruled with relay_trans-
        port,    sender_dependent_default_transport_maps,    default_transport,
        sender_dependent_relayhost_maps and with the transport(5) table.

Thus, try using the transport(5) table.

        Wietse

Reply via email to