Postfix: change the sender address
If your server sends out mail and you don’t want the messages to be delivered from [email protected], then you can change the sender address.
In php.ini bring the sendmail_path value to this form:
sendmail_path = /usr/sbin/sendmail.postfix -t -i -F "no-reply"
Restart apache:
/etc/init.d/httpd restart
or
/etc/init.d/apache2 restart
Changing the postfix settings is an alternative.
For that add this line to the /etc/postfix/main.cf file:
smtp_generic_maps = hash:/etc/postfix/generic
Add this to the /etc/postfix/generic file:
Create the hash file:
postmap /etc/postfix/generic
Restart postfix:
/etc/init.d/postfix restart