I’ve been seeing up an Amazon EC-2 server with Debian Squeeze and used tasksel to install Web Server and Mail Server. Like all things debian, this worked pretty well after the installation completed and everything ‘just worked’ however I wasn’t happy with the default from name and email address assigned to emails sent by PHP – www-data .
I discovered a quick and simple fix to change these defaults for all mail sent with PHP:
Open /etc/php5/apache2/php.ini and set
Commandsendmail_path = ‘/usr/sbin/sendmail -t -i -firstname.lastname@example.org -Fno-reply’
sendmail_path = ‘/usr/sbin/sendmail -t -i -email@example.com -Fno-reply’