can postfix break RFC for me a little?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

can postfix break RFC for me a little?

JOHN ROMAN
hi all,
im a new user, so ill start by saying im a huge fan of Wietse's mailer!  I affectionately refer to it as the "sendmail coffin nail" as ive replaced plenty of installations with a shiny new postfix.  

but im faced with a bit of a challenge in my current job.  can postfix break RFC and rewrite the sender address on an email as it goes outbound to the internet?

to elaborate:
I work for a division of a company that is 'research and development' and should not be visible to the outside world.  that having been said our users send mail to the outside world from their r&d accounts routinely and our ancient sendmail will rewite gladly the addresses.  the idea is to route normally, with no rewrites, everything under our FQDN.  however, if we get a message going to the internet, we need to rewrite it (example:  R&D.corporation.com needs to become corporation.com)

i thought about canonical senders but thats only called on receipt.  

thoughts?

Reply | Threaded
Open this post in threaded view
|

Re: can postfix break RFC for me a little?

Joe-274
JOHN ROMAN wrote:
> hi all,
> im a new user, so ill start by saying im a huge fan of Wietse's mailer!  I affectionately refer to it as the "sendmail coffin nail" as ive replaced plenty of installations with a shiny new postfix.  
>
> but im faced with a bit of a challenge in my current job.  can postfix break RFC and rewrite the sender address on an email as it goes outbound to the internet?
>
> to elaborate:
> I work for a division of a company that is 'research and development' and should not be visible to the outside world.  that having been said our users send mail to the outside world from their r&d accounts routinely and our ancient sendmail will rewite gladly the addresses.  the idea is to route normally, with no rewrites, everything under our FQDN.  however, if we get a message going to the internet, we need to rewrite it (example:  R&D.corporation.com needs to become corporation.com)
>
> i thought about canonical senders but thats only called on receipt.  

There are a number of ways postfix can rewrite addresses on outgoing
messages.

masquerade_domains -
sender_canonical -
generic_maps -

Joe
Reply | Threaded
Open this post in threaded view
|

Re: can postfix break RFC for me a little?

JOHN ROMAN
if sender_canonical is called only by cleanup, this map is to my knowledge inapplicable?
http://www.postfix.org/ADDRESS_REWRITING_README.html

then again, if mail is received from a client it will naturally be found in 'incoming' and handled by cleanup.
when resent, it should be rewriten, correct?


----- Original Message -----
From: Joe Sloan <[hidden email]>
Date: Saturday, May 17, 2008 5:23 pm
Subject: Re: can postfix break RFC for me a little?
To: [hidden email]

> JOHN ROMAN wrote:
> > hi all,
> > im a new user, so ill start by saying im a huge fan of Wietse's
> mailer!  I affectionately refer to it as the "sendmail coffin nail"
> as ive replaced plenty of installations with a shiny new postfix.  
> >
> > but im faced with a bit of a challenge in my current job.  can
> postfix break RFC and rewrite the sender address on an email as it
> goes outbound to the internet?
> >
> > to elaborate:
> > I work for a division of a company that is 'research and
> development' and should not be visible to the outside world.  that
> having been said our users send mail to the outside world from
> their r&d accounts routinely and our ancient sendmail will rewite
> gladly the addresses.  the idea is to route normally, with no
> rewrites, everything under our FQDN.  however, if we get a message
> going to the internet, we need to rewrite it (example:  
> R&D.corporation.com needs to become corporation.com)
> >
> > i thought about canonical senders but thats only called on
> receipt.  
>
> There are a number of ways postfix can rewrite addresses on
> outgoing
> messages.
>
> masquerade_domains -
> sender_canonical -
> generic_maps -
>
> Joe
>
Reply | Threaded
Open this post in threaded view
|

Re: can postfix break RFC for me a little?

Sahil Tandon
In reply to this post by JOHN ROMAN
* JOHN ROMAN <[hidden email]> [05-17-2008]:

> I work for a division of a company that is 'research and development' and
> should not be visible to the outside world.  that having been said our
> users send mail to the outside world from their r&d accounts routinely and
> our ancient sendmail will rewite gladly the addresses.  the idea is to
> route normally, with no rewrites, everything under our FQDN.  however, if
> we get a message going to the internet, we need to rewrite it (example:  
> R&D.corporation.com needs to become corporation.com)

http://www.postfix.org/ADDRESS_REWRITING_README.html, specifically the
sections on "Canonical address mapping" and "Address masquerading".

--
Sahil Tandon <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: can postfix break RFC for me a little?

Noel Jones-2
Sahil Tandon wrote:

> * JOHN ROMAN <[hidden email]> [05-17-2008]:
>
>> I work for a division of a company that is 'research and development' and
>> should not be visible to the outside world.  that having been said our
>> users send mail to the outside world from their r&d accounts routinely and
>> our ancient sendmail will rewite gladly the addresses.  the idea is to
>> route normally, with no rewrites, everything under our FQDN.  however, if
>> we get a message going to the internet, we need to rewrite it (example:  
>> R&D.corporation.com needs to become corporation.com)
>
> http://www.postfix.org/ADDRESS_REWRITING_README.html, specifically the
> sections on "Canonical address mapping" and "Address masquerading".
>

This sounds like a perfect fit for smtp_generic_maps.
http://www.postfix.org/ADDRESS_REWRITING_README.html#generic

--
Noel Jones
Reply | Threaded
Open this post in threaded view
|

Re: can postfix break RFC for me a little?

JOHN ROMAN
Noel Jones wrote:

> Sahil Tandon wrote:
>> * JOHN ROMAN <[hidden email]> [05-17-2008]:
>>
>>> I work for a division of a company that is 'research and
>>> development' and should not be visible to the outside world.  that
>>> having been said our users send mail to the outside world from their
>>> r&d accounts routinely and
>>> our ancient sendmail will rewite gladly the addresses.  the idea is
>>> to route normally, with no rewrites, everything under our FQDN.  
>>> however, if we get a message going to the internet, we need to
>>> rewrite it (example:  R&D.corporation.com needs to become
>>> corporation.com)
>>
>> http://www.postfix.org/ADDRESS_REWRITING_README.html, specifically
>> the sections on "Canonical address mapping" and "Address masquerading".
>>
>
> This sounds like a perfect fit for smtp_generic_maps.
> http://www.postfix.org/ADDRESS_REWRITING_README.html#generic
>
normally, generic maps would probably be a good idea, but i cant check
the recipient in generic to determine if i need to rewrite...or can i?  
is it possible to create a boolean regexp that rewrites the sender based
on recipient domain in the generic map?

example: if recipient is outside corporation.com, rewrite the sender
from R&D.corporation.com to corporation.com?

Reply | Threaded
Open this post in threaded view
|

Re: can postfix break RFC for me a little?

Reinaldo Gil Lima de Carvalho
> normally, generic maps would probably be a good idea, but i cant check the
> recipient in generic to determine if i need to rewrite...or can i?  is it
> possible to create a boolean regexp that rewrites the sender based on
> recipient domain in the generic map?
>
> example: if recipient is outside corporation.com, rewrite the sender from
> R&D.corporation.com to corporation.com?
>
>

# Master.cf:
smtp-corp     unix  -       -       -       -       -       smtp -o
smtp_generic_map=

# Transport (transport_maps):
corporation.com    smtp-corp:

--
Reinaldo Carvalho
http://korreio.sf.net