Jenkins SMTP connection refused. What am I missing?

I have Jenkins ver 1.524 installed in a Windows 7 window and am trying to set up email, but the Test Configuration reports errors. Jenkins runs as a service under my domain account.

My settings are as follows:

SMTP server: smtp.corpdomain.com Default user email suffix: @corpdomain.com Not using authentication Not using SSL SMTP port: 25 Reply-To Address: tools@corpdomain.com Charset: UTF-8 

When I test the configuration, I usually get the following exception:

 javax.mail.MessagingException: Could not connect to SMTP host: smtp.amazon.com, port: 25; nested exception is: java.net.ConnectException: Connection timed out: connect 

However, every time I get the following:

 com.sun.mail.smtp.SMTPSendFailedException: 553 5.1.8 < nobody@nowhere >... Domain of sender address nobody@nowhere does not exist ; nested exception is: com.sun.mail.smtp.SMTPSenderFailedException: 553 5.1.8 < nobody@nowhere >... Domain of sender address nobody@nowhere does not exist 

However, I can send mail from the command line without errors using both python script and java (using javax.mail) without authentication, and I can connect to the SMTP server on port 25, so I don’t see how it could be problem with firewall.

Another note that may be related: when I try to install the plug-in via the Jenkins web interface, I get a 403 response for the URL " http://updates.jenkins-ci.org/update-center.json?uctest " . However, I can connect to this URL from a browser on the same computer.

Maybe this is a Tomcat configuration problem? I am not familiar with Tomcat, so I'm not sure where to even start looking. Maybe the Jenkins configuration I missed? Any other ideas?

Thanks in advance!

+4
source share
4 answers

It still looks like your firewall is blocking the Jenkins service from accessing these ports.

especially as a connection time interval, which is typical for such cases.

Invite you to completely disable the firewall and see if there are any changes.

Greetings

+1
source

FWIW No one's address is the default address that Jenkins comes to for the system administrator’s email address (which is used as the address from the address when sending letters)

you can change it to

Jenkins Management> System Setup> Jenkins Location

+9
source

To check for Jenkins compatibility issues, I will go to the Script console in the Jenkins → Script management console and try connecting to the port you want to test (25 in your case), with Groovy Script as:

 s = new Socket() s.setSoTimeout(200) s.connect(new InetSocketAddress("smtp.corpdomain.com", 25), 200) s.close() 

If you do not receive any IOError , then there is no problem with its connectivity.

Note I could just use the new Socket("smtp.corpdomain.com", 25) , but it will try to connect forever if the firewall ignores your attempts.

For SMTPSendFailedException you will eventually get, like @ paul-henry:

Nick @ nowhere address is the default Jenkins address comes with the system administrator's email address (which is used as the address from the address when sending emails) you can change it to Jenkins Management> System Configuration> Jenkins Location

Resources

+1
source

use port 465 first

second, confirm your email address in AWS SES and change the email sending from here: Jenkins → System Configuration → Jenkins Location → Management System Email Address

+1
source

Source: https://habr.com/ru/post/1495346/


All Articles