Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-13-2010, 08:13 AM
Starter Member
 
Posts: 2
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..
Reply With Quote
  #2 (permalink)  
Old 06-14-2010, 06:32 AM
Moderator
 
Posts: 1,209
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.
__________________
___________________________________
L. Mark Stone, CIO


"Uptime. All the time."

477 Congress Street | Portland, ME 04101-3431 | (207) 772-5678

proactive maintenance and monitoring | technology consulting
Zimbra groupware | EMR implementations | private cloud hosting
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.