Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

Reply-To property for Notifications

Explorer

I've tried various combinations of properties in our notifications configuration to try to specify a Reply-To address.

java.smtp.replyTo
Reply-To
ReplyTo
replyTo
ReplyToEmail
java.smtp.ReplyToEmail

None of the above seem to work. After much googling trying to find available custom properties to set to achieve this, I came up empty handed. Any help would be greatly appreciated.

4 REPLIES 4

Super Collaborator

Ambari uses JavaMail under the hood to send SNMP messages. I think what you're asking is for the Sender/From and Reply-To addresses to be different. Although JavaMail does support this, I don't believe it supports this using properties (at least it's not documented that you can). Where you could set "mail.smtp.from", you cannot set a different reply address in a similar manner.

The JavaMail code, however, does have reference to a "mail.reply.to" property which you could try.

Explorer

I tried adding

mail.reply.to

as a property; however, it did not work.

Super Collaborator

In that case, I don't think you'll be able to vary the sender and the reply-to addresses. Is there a reason that you need to, though? Can you simply use the existing mail.smtp.from property to specify your reply address?

Explorer

The purpose of this configuration is to harness the standard smtp property of ReplyTo to differ it from the source From: of the message.

The use case is this:

Alerts from the cluster come From: prod_cluster_noreply@domain.org
The ReplyTo header can be set for the specific notification, so that when a user hits reply, they can reply to the team managing that aspect of the cluster.

Say for instance you have three teams, three separate notification groups. All mails will be From:prod_cluster_noreply@domain.org with each notification having the property set with different team's distribution groups
e.g. ReplyTo: sparkteam@domain.org for notification group that disseminates notifications specific to spark
ReplyTo: dfsteam@domain.org for notification group that disseminates notifications specific to dfs issues/services/problems.

Upon alert arrival, these teams can hit reply, the ReplyTo field will populate from the headers so they address the appropriate team. Or, ReplyTo can be multiple users/distro groups, so when a user on the team replies that they are investigating an issue, it can ReplyTo a number of users or distro groups for notification.

edit:

Looking at the source here https://github.com/apache/ambari/blob/5460e8952729854f1c032a781c9a8de608ba4475/ambari-server/src/mai... it appears that the dispatch method would have to read the property in and call message.setReplyTo() and pass in a valid java maill address object. This would likely have to be a feature request.

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.