Loading ...
Sorry, an error occurred while loading the content.
 

sender_dependent_relayhost_maps (fwd)

Expand Messages
  • Homer Wilson Smith
    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
    Message 1 of 3 , Apr 15, 2013
      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

      #relayhost =

      sender_dependent_relayhost_maps = hash:/etc/postfix/relayhost

      relayhost file says

      * [barracuda.lightlink.com]:25
      friendly@... :

      the first line alone doesn't work, the second line doesn't either :)

      I apologize for my stupidity in advance.

      Thanks Homer

      ------------------------------------------------------------------------
      Homer Wilson Smith Clean Air, Clear Water, Art Matrix - Lightlink
      (607) 277-0959 A Green Earth, and Peace, Internet, Ithaca NY
      homer@... Is that too much to ask? http://www.lightlink.com
    • Wietse Venema
      ... I don t know what * or : is supposed to mean. They certainly are not documented for sender_dependent_relayhost_maps. What the documentation does
      Message 2 of 3 , Apr 15, 2013
        Homer Wilson Smith:
        > #relayhost =
        >
        > sender_dependent_relayhost_maps = hash:/etc/postfix/relayhost
        >
        > relayhost file says
        >
        > * [barracuda.lightlink.com]:25
        > friendly@... :

        I don't know what "*" or ":" is supposed to mean. They certainly
        are not documented for sender_dependent_relayhost_maps.

        What the documentation does support is:

        /etc/postfix/main.cf:
        relayhost = [barracuda.lightlink.com]:25
        sender_dependent_relayhost_maps = hash:/etc/postfix/relayhost

        /etc/postfix/relayhost
        friendly@... smtp.lightlink.com

        Don't forget "postmap hash:/etc/postfix/relayhost".

        As documented sender_dependent_relayhost_maps takes precedence over
        relayhost.

        Wietse
      • Viktor Dukhovni
        ... Instead use: main.cf: # If you have cdb, adjust accordingly if not default_database_type = cdb indexed = ${default_database_type}:${config_directory}/
        Message 3 of 3 , Apr 15, 2013
          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
          bulk1@... smtp
          bulk2@... 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.
        Your message has been successfully submitted and would be delivered to recipients shortly.