Hi,

We have a filter located outside our organization for outgoing mail which rewrites the Return-Path to their domain, in the form: username=abc....@theirdomain.com. Once the filter processes the message, it's forwarded to the destination where these headers are received:

Return-Path: username=abc....@theirdomain.com
From: Foo <usern...@abc.com>

This destination instance also has this configuration for Postfix:

  sender_canonical_maps = regexp:/etc/postfix/sender_canonical_maps

sender_canonical_maps:
  /^(.*)@abc.com$/   ${1}@xyz.com

What I want to achieve is rewriting sender address when it's received from a specific domain (concretely, abc.com). As per the sender_canonical_maps documentation: Optional address mapping lookup tables for envelope and header sender addresses.

I know the Return-Path doesn't match the regexp, but I believe the From header does. Why it's not rewritten to usern...@xyz.com? Am I missing something?

FWIW, this is Postfix v. 2.9.6-1.

Thanks.

Reply via email to