Set up Jenkins email notifications

I am trying to set up an email notification for my jenkins server for build failures.

Things I tried:

1) Use my smtp mail server with authentication - does not work. Connection rejected

2) Set up my own James mail server. SMTP server is localhost. Authentication - admin, admin. Port 25. I see that my SMTP server is running. - does not work. Connection rejected

3) Use my personal gmail account with authentication - Works !!!

I went for other discussions on this topic, but did not receive an answer.

Some say this is a firewall issue, but I'm not sure how to overcome it.

Any suggestions are welcome.

Thanks,

+7
source share
2 answers

I had a similar problem.

I was in wireless + windows 7, and when the Internet connection status was checked, IPV4 was connected to the Internet, but IPV6 was not. It seems that IPV6 is used by default for Windows 7, but it could not connect to the SMTP server using it.

My jenkins started with -Djava.net.preferIPv4Stack = true, and it worked for me.

java -Djava.net.preferIPv4Stack = true -jar jenkins.war and the "test configuration" worked.

+2
source

To send email notifications using the localhost SMTP server, you need to set a postfix ,

For Linux:

  • sudo apt-get install postfix
  • telnet localhost 25

and then try sending a test email. :)

I know it's late, but just in case, any other person has a problem!

+1
source

All Articles