I have just setup a server with Ubuntu in our office. Have installed Apache, MySQL and PHP5. I need to be able to send email from scripts using PHP's inbuilt mail function. What do I need to install on the server for this to work? I have been looking but have not been able to find a simple answer. Any help would be much appreciated.
You need to install a mail server. I would suggest "Dovecot". and then update your PHP.INI file accordingly.
If your only sending outbound email, then you do not need Dovecot. A simple install of sendmail or postfix will do, postfix would be suggestible. aptitude install postfix mailx
Sorry, didnt see a update to your post, you need to config main.cf if your doing only outbound mail with postfix, php.ini is for php web pages and will have no effect on what postfix does when sending outbound mail. If your going to catch inbound emails, then there is quite a bit more configuration that needs to be done if you want a email client to view email on the server.