|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Re: Adding explicit address when forwarding mail
From: Noel Jones (njones
megan.vbhcs.org)
Date: Wed Apr 19 2006 - 18:02:18 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
At 05:13 PM 4/19/2006, Flavien wrote:
>Hello,
>
>Some background:
>We're running an alumni mailserver. We've got "permanent email
>addresses" : Graduates get
>"firstname.lastname
mydomain.org" emails
>that are redirected to their current email. We're using
>postfix. It
>works quite well except with
>some email providers [*] : The
>messages go to the junkmail box, mainly because the
>user is not
>in the destination field of the message. The feedback we
>get from
>our userbase is "alumni emails do not work,
>I don't get emails
>that are sent to me". It's just not true, it's unfair to
>us, poor
>(volonteer) admins. We'd like to fix it ! :o)
>
>The idea we got is to add a special transport in our
>configuration
>in order to get those mails go through a script that will
>add the
>final address to the "To:" header, so that it's not detected as
>spam. [Oh, well...]
>
>So, I added a transport like so :
>$ grep explicit transport
>.addexplicitdestination addexplicitdestination:
>$ tail -2 master.cf
>addexplicitdestination unix - n n -
> - pipe
> user=somebody
> argv=/usr/local/bin/addexplicitdestination $recipient
>
>
>It basically works, except that the mail I now send (as
>"somebody"),
>has its return-path set to "somebody
mydomain.org", which
>is not
>what I want. Obviously, I'd like it to stay the same as it
>was before
>getting into my script... Or may be I'd like to be even
>smarter and
>set it to something like "person
bounces.mydomain.org" so
>that I can
>process bounces in a more friendly manner, but that'll be
>for the
>next version.
You could use canonical_maps to rewrite both envelope and
header addresses.
Refer to
http://www.postfix.org/ADDRESS_REWRITING_README.html
paying particular attention to:
http://www.postfix.org/ADDRESS_REWRITING_README.html#william
http://www.postfix.org/ADDRESS_REWRITING_README.html#canonical
If that won't work for you for some reason, you could
change your script to accept $sender $recipient as
arguments and do the right thing when resending the
mail. If you're using sendmail(1) to resend the message,
use the -f sender option.
http://www.postfix.org/sendmail.1.html
--
Noel Jones
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]