Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

"Display-name" rewriting

627 views
Skip to first unread message

Sylvain Ferrand

unread,
Feb 24, 2010, 9:55:13 AM2/24/10
to
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

Ralf Hildebrandt

unread,
Feb 24, 2010, 9:58:29 AM2/24/10
to
* Sylvain Ferrand <sylvain...@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.hil...@charite.de | http://www.charite.de

Victor Duchovni

unread,
Feb 24, 2010, 10:00:24 AM2/24/10
to
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.

Ralf Hildebrandt

unread,
Feb 24, 2010, 10:01:20 AM2/24/10
to
* Ralf Hildebrandt <Ralf.Hil...@charite.de>:
> * Sylvain Ferrand <sylvain...@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.

Victor Duchovni

unread,
Feb 24, 2010, 10:01:42 AM2/24/10
to
On Wed, Feb 24, 2010 at 03:58:29PM +0100, Ralf Hildebrandt wrote:

> * Sylvain Ferrand <sylvain...@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, ...

Hari Hendaryanto

unread,
Feb 25, 2010, 6:28:32 PM2/25/10
to
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 ?
>
> Thanks in advance,
>
> Sylvain Ferrand
This was exactly what i'm doing years a go.rewriting my users real name
defined in mysql database instead of their From: defined in MUA.
I've published the prototype i wrote here:

http://www.kutukupret.com/2009/04/28/postfix-change-header-form-outgoing-mail-using-altermime/

Sorry, it's in indonesian.i hope that articles lead you to some clues

regards

0 new messages