Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
add comment

1 Answer 1

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.