-1

Here's my setup

Ubuntu Database server that runs scripts that need to be able to send emails

Ubuntu Web Server that has sendmail setup on it that used to run scripts that send emails

Is what I need to do is be able to send mail from my Database server without setting sendmail up on it and use the Web Servers sendmail setup. I've tried searching but can't seem to find what I need. I thought maybe using a relayhost but can't seem to get that configured correctly or if that is even possible.

I don't want to use Google or install any type of mail on the Database server.

I'm looking for an example or a point in the right direction.

Henesnarfel
  • 115
  • 1

1 Answers1

1

You will need to use sendmail to accomplish this since that's how you get a relayhost set up. Install sendmail and add this to sendmail.mc:

define(SMART_HOST',smtp.yourisp.com')

After run m4 /etc/mail/sendmail.mc > /etc/sendmail.cf to remake the configuration file.

There is a way without using sendmail (doing it using PHP's native SMTP) but that's outside the scope of serverfault.

Nathan C
  • 15,059
  • 4
  • 43
  • 62