Make jenkins send email via sendmail
Asked Answered
P

3

8

I got a nullmailer setup to a 3rd party SMTP relay. It's working well.

How can I tell jenkins to send his email through the sendmail system function ?

I tried setting the SMTP credentials directly in jenkins, but it's a mess with TLS (none of the solution I tried worked with Mandrill)

Thanks.

Pulsatile answered 15/8, 2014 at 12:30 Comment(0)
P
3

I run into this problem today. If you don't want to setup a smtp provider such as gmail, you can install postfix (see here about how to install postfix non-interactively) on the maschine/container on which Jenkins is running.

Make sure postfix runs well. In my case postfix did not start automatically after installation.

service postfix start

Then in Jenkins select Manage Jenkins => Configure System => Email Notification. Enter localhost In field "SMTP Server". Let Jenkins send out a test mail to test it.

Piffle answered 18/10, 2018 at 14:14 Comment(0)
D
1

This is probably not possible. Without looking at the Jenkins source (you can check this for yourself), I'd almost expect (no, hope!) that Jenkins would simply use the javax.mail.* interface, which only supports SMTP, and not command-line interfaces to MTAs.

Drugget answered 18/10, 2018 at 14:29 Comment(0)
F
-1

Not sure that sendmail is a really system function. But if you want to send jenkins notifications through smtp you need install https://wiki.jenkins-ci.org/display/JENKINS/Email-ext+plugin and configure connection in global jenkins configuration.

Ftc answered 2/3, 2015 at 0:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.