Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Old 19th October 2012, 13:26
PJDouglas PJDouglas is offline
Junior Member
Join Date: Oct 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Postfix - Rewrite Return Address


Our setup is as follows. We have an exchange server which forwards mail for particular domains to postfix for address rewriting. Postfix re-writes the sender domain address and forwards the mail down a private link. For example exchange sends mail to postfix with a sender address of me@mydomain.com postfix rewrites the sender address as me@mydomain.home.com and then forwards the mail.

I have a need to rewrite the return path\address of all mail received from a pspecific address while still re-writing the sender domain as explained above before being forwarded by postfix.

There are no local mailboxes on postfix. Postfix simple recieves mail re-writes the sender domain and forwards.

Having read other posts I believe this can be done by using a different submission interface in postfix - but I have no idea how to do this.

This is what I have seen on another site:

The right solution is to use a different submission interface, that
lets you set the envelope sender. For example:

echo "EHLO $(uname -n)"
echo "MAIL FROM:<com>"
echo "RCPT TO:<org>"
echo "DATA"
echo "From: <com>"
echo "To: <org>"
echo "Reply-To: <com>"
echo "Subject: the information you requested"
echo ""
perl -pe 's/^\./../' /some/path/to/msg-body
echo "."
echo "QUIT"
) | /usr/sbin/sendmail -bs

Where in postfix would I create a new submission interface and is the above information the correct way to change the return path?

Any and all help appreciated.

Many Thanks
Reply With Quote
Sponsored Links


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix Timeout after DATA from some emails treeman Server Operation 13 25th September 2013 13:51
Email from server driving me crazy chaloum General 29 13th April 2012 14:45
RoundCube Sends but will not receive. happz Installation/Configuration 33 17th April 2010 22:55
Sending emails with custom FROM email address merisor Installation/Configuration 4 8th February 2010 17:27
localhost postfix/master: fatal: bind port 125: Permission denied g18c Installation/Configuration 4 24th March 2009 18:39

All times are GMT +2. The time now is 13:01.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.