Can you use a pcre/regex map instead?

Ken

On Wed, Mar 17, 2010 at 04:53:37PM -0400, Ryan Suarez wrote:
> Noel Jones wrote:
>> On 3/17/2010 3:35 PM, Ryan Suarez wrote:
>>> Greetings,
>>>
>>> I would like to reroute mail for all our recipients if a certain header
>>> is present.
>>>
>>> Eg. Mail to 'm...@mydomain.org' has the header 'SomeHeader'. I would like
>>> to reroute this email to 'm...@some-server.mydomain.org'.
>>> What is the best way to accomplish this in postfix?
>>>
>>> thanks,
>>> Ryan
>>
>> See http://www.postfix.org/header_checks.5.html and look for the REDIRECT 
>> action.  Use it with a header_checks rule something like:
>>
>> /^X-MyHeader: foo/  REDIRECT u...@example.com
>>
>>   -- Noel Jones
>
> Thanks for the response Noel.  It looks like REDIRECT only works with a 
> specific destination.  I would like it to work for all users.  Eg.
>
> m...@mydomain.org, header 'MyHeader'  ---> m...@foo.mydomain.org
> y...@mydomain.org, header 'MyHeader' ---> y...@foo.mydomain.org
> u...@mydomain.org, header 'MyHeader' ---> u...@foo.mydomain.org
>
> Does an entry in header_checks need to be defined for each recipient?  If 
> so, it wouldn't be feasible due to the number of addresses we have.
> Is there another way to accomplish this?
>
> regards,
> Ryan
>

Reply via email to