- Create a folder to store the script and the mail logs.
mkdir /somewhere/phpmail
mkdir /somewhere/phpmail/mails
- Place the
logmail.sh
script in thephpmail
folder - Make sure the php process has write access to this folder:
chmod -R 777 /somewhere/phpmail
- Open the
php.ini
config file and edit the sendmail_path parameter:
On archlinux:
/etc/php/php.ini
sendmail_path = "/somewhere/phpmail/logmail.sh"
- If running php via webserver, you have to restart the webserver.