Graylog2 / Graylog2/graylog2-server

Allow setting name in from address for email notifications

Open
#15,364 3 comments 0 reactions 0 assignees View on GitHub
feature
Dominant language
Java
Stars
8.1k
Forks
1.1k
Avg merge
1d 20h
Merged PRs (30d)
217

Description

There appear to be 2 ways to set the "from" email address for email notifications:

1. Set the config parameter `transport_email_from_email` (directly or via env variable `GRAYLOG_TRANSPORT_EMAIL_FROM_EMAIL`)
2. Set the optional sender value in a notification's settings

## Expected Behavior
When the email is received it should appear to come from the specified address

## Current Behavior
The email always comes from the email address used for authentication

## Steps to Reproduce (for bugs)

1. Set GRAYLOG_TRANSPORT_EMAIL_FROM_EMAIL env variable in a container running Graylog
2. Send a notification from the node
3. Populate the sender field in the notification settings via the UI
4. Send another notification

Both notifications will be sent without changing the sender address from the authentication address.

## Context
It would be valuable to be able to control the from address because we reuse mail accounts for multiple services and changing the from address allows us to set up filters in our mail accounts to route messages from different sources appropriately.

On a related note, it can be a nice bit of polish to be able to utilize the `name` in addition to the email address, which should be possible by just using [another overload](https://commons.apache.org/proper/commons-email/apidocs/src-html/org/apache/commons/mail/Email.html#line.737) of the `setFrom` method already in use.

## Your Environment

* Graylog Version: 5.0.5
* Elasticsearch Version: OpenSearch 2.3
* MongoDB Version: 5.0.0
* Operating System: Graylog Docker Image

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.