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.
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.
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?
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: email@example.com
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:firstname.lastname@example.org with each notification having the property set with different team's distribution groups
e.g. ReplyTo: email@example.com for notification group that disseminates notifications specific to spark
ReplyTo: firstname.lastname@example.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.
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.