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

279141Re: changing relayhost based on sender

Expand Messages
  • Fernando Maior
    Aug 3, 2011
    • 0 Attachment
      Hi Michael,

      Did you try to unset the default relayhost and then setup sender_dependent_relayhost_maps
      for the domains and users that should have a relayhost AND no setup maps for the domains
      and users that should not have a relayhost?

      Also, may be there is another way to accomplish what you want... What about to talk about
      what is the final effect you are trying to get using those relayhost techniques you are asking

      Best regards,
      Fernando Maciel Souto Maior
      Projetos e Soluções de Tecnologia
      LPIC/1(31908), LinuxCounter(391325)

      On Thu, Aug 4, 2011 at 2:38 AM, Michael Barrett <loki77@...> wrote:
      Hi, I'm searching for a way to effectively unset relayhost whenever an email goes through my postfix 2.7.0 server with a from address coming from either a specific email address, or from a specific domain or any email address from one of its subdomains.

      sender_dependent_relayhost_maps seems like the right place to go with this, but I don't see a way to use a blank relayhost entry for the given email address.

      Basically I imagine it like this:

      # in main.cf
      relayhost = smtp.example.com
      sender_dependent_relayhost_maps = hash:/etc/postfix/sender_maps

      # in sender_maps
      blah@...         <unset relayhost>
      .foo.com                <unset relayhost>
      foo.com                 <unset relayhost>

      Let me know if I'm looking at this in the totally wrong way - thanks a ton!

      Michael Barrett

    • Show all 2 messages in this topic