Configure OEM with a gmail mail server

If you’d like to have Oracle Enterprise Manager (OEM) send you emails, you need to be able to talk to a mail server. With many organizations moving to gmail as their corporate email, you might wonder if it is possible to configure gmail as an outgoing email server in OEM.

If you plug in the ‘expected’ values, you’ll often see things like this in OEM:

smtp.gmail.com:25: Test failed with message: “Could not connect to SMTP host: smtp.gmail.com, port: 25” [SMTP Server: smtp.gmail.com:25, User name: your.email.address@yourdomain.com, Secure Connection: SSL/TLS].

And you might get an email from the gmail security team that looks like this:

PreventedSignIn

Configuration with gmail is possible, it just takes a few steps extra steps and some non expected values.

The first thing that you’ll have to do doesn’t involve OEM at all. Instead you’ll have to head over to the account settings for your gmail account. Log into your gmail account and click the picture in the top right corner and then click the My Account button.

MyAccount

From here you’re going to do two things: Enable 2-Step Verification (under Sign-in & Security). This will require you to configure an additional communication method like a phone that can receive texts. Once you’ve done that you’ll see a new link for App passwords. Click that link and you’ll be able to create a mail application. I used Other (custom name) and named it Oracle Enterprise Manager.

GeneratePassword

Once that is done, click the GENERATE button.

GeneratePassword2

You’ll now be given an application specific password that doesn’t need 2-step verification. This password doesn’t need to be remembered or written down, and you can select and copy it from the popup window. You’ll plug this password into OEM. If you lost your OEM application specific password for some reason (server crashed and you didn’t have a backup, or maybe you are just migrating from Grid Control to Cloud Control on a brand new server and you aren’t planning on migrating anything) you can just generate a new application specific password.

GeneratePassword3

With the copied password in your buffer, you can go to the Email Server configuration in OEM. I got there in OEM 13c by using the Initial Setup Console located under the gear in the top left of OEM.

InitialSetup

From there configure your sender identity. I used Enterprise Manager for Identify Sender As, and then the actual email address for my account on gmail for Sender’s Email Address.

SenderIdentity

Click the Add button in the Outgoing Mail (SMTP) Servers region and use the following values:

Host: smtp.gmail.com
Port: 465
User Name: your.email.address@your.domain.com
Password: Paste the value you copied from the gmail popup.
User Secure Connection: SSL/TLS

ConfigureOEM

Note that the port for the SSL/TLS is actually 465 and not 25 like you might think. See https://support.google.com/mail/answer/78775?hl=en for more possible values although the above worked for me.

Now click the Test Mail Servers button and you should see the following:

Test

If you check your gmail account you should have an email that looks a lot like this one:

EMTestMessage

Congratulations, you’ve configured an outgoing email server for OEM notifications!

Note that I have asked Oracle to make a note in Oracle Support about this as I wasn’t able to find anything in there while I was trying to work with them to get this configured.

Happy OEM’ing.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: