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 and the 
display name is
instead set to the account name of the current user. This is both incorrect and 
confusing
to the recipient since the display name does not match the sender's account 
name.

For example:

# whoami
john
# cat /etc/passwd | grep "john"
john:x:1000:1000:John Doe:/home/john:/bin/bash
# echo -e "Subject: test\n\nthis is a test\n" | sendmail [email protected]
# su root
# echo -e "Subject: test\n\nthis is a test\n" | sendmail -f john [email protected]

The resulting emails will have the following "From" headers:

From: John Doe <[email protected]>
From: root <[email protected]>

This also impacts php scripts which use the mail() function to invoke sendmail.

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

Reply via email to