Link to home
Start Free TrialLog in
Avatar of AXISHK
AXISHK

asked on

Configure host and default sender name in Linux sendmail

Run sendmail –s “TEST MAIL” test@gmail.com < /dev/null. I find the following is gmail header :

Return-Path: <root@fedoralinux20-test>
Received: from fedoralinux20-test

Where can I change  the host name and domain name used by sendmail ?

Thx
ASKER CERTIFIED SOLUTION
Avatar of Dr. Klahn
Dr. Klahn

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AXISHK
AXISHK

ASKER

My PHP website hosts on Apache server. Seem like it send out using user apache@mydomain.com. However, the apache user is not included in the php code. Any idea where will this user "apache" been setup ?

Thx
apache is the user under whose credentials httpd/apache web service runs.
you need to configure your php.ini mail to use the -f command with sendmail to set the email sender.
depending on how you are setting the message header in the PHP code, there is a way to identify who the sender should be .....
sendmail_path = /usr/sbin/sendmail -t -fsenderemail_address -oi

by default sendmail in the absence of the -f sendmail uses the logon as the username portion and its own hostname as the domain....
note the above will send all outgoing messages from your server using that sender....
Avatar of AXISHK

ASKER

Thx