From: Sylvain Ferrand on
Hello,

I would like to overwrite the "display-name" (i.e. the sender
description string in the the From: field. - cf. RFC 5322 sec 3.4) set
by the MUA. Is it possible to rewrite the "display-name" (1) in the
"From:" header on a postfix server ?

Thanks in advance,

Sylvain Ferrand

From: Ralf Hildebrandt on
* Sylvain Ferrand <sylvain.ferrand(a)polytechnique.edu>:
> Hello,
>
> I would like to overwrite the "display-name" (i.e. the sender
> description string in the the From: field. - cf. RFC 5322 sec 3.4)
> set by the MUA. Is it possible to rewrite the "display-name" (1) in
> the "From:" header on a postfix server ?

*smile*

/^From: (.*) <(.*)>$/ REPLACE From: blah <$2>

--
Ralf Hildebrandt
Geschäftsbereich IT | Abteilung Netzwerk
Charité - Universitätsmedizin Berlin
Campus Benjamin Franklin
Hindenburgdamm 30 | D-12203 Berlin
Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
ralf.hildebrandt(a)charite.de | http://www.charite.de


From: Victor Duchovni on
On Wed, Feb 24, 2010 at 03:55:13PM +0100, Sylvain Ferrand wrote:

> Hello,
>
> I would like to overwrite the "display-name" (i.e. the sender description
> string in the the From: field. - cf. RFC 5322 sec 3.4) set by the MUA. Is
> it possible to rewrite the "display-name" (1) in the "From:" header on a
> postfix server ?

Only via a content filter or milter. There is at this time no feature
that allows you to match a given header address to a preferred display
name and munge the associated header address.

The use of "header_checks" for this is ugly, and would scale to only
a few tens to hundreds of individuals before the regexp table approach
starts to get rather expensive...

Finally, if munging, you should also munge "To" and "Cc", not just "From",
and that is outright impossible with regexp tables.

--
Viktor.

P.S. Morgan Stanley is looking for a New York City based, Senior Unix
system/email administrator to architect and sustain our perimeter email
environment. If you are interested, please drop me a note.

From: Ralf Hildebrandt on
* Ralf Hildebrandt <Ralf.Hildebrandt(a)charite.de>:
> * Sylvain Ferrand <sylvain.ferrand(a)polytechnique.edu>:
> > Hello,
> >
> > I would like to overwrite the "display-name" (i.e. the sender
> > description string in the the From: field. - cf. RFC 5322 sec 3.4)
> > set by the MUA. Is it possible to rewrite the "display-name" (1) in
> > the "From:" header on a postfix server ?
>
> *smile*
>
> /^From: (.*) <(.*)>$/ REPLACE From: blah <$2>

I misread this. Disregard my answer.
What you want to do needs to be done using content_filter or milter or
smtpd_proxy_filter.

--
Ralf Hildebrandt
Geschäftsbereich IT | Abteilung Netzwerk
Charité - Universitätsmedizin Berlin
Campus Benjamin Franklin
Hindenburgdamm 30 | D-12203 Berlin
Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
ralf.hildebrandt(a)charite.de | http://www.charite.de


From: Victor Duchovni on
On Wed, Feb 24, 2010 at 03:58:29PM +0100, Ralf Hildebrandt wrote:

> * Sylvain Ferrand <sylvain.ferrand(a)polytechnique.edu>:
> > Hello,
> >
> > I would like to overwrite the "display-name" (i.e. the sender
> > description string in the the From: field. - cf. RFC 5322 sec 3.4)
> > set by the MUA. Is it possible to rewrite the "display-name" (1) in
> > the "From:" header on a postfix server ?
>
> *smile*
>
> /^From: (.*) <(.*)>$/ REPLACE From: blah <$2>

My guess is that this is not what the OP is looking for. My bet is he
wants per-address display name rewrites, ...

--
Viktor.

P.S. Morgan Stanley is looking for a New York City based, Senior Unix
system/email administrator to architect and sustain our perimeter email
environment. If you are interested, please drop me a note.