header_check change from

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

header_check change from

MTayler
Hi,

I have a problem in setting / changing the "from:" field in the Email
header. I would like to change the 'Display name' part in the
From-field.
I tried something like:
/^From: my-email@my\.domain \(root\).*$/ REPLACE From: "some string" <[hidden email]>

in header_check.

This works for Emails coming from a other machines. Unfortunatly I
have some software running on the server, which sent's Emails true
the 'mail' command on the bash. The problem is that this software doesn't supply a sender
address to the 'mail' command.
As far as I understood postfix (cleanup) is setting the missing
from:-field.
In the manpage of cleanup is written that in that case cleanup won't
use 'header_checks' for this field.

So my problem is how could I set a default sender-address for the
'mail program' or how can I manipulated the from field set by
'cleanup'.







Reply | Threaded
Open this post in threaded view
|

Re: header_check change from

Wietse Venema
MTayler:

> Hi,
>
> I have a problem in setting / changing the "from:" field in the Email
> header. I would like to change the 'Display name' part in the
> From-field.
> I tried something like:
> /^From: my-email@my\.domain \(root\).*$/ REPLACE From: "some string" <[hidden email]>
>
> in header_check.
>
> This works for Emails coming from a other machines. Unfortunatly I
> have some software running on the server, which sent's Emails true
> the 'mail' command on the bash. The problem is that this software doesn't supply a sender
> address to the 'mail' command.
> As far as I understood postfix (cleanup) is setting the missing
> from:-field.
> In the manpage of cleanup is written that in that case cleanup won't
> use 'header_checks' for this field.
>
> So my problem is how could I set a default sender-address for the
> 'mail program' or how can I manipulated the from field set by
> 'cleanup'.

export NAME
NAME="some string"

Then submit the mail.

The From: header will then look like: From: [hidden email] (some string)

In some future version, the auto-generated From: header will look
like: From: "properly-quoted-version of $NAME" <[hidden email]>

        Wietse