Results 1 to 2 of 2

Thread: Postfix Address Rewriting

  1. #1
    Join Date
    Jun 2010
    Rep Power

    Default Postfix Address Rewriting

    I'm looking for a hint how to rewrite header_recipient_address by replacing it with envelope_recipient_address for all the messages coming from the particular envelope_sender_address = header_sender_address, for example:

    Incoming message:
    MAIL FROM:<>
    RCPT TO:<>
    Message-Id: <>[U]
    To: dummy_address
    Subject: Test message

    Modified message, which Postfix should post into the queue:
    MAIL FROM:<>
    RCPT TO:<>
    Message-Id: <>
    Subject: Test message

    According to the Postfix FAQ, there is no way to do it with Postfix header_checks because of the following:

    65. Using header_checks or body_checks can I make conditional comparisons? Something like, for example:

    /^to: joey/ AND /^subject: hot deals/ REJECT

    so that certain subjects are blocked only for certain users.

    This won't work because Postfix header and body checks can only consider one logical message line at a time. They're meant for simple checks.
    If you need anything more sophisticated, you should set up a content filter that has the smarts you need.

    Thanks In Advance!
    Last edited by chalex; 06-14-2010 at 06:29 AM.

  2. #2
    Join Date
    Sep 2006
    477 Congress Street | Portland, ME 04101
    Rep Power


    Not sure why the sending client has an envelope recipient on which you need to filter/rewrite; perhaps you are needing to support legacy domains?

    In any event, Postfix Address Rewriting has a great explanation of the various address rewriting methods available in Postfix as well as some tips on when you might use one method over another.

    There is also an active Postfix discussion list; since this question is much more about Postfix than Zimbra, you may find some inspiration there as well.

    Hope that helps,

    P.S. Note that any changes you make to Postfix outside of using zmlocalconfig will need to be redone after each Zimbra upgrade.

Similar Threads

  1. postdrop fail to create file after upgrade to 5.0.3
    By echoadisan in forum Installation
    Replies: 23
    Last Post: 07-15-2013, 03:02 PM
  2. Replies: 9
    Last Post: 10-25-2009, 08:20 AM
  3. [SOLVED] Distribution list
    By chandu in forum Administrators
    Replies: 16
    Last Post: 04-02-2009, 05:17 AM
  4. changed ip addr/zmmailboxdctl not running
    By pwhite76 in forum Installation
    Replies: 23
    Last Post: 03-11-2009, 11:43 AM
  5. DMZ relay to Zimbra internal host
    By swordfish in forum Installation
    Replies: 12
    Last Post: 02-04-2009, 10:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts