SMTP setup for Rundeck in Windows

175 views
Skip to first unread message

Suraj Reddy

unread,
Apr 20, 2021, 11:15:16 AM4/20/21
to rundeck-discuss
Hi,
Please help me to setup smtp configuration for Rundeck in windows.
Currently in my rundeck.properties i have following lines:

#loglevel.default is the default log level for jobs: ERROR,WARN,INFO,VERBOSE,DEBUG
loglevel.default=INFO
rdeck.base=C:/rundeck

#rss.enabled if set to true enables RSS feeds that are public (non-authenticated)
rss.enabled=false
server.address=0.0.0.0
grails.serverURL=http://EC2**:4440
dataSource.dbCreate = update
dataSource.url = jdbc:h2:file:C:/rundeck/server/data/grailsdb;MVCC=true

# Pre Auth mode settings
rundeck.security.authorization.preauthenticated.enabled=false
rundeck.security.authorization.preauthenticated.attributeName=REMOTE_USER_GROUPS
rundeck.security.authorization.preauthenticated.delimiter=,
# Header from which to obtain user name
rundeck.security.authorization.preauthenticated.userNameHeader=X-Forwarded-Uuid
# Header from which to obtain list of roles
rundeck.security.authorization.preauthenticated.userRolesHeader=X-Forwarded-Roles
# Redirect to upstream logout url
rundeck.security.authorization.preauthenticated.redirectLogout=false
rundeck.security.authorization.preauthenticated.redirectUrl=/oauth2/sign_in

rundeck.feature.repository.enabled=true


Thanks in Advance

rac...@rundeck.com

unread,
Apr 20, 2021, 11:37:27 AM4/20/21
to rundeck-discuss

Hi Suraj,

Following this, add to your rundeck-config.properties file the SMTP conf as follow:

# e-mail notification settings
grails.mail.host=your_smpt_host
grails.mail.port=25
grails.mail.username=your_username
grails.mail.password=your_password

Then, restart the rundeck service.

Here you have a good example to start.

But if you need to use a Google/Outlooks SMTP service, create a rundeck-config.groovy file (at /rundeck path) with Gmail server configuration (only the email configuration) like this:

grails {
  mail {
    host = "smtp.gmail.com"
    username = "user...@gmail.com"
    port = 587
    password = "example"
    props = ["mail.smtp.starttls.enable":"true","mail.smtp.auth":"true","mail.smtp.socketFactory.port":"587","mail.smtp.socketFactory.fallback":"false"]
  }
}
grails.mail.default.from = "user...@gmail.com"

And then restart the rundeck service.

The main reason for this is that the .config file by design doesn’t support extended features by external providers like Gmail or office365. Check this.

Now you can use email notifications on your jobs.

Hope it helps!

Message has been deleted

Suraj Reddy

unread,
Apr 28, 2021, 12:28:25 PM4/28/21
to rundeck...@googlegroups.com
Thanks, that worked for me.

I just wanted to ask that my job has multiple steps in it and after the job runs an email is sent out having output of all the steps. But currently all the outputs of the all steps are bundled which causes clumsy data on email notifications.

Requirement is to have output of each step properly put down in a HTML format one after another row wise.
Can you pls help me with this?

Thanks

--
You received this message because you are subscribed to the Google Groups "rundeck-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rundeck-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rundeck-discuss/b19d5fe1-db59-4952-b11b-a808e224973cn%40googlegroups.com.
Message has been deleted

rac...@rundeck.com

unread,
Apr 28, 2021, 2:28:00 PM4/28/21
to rundeck-discuss
Hi Suraj,

To use HTML code in your email notifications, you can use email templates (in Markdown or HTML format).

Take a look at this thread (includes how to add the rundeck output in the HTML email notification).

Greetings!
Reply all
Reply to author
Forward
0 new messages