I recently purchased a VPS plan. I installed Ubuntu 9.10, PHP5 and Postfix. I can't get the PHP mail() function to work. In my PHP script, the mail() function returns true, which suggests it is working. But no one is receiving my website's emails.
Installation of postfix appeared to have went fine when I called a sudo apt-get install postfix. Calling a /etc/init.d/postfix start gave me "Starting Postfix Mail Transport Agent postfix ". Calling a /etc/init.d/postfix reload gave me the error "fatal: the Postfix mail system is not running".
Prior to installing postfix, I was using sendmail which worked with the PHP mail() function.
How do I debug and fix this problem?
Additional Notes I looked in /var/log/mail.log and found the follow error everytime i call php's mail()
Feb 3 11:27:41 mywebsitedomain postfix/postdrop[23793]: warning: unable to look up public/pickup: No such file or directory
Oh, I fixed the problem by following the information in this forum:
http://ubuntuforums.org/showthread.php?t=666018
Basically, I looked in my /var/log/mail.log error file and found the error message "unable to look up public/pickup: no such file or directory".
I then issued the command
I made sure sendmail wasn't still running by doing a ps -aux and killing it
I restarted postfix
And now the PHP mail function works.