Results 1 to 2 of 2

Thread: Postfix Address Rewriting

  1. #1
    chalex is offline Starter Member
    Join Date
    Jun 2010
    Posts
    2
    Rep Power
    4

    Default Postfix Address Rewriting

    Hello,
    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:
    EHLO domain.com
    MAIL FROM:<sender@domain.com>
    RCPT TO:<recipient@domain.com>
    DATA
    Message-Id: <xxxxxxxxxx@domain.com>[U]
    To: dummy_address
    Subject: Test message
    From: sender@domain.com

    Modified message, which Postfix should post into the queue:
    EHLO domain.com
    MAIL FROM:<sender@domain.com>
    RCPT TO:<recipient@domain.com>
    DATA
    Message-Id: <xxxxxxxxxx@domain.com>
    To: recipient@domain.com
    Subject: Test message
    From: sender@domain.com

    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
    LMStone's Avatar
    LMStone is offline Moderator
    Join Date
    Sep 2006
    Location
    477 Congress Street | Portland, ME 04101
    Posts
    1,366
    Rep Power
    10

    Default

    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,
    Mark

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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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, 11: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
  •