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.

Attempting to configure some software on our server to send email via SMTP.

When testing it, get this SMTP Error: SMTP Error: The following recipients failed [address]"

Based on my research and a reply from the software's support team this error usually occurs because relaying is not allowed on the SMTP server from the IP address of the web server. The solution is to "Go to the configuration of your SMTP server and turn relaying on for your IP address"

My question is -- how do I do this? Is this done from WHM? cPanel?

share|improve this question
5  
You have to tell us which SMTP server software you're using... –  Alnitak Jul 23 '09 at 6:58
    
If you add details about your software and general setup we might be able to help you determine what SMTP server is required. Also, if you have the option to use a username and password you can often configure the software to authenticate to the SMTP server and send as a valid account. If you are able to do this you bypass the need to enable relaying for your host. In a shared hosting environment relaying may not be allowed no matter what (for good reason). –  J.Zimmerman Jul 23 '09 at 9:00
    
I suggest you read this document before asking another question. If you follow the advice you are far more likely to get an answer. catb.org/~esr/faqs/smart-questions.html –  goo Jul 23 '09 at 9:40
    
To be fair, the OP might not know what the MTA is, if it's fronted by a control panel and they've never has cause to change it. It would however be useful to include a copy of the delivery failures to be sure that it is a relay denied issue. –  Dan Carley Jul 23 '09 at 9:46
    
Thanks for the tips + suggestions. Apologies for the lack of thoroughness with details, what I provided was the extent of my knowledge at the time. Which is part of the reason I brought it here instead of Google -- I simply don't know enough on the subject to know what info I should be providing, not to mention where to find that info (ex, what SMTP server software I'm using or where to find delivery failures). Like most things though, good learning experience. Thanks again. –  Susan Jul 25 '09 at 5:21
add comment

1 Answer

up vote 1 down vote accepted

You say it's WHM/cPanel - so we can probably assume that the MTA is Exim. Exim's default configuration should look something like this:

hostlist relay_from_hosts = 127.0.0.1
..
begin acl
..
    accept hosts = +relay_from_hosts

This tells Exim that anything connecting over loopback address 127.0.0.1 (localhost) is permitted to relay.

Now if you already have something that looks akin to this and it's still not working, then it is possible that you're not connecting to localhost. Perhaps you're specifying the address of your SMTP server as the machine's external facing hostname/IP? In which case, try changing that.

If by change you have two machines. One running the MTA and one submitting the SMTP messages. Then you will need to take a different approach. You should setup TLS and SMTP auth.

share|improve this answer
    
This put me on the right track, thanks. Solution: added my hosts to the /etc/relayhosts –  Susan Jul 25 '09 at 5:21
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.