On Mon, Apr 15, 2013 at 04:17:23PM -0400, Homer Wilson Smith wrote:
> 
>     Dear Gentle Folk,
> 
>     I wish to relay all mail from our outgoing mail server,
> smtp.lightlink.com, through a default outgoing barracuda, EXCEPT
> mails FROM specified addresses that wish to do large authorized
> mailings that tend to bury the barracuda.  These exceptions should
> be delivered directly by the outgoing mail server,
> smtp.lightlink.com
> 
>     I have
> 
>     sender_dependent_relayhost_maps = hash:/etc/postfix/relayhost
> 

Instead use:

    main.cf:
        # If you have cdb, adjust accordingly if not
        default_database_type = cdb

        indexed = ${default_database_type}:${config_directory}/
        sender_dependent_default_transport_maps = ${indexed}sender-transport

        # Default transport for all senders, includes the default relay
        default_transport = smtp:[relay.example.com]

        # Empty default relayhost!
        relayhost =

    sender-transport:
        # The smtp transport with no nexthop sends direct, since relayhost
        # is not set.  The senders below bypass the default transport which
        # specifies the normal relay
        bu...@example.com       smtp
        bu...@example.com       smtp
        ...

Don't forget to postmap the sender-transport file:

    Makefile:
        all: sender-transport.cdb

        sender_transport.cdb: sender-transport
                postmap cdb:sender-transport

-- 
        Viktor.

Reply via email to