Graylog2 / Graylog2/graylog2-server

Email sender in email alert callback should be set by transport_email_from_email

Open
#5,230 0 comments 0 reactions 0 assignees View on GitHub
alerting bug triaged
Dominant language
Java
Stars
8.1k
Forks
1.1k
Avg merge
1d 20h
Merged PRs (30d)
217

Description

Hi,

When creating an email alert callback, the sender field is filled by default with "graylog@example.org" even if `transport_email_from_email` is set.

I think it's an error and that this field should be set to `transport_email_from_email` from `graylog.conf` if defined.
Only if `transport_email_from_email` is not defined, the default email should be "graylog@example.org".

## Expected Behavior

The email field should be set to `transport_email_from_email` value or "graylog@example.org"

## Current Behavior

The email field is set to "graylog@example.org". We have to delete the content of email send field and validate the form to get the email set to `transport_email_from_email`.

## Possible Solution

Here, the email is set to `graylog@example.org` in any case:
https://github.com/Graylog2/graylog2-server/blob/20ab7325eb82ec09c08ece0433e183412f32a05d/graylog2-server/src/main/java/org/graylog2/alarmcallbacks/EmailAlarmCallback.java#L177

I think it should be `emailConfiguration.getFromEmail()` and if `transport_email_from_email` is not set, `graylog@example.org`.

Adrien

* Graylog Version: 2.4.6

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.