On Sat, May 18, 2013 at 10:38:23AM -0700, Umar Draz wrote:

> I want to use multiple SMTP relays for my domain @example.com through
> sender_dependent_relayhost

You probably don't really want to do this (or more precisely you
think you want this, but lack the right information to conclude
that this is a mistake and there is a much better solution).

> Here is my sender_dependent_relayhost_maps
> 
> @example.com       smtp.post1.com
> @example.com       smtp.post2.com
> @example.com       smtp.post3.com

This is not how Postfix maps work, but almost certainly we need
not bother to correct this, since what you're trying is likely
not the right approach in the first place.

What is your actual goal?  Are you operating a border MX host?
An internal mailhub?  A submission server?  A mailbox hosting
SMTP server?  Or some combination of the above?

Which email messages are you trying to deliver? where are you trying
to deliver them?  Why?

My guess is you have a border server, and you want to send to multiple
internal relays, in that case, you need a transport table:

    main.cf:
        indexed = ${default_database_type}:${config_directory}/
        transport_maps = ${indexed}transport

    transport:
        example.com     relay:[relay.example.com]

    DNS:
        relay.example.com.      IN A 192.0.2.1
        relay.example.com.      IN A 192.0.2.2
        relay.example.com.      IN A 192.0.2.3

If you can't add A records to the zone file for example.com, you
can always add these to the "localhost." zone on the MTA.

    transport:
        example.com     relay:[relay.example.com.localhost.]

    DNS:
        relay.example.com.localhost.    IN A 192.0.2.1
        relay.example.com.localhost.    IN A 192.0.2.2
        relay.example.com.localhost.    IN A 192.0.2.3

with the localhost zone served by the caching resolver on the MTA.

-- 
        Viktor.

Reply via email to