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've installed PHP 5.2 with Web PI on Windows Server 2008. This server also houses the Exchange server that I use for mail.

The script I'm using uses PHP's mail() function to send mail.

When using the function, mail is delivered when the recipient is within the domain, however if recipient is outside, it fails to deliver and mail returns an error.

I can't seem to find anything in the log files, so I am assuming it is an Exchange 2010 error.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Does your PHP script give you an error? I would imagine you're being denied relay access, but that's purely a guess.

You can verify if you're being denied relay pretty quickly by sending a mail using telnet. The place you're going to be told you're denied relay access is after the RCPT TO command.

If you are being denied relay, you will need to grant this (unfortunately I've not played with Exchange 2010, but I imagine it's similar to previous versions where you can authorise an IP address).

share|improve this answer
    
I'm getting 550 5.7.1 Unable to relay. Trying to resolve. –  bear Mar 1 '10 at 19:07
    
Ok, now I've got it as an Open Relay which is a problem. –  bear Mar 1 '10 at 19:22
    
Like I said I've not played with Exchange 2010, but a quick Google gets me lazynetworkadmin.com/knowledgebase-mainmenu-6/2-windows/… - does that help you at all? –  Ben Pilbrow Mar 1 '10 at 19:27
    
It certainly does - just got to figure out why the email goes to the spam folder. –  bear Mar 1 '10 at 19:53

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.