279141Re: changing relayhost based on sender
- Aug 3, 2011Hi Michael,Did you try to unset the default relayhost and then setup sender_dependent_relayhost_mapsfor the domains and users that should have a relayhost AND no setup maps for the domainsand users that should not have a relayhost?Also, may be there is another way to accomplish what you want... What about to talk aboutwhat is the final effect you are trying to get using those relayhost techniques you are askingabout?
Fernando Maciel Souto Maior
Projetos e Soluções de Tecnologia
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!
- << Previous post in topic