cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to send emails - relay.plus.net refusing connection

TonyOCL
Grafter
Posts: 47
Thanks: 3
Registered: ‎01-02-2008

Unable to send emails - relay.plus.net refusing connection

I am trying to setup a server with wordpress at home for testing and then moving to my plusnet webspace.

Unfortunately I can't get SMTP to work.

On Phones, PC's and Tablets I use the same details, but in my wordpress config it isn't working.

Note: this system is connected to plusnet, so is on the plusnet network (not connected to internet through a third party).

I get the following error - any help would be appreciated.

Server:
OpenSSL: Yes
Apache.mod_security: No
SMTP Debug:
2018-06-20 19:04:24 Connection: opening to relay.plus.net:587, timeout=300, options=array ( 'ssl' => array ( 'verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true, ), ) 2018-06-20 19:04:24 Connection: Failed to connect to server. Error number 2. "Error notice: stream_socket_client(): unable to connect to relay.plus.net:587 (Permission denied) 2018-06-20 19:04:24 SMTP ERROR: Failed to connect to server: Permission denied (13)
5 REPLIES 5
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Unable to send emails - relay.plus.net refusing connection

relay.plus.net does not currently support SSL/TLS. However since you are using a Plusnet.connection authentication is not necessary.

When you move the set up to your webspace is that on the CCGI server (it won't work on standard webspace)? On CCGI you would have to send using local host.

David
TonyOCL
Grafter
Posts: 47
Thanks: 3
Registered: ‎01-02-2008

Re: Unable to send emails - relay.plus.net refusing connection

I am not using TSL or SSL.

Also this is running on my home computer (whiilst i develop the site) then I will move it to CCGI.

My home computer is on the plusnet network.

let me remove authentication.

TonyOCL
Grafter
Posts: 47
Thanks: 3
Registered: ‎01-02-2008

Re: Unable to send emails - relay.plus.net refusing connection

I fixed my problem. 
For anyone else who comes accross this, here is what happened.

This version of linux does not by default allow any SMTP client to bind to SMTP ports.  

To correct this I entered these commands

sudo setsebool -P httpd_can_sendmail 1
sudo setsebool -P httpd_can_network_connect 1

 

 

Then I retried the email test and it worked fine.

Thanks for you help.

 

spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Unable to send emails - relay.plus.net refusing connection

Glad to hear you got it working and thanks for posting the solution to help others. Smiley

David
Gandalf
Community Gaffer
Community Gaffer
Posts: 26,573
Thanks: 10,294
Fixes: 1,600
Registered: ‎21-04-2017

Re: Unable to send emails - relay.plus.net refusing connection

I'm also glad to hear you've got this working and would like to also thank you for coming back here to post the solution. Thumbs_Up

This should help someone else in a similar situation.

From 31st October 2022, I no longer have a regular presence here as I’ve moved on to a new role.
Anoush Mortazavi
Plusnet