View Single Post
Old 26th February 2009, 11:48
wintertong wintertong is offline
Junior Member
Join Date: Feb 2009
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default sendmail not working with PHP


Can anyone help?

I have installed a new Ubuntu Server which is running Apache, MYSQL and PHP.

This server is not a mail server so I have changed my PHP.ini file to use the remote smtp server on port 25. I have saved this and restarted apache / php so that the changes take effect. I can see that they have been set in phpinfo.

The sendmail is being called from /usr/sbin/

I am calling the php function mail() which in turn runs sendmail. This was erroring with "sendmail: fatal: open /etc/postfix/ No such file or directory".

So I went into /etc/postfix/ and does not exist. I have these files in there:

-rw-r--r-- 1 root root 318 2009-02-24 19:20
-rw-r--r-- 1 root root 4300 2009-02-24 19:20
-rw-r--r-- 1 root root 18231 2008-09-03 15:28 postfix-files
-rwxr-xr-x 1 root root 7421 2008-09-03 15:28 postfix-script
-rwxr-xr-x 1 root root 22774 2008-09-03 15:28 post-install
drwxr-xr-x 2 root root 4096 2008-09-03 15:28 sasl

I assumed that I could take a copy of and call it Is this correct?

It did not work as now it says "sendmail: fatal: /etc/postfix/, line 22: missing '=' after attribute name: "smtp inet n - - - - smtpd". I do not know enough about this to fatham out what is wrong.

Help Please?!!

Is there something basic that I have forgot? Any help would be much appreciated.

Regards Gareth
Reply With Quote
Sponsored Links