* Wietse Venema via Postfix-users <[email protected]> [251224 10:04]:
> Dan Raymond via Postfix-users:
> > The sendmail command (ie. /usr/sbin/sendmail) normally extracts
> > the sender's display name from the comment field of /etc/passwd.
> > This is used to populate the "From" header. However,
> > when the -f option is used the /etc/passwd file is not consulted
> 
> Indeed. Postfix has multiple override mechanisms:
> 
> -f sets the envelope.from address. The value can be any email
>    address; it is not limited to names in /etc/passwd. Setting
>    this does not affect the "full name".
> 
> -F sets the "full name" (this can also be set with the NAME
>    environment variable). Setting this does not affect the envelope.from
>    address.
> 
> And so on.
> 
> This orthogonal approach may be unexpected for people who grew up
> after Postfix was implemented.

I think what the OP is saying is that when sendmail auto-generates a
"From:" header, it is getting the email portion from the -f
envelope.from, but the full name from the current user.  I think he is
saying that an auto-generated "From:" header (in absence of -F) should
either use both the full name and email from the current user or
(preferably) use both the full name and email based on the envelope.from
address.

If the primary use of -f was for specifying a non-root user of the host
where sendmail is being invoked when being invoked by root, I would
agree with the OP.  But in my experience, the primary use is to specify
an email that is related to the current user, but not directly related
to anything specific to the current host.

The fact that -f specifies an email (perhaps not associated with the
current host) as opposed to a host user is a clear indication that the
current implementation is correct.

...Marvin

_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to