VMware Cloud Community
mw_hyperic
Contributor
Contributor

SMTP Authentication option

I have been testing Hyperic for three days now and am pretty impressed.

Once question has come up, and I apologize if this has already been discussed, has Hyperic considered adding SMTP authentication for the alerting feature?

I know most UNIX servers have SMTP out of the box but we're running Windows and I may not be able to add the SMTP service.

Thank you!
M
0 Kudos
11 Replies
admin
Immortal
Immortal

HQ supports using SMTP authentication, but it needs to be configured manually.

Edit: server-2.7.x/conf/templates/jboss-service-events.xml

Add the following lines, changing them as appropriate for your environment to the <configuration> section for the MailService:

<property name="mail.smtp.user" value="youremail@domain.com"/>
<property name="mail.smtp.password" value="YOURPASSWORD"/>
<property name="mail.smtp.auth" value="true"/>

This change will require a server reboot.
0 Kudos
mw_hyperic
Contributor
Contributor

Thank you!
0 Kudos
mw_hyperic
Contributor
Contributor

I can't seem to get around an error that I am receiving now that I have placed the provided code. I am sure this is simply but I don't know what I have set wrong. Any help is appreciated.

Michael

jboss-service-events.xml section:
<attribute name="Configuration">
<!-- Test -->
<configuration>
<!-- Change to your mail server prototocol -->
<property name="mail.store.protocol" value="pop3"/>
<property name="mail.transport.protocol" value="smtp"/>

<!-- Change to the user who will receive mail -->
<property name="mail.user" value="nobody"/>

<!-- Change to the mail server -->
<property name="mail.pop3.host" value="pop.sbcglobal.yahoo.com"/>

<!-- Change to the SMTP gateway server -->
<property name="mail.smtp.host" value="smtp.sbcglobal.yahoo.com"/>

<property name="mail.smtp.user" value="mytestemail@sbcglobal.net"/>
<property name="mail.smtp.password" value="pw"/>
<property name="mail.smtp.auth" value="true"/>

<!-- Enable debugging output from the javamail classes -->
<property name="mail.debug" value="true"/>
</configuration>


The error:
2007-01-05 00:49:48,031 INFO [STDOUT] DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
2007-01-05 00:49:48,031 INFO [STDOUT] DEBUG SMTP: useEhlo true, useAuth true
2007-01-05 00:49:48,031 INFO [STDOUT] DEBUG SMTP: useEhlo true, useAuth true
2007-01-05 00:49:48,031 INFO [STDOUT] DEBUG SMTP: trying to connect to host "smtp.sbcglobal.yahoo.com", port 25
2007-01-05 00:49:48,234 INFO [STDOUT] 220 smtp106.sbc.mail.mud.yahoo.com ESMTP
2007-01-05 00:49:48,234 INFO [STDOUT] DEBUG SMTP: connected to host "smtp.sbcglobal.yahoo.com", port: 25
2007-01-05 00:49:48,234 INFO [STDOUT] EHLO lazarus
2007-01-05 00:49:48,296 INFO [STDOUT] 250-smtp106.sbc.mail.mud.yahoo.com
250-AUTH LOGIN PLAIN XYMCOOKIE
250-PIPELINING
250 8BITMIME
2007-01-05 00:49:48,296 INFO [STDOUT] DEBUG SMTP: Found extension "AUTH", arg "LOGIN PLAIN XYMCOOKIE"
2007-01-05 00:49:48,296 INFO [STDOUT] DEBUG SMTP: Found extension "PIPELINING", arg ""
2007-01-05 00:49:48,296 INFO [STDOUT] DEBUG SMTP: Found extension "8BITMIME", arg ""
2007-01-05 00:49:48,296 INFO [STDOUT] DEBUG SMTP: Attempt to authenticate
2007-01-05 00:49:48,296 INFO [STDOUT] AUTH LOGIN
2007-01-05 00:49:48,437 INFO [STDOUT] 334 VXNlcm5hbWU6
2007-01-05 00:49:48,437 INFO [STDOUT] RUFNIEFwcGxpY2F0aW9u
2007-01-05 00:49:48,484 INFO [STDOUT] 334 UGFzc3dvcmQ6
2007-01-05 00:49:48,484 INFO [STDOUT] cGFzc3dvcmQ=
2007-01-05 00:49:48,656 INFO [STDOUT] 421 Resource temporarily unavailable [user] (#4.9.0)
2007-01-05 00:49:48,656 ERROR [org.hyperic.hq.bizapp.server.action.email.EmailFilter] Error sending email: [HQ] !! - lazarus Lazarus CPU Usage > 80%

Message was edited by: mw
0 Kudos
mw_hyperic
Contributor
Contributor

In case it helps, my hq-server.conf file mail entry:

# Property: server.mail.host
#
# The IP or hostname of the SMTP server that the HQ server will use for sending
# alerts and other HQ-related emails. Most UNIX platforms have a local SMTP
# server, in which case localhost or 127.0.0.1 can be used here.
server.mail.host=127.0.0.1

Message was edited by: mw
0 Kudos
cwitt_hyperic
Hot Shot
Hot Shot

Some ISPs require that you "pop first" before being able to send mail. Since you are using an sbcglobal.yahoo.com SMTP server, I suspect this is likely the problem.
0 Kudos
cwitt_hyperic
Hot Shot
Hot Shot

Since in retrospect, that last post wasn't as clear as it could have been, what I am talking about when I say "pop first" is the act of checking the account Inbox for the username you are using for SMTP authentication on the remote server.
0 Kudos
mw_hyperic
Contributor
Contributor

That is a good point. The smtps I readily have access to will probably have this requirement. Is there a way to get Hyperic to do it or do I need to start banging on my network admin's door for the company's smtp?

Message was edited by: mw
0 Kudos
cwitt_hyperic
Hot Shot
Hot Shot

HQ won't be able to do the "pop first" work for your SMTP connection, so I would pursue avenues that would connect you to a locally controlled SMTP server that you knew for sure did not have this requirement.
0 Kudos
mw_hyperic
Contributor
Contributor

Thanks!
0 Kudos
e37
Contributor
Contributor

Who is actually sending the message? I assume it's the server and not the agent. I ask because I do not see any emails going out form the server...

**I'm running this o Linux.
0 Kudos
Jass_hyperic
Contributor
Contributor

Hey,

I configured my HQ in the same way as shown in this thread to authenticate for an external smtp server
I'm using the server of our webhoster for sending email but I get an error in the logfile when testing email-sending in case of error. This is the error:
2008-05-16 13:17:49,687 ERROR [Thread-69] [org.hyperic.hq.bizapp.server.action.email.EmailFilter] Error sending email: [HQ] !!! - PC03 down pc03.ikj.local

2008-05-16 13:19:47,375 DEBUG [JMS SessionPool Worker-0] [org.hyperic.hq.events.ext.AbstractTrigger.Fired] Firing actions for trigger with id=10001; alert def [PC03 down] with id=10001; triggering event [0], event time=Fri May 16 13:17:00 CEST 2008

Any ideas?
0 Kudos