Debian – Send email from Debian Sqeeze via Microsoft Exchange

debianexchangeeximssmtp

I am currently in the final stages of building a website which is going to use PHP to send out emails.

The domain for the company the site is for, is already using the domain's MX record to point to the company's Exchange server. My dedicated server is out there in the cloud, but I want to be able to send emails as user@domain.com. If I understand correctly do I need to set up Debian to relay it's e-Mail via the exchange server with SMTP? How do I go about this & are there any guides I can be pointed towards? After my initial attempts at finding a guide and figuring it out myself I've fallen back here as I'm not sure wether I am following the right guide suited to my task or not…

So far I've had a shot at doing it with SSMTP and Exim4 but neither with success. The best I got was to get Exim4 to send out an e-Mail but it didnt go via the Exchange server and was just sent out as root@debian.localdomain…

Thanks

Best Answer

The best way would be to use the Exchange server as a smart host to sending e-mail. This way Exim will connect to the Exchange server and send the e-mails through it instead of sending it directly to other mails servers.

As you are using Debian, you can use dpkg-reconfigure exim4-config and use the smart host configuration.

Related Topic