[prev in list] [next in list] [prev in thread] [next in thread]
List: postfix-users
Subject: Re: different treatment for different From: domains
From: "D. R. Evans" <doc.evans () gmail ! com>
Date: 2023-02-16 18:33:43
Message-ID: 8fcd3e57-4e75-5708-d3dd-d96e24ae4151 () gmail ! com
[Download RAW message or body]
Wietse Venema wrote on 2/10/23 08:24:
> D. R. Evans:
>> I have a postfix setup that, for a long time, has done exactly what I want.
>> But now I have to change something and I have no idea how to make this
>> particular change:
>>
>> E-mail from several domains are sourced on my network. Now I need to treat
>> e-mail with the From: line
>> user@domain1.com
>> differently from e-mail with the From: line
>> otheruser@domain2.com
>>
>> Until now, both those From: lines have been treated the same -- some
>> processing, then mostly sent to a relayhost, with some specific destinations
>> handled via the transport map; but now I need to send all e-mails with the
>> second From: line to a different relayhost from the one that handles the first
>> From: line.
>
> There are two features that support sender-dependent routing:
>
> sender_dependent_relayhost_maps
>
> This looks up a relayhost value that depends on sender.
> Like relayhost, this uses default_transport.
> It is seached with the envelope sender address and @domain.
>
> sender_dependent_default_transport_maps
>
> This overrides transport and destination.
> It is seached with the envelope sender address and @domain.
>
> In most cases, sender_dependent_relayhost_maps will do the job.
>
In a (failed) attempt to get this working, I have added the following to main.cf:
sender_dependent_relayhost_maps=hash:/etc/postfix/relayhost_maps
I have created the following /etc/postfix/relayhost_maps file:
----
@arrl.net [smtp.pobox.com]:587
----
I have done the usual
postmap /etc/postfix/relayhost_maps
and
postfix reload
but when I try to send an e-mail from my address n7dr@arrl.net it is still not
routed to smtp.pobox.com, but to the server designated on the normal
relayhost= line in the main.cf file.
Please, what am I doing wrong? The documentation seems pretty sparse in this
area, but my interpretation of what I can find is that the changes I have made
should work.
Thank you for your patience.
Doc Evans
--
Web: http://enginehousebooks.com/drevans
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic