views:

25

answers:

2

I'm currently setting up two servers, one for me and one for a client. Mine is purely a Django server with no PHP in sight. The other is a PHP server with no Django in sight. They are both VPSs with Ubuntu Server 10.04 Lucid on them.

Both require some sort of mail server so the Django and PHP applications can send mail from the server. Both servers don't require email accounts as I do these with Google Apps For Domains. I merely want a solution for letting these technologies send mail, in a way that is totally standard. (no funny send mail setups or anything...)

I was told Postfix is the way to go for email servers. But everywhere I see that it should have MySQL as well. Is this the only way to have a functional Postfix server? Though my client's PHP server will have MySQL anyhow (as it will be hosting the PHP based Simple Machines Forum), my Django server will be using PostgreSQL throughout. And the idea of installing MySQL just for Postfix there seems over the top for me.

Is there other solutions out there? Am I looking at this all wrong? Is there maybe other solutions that would fill this need?

A: 

There's exim too. Check with your VPS provider in case they already include a working installation of that, as well as what smtp server or relay to use in the hosting provider, if any.

If there's nothing like that, a crude solution for the PHP side is setting an smtp server in php.ini so that simple mail() will work outright.

[mail function]
SMTP = smtp.server.ext
sendmail_from = [email protected]
Fanis
A: 

After much research, I found what I needed to do was setup Postfix as a 'Null client'. This means there is no users to speak of and will only send out email. Though a bit fiddly, the main bulk of what is needed to do this can be found here:

http://www.postfix.org/STANDARD_CONFIGURATION_README.html#null_client

littlejim84