New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error sending messages with multiple LDAP mail values #1439

Closed
tillo opened this Issue Sep 22, 2015 · 1 comment

Comments

Projects
None yet
3 participants
@tillo

tillo commented Sep 22, 2015

Situation

I have inetOrgPerson LDAP users mapped into Graylog.

Behaviour

When a user has multiple values within the mail field, messages are not sent and the following error message is shown:

The Graylog server encountered an error while trying to send an email. This is the detailed error message: org.apache.commons.mail.EmailException: javax.mail.internet.AddressException: Illegal address in string ``tillo@tillo.ch, martino@dellambrogio.ch'' (javax.mail.internet.AddressException: Illegal address in string ``tillo@tillo.ch, martino@dellambrogio.ch'')

Expected behaviour

I guess it should use an array instead of a comma to set multiple recipients, seems to be compatible with both org.apache.commons.mail and javax.mail.internet. I expect to have the message delivered to both recipients.

Debug information

I'm running latest graylog-server 1.2.0-5 on latest Debian stable 8.2 with latest Oracle JDK 1.7.0_80.

Additional comment

As org.apache.commons.mail is bundled into graylog.jar I don't know what version it is.
It really shouldn't be bundled, neither should 99% of the code in there, but I understand it's difficult to keep up with various distributions dependencies.

@bernd bernd added ldap bug labels Oct 14, 2015

@bernd bernd added this to the 1.2.2 milestone Oct 19, 2015

@bernd bernd self-assigned this Oct 19, 2015

bernd added a commit that referenced this issue Oct 19, 2015

Handle user email values with multiple addresses
LDAP users can have multiple addresses in the email field. Split the
email field on the "," character and add all addresses as recipient.

Convert recipients to a Set to avoid sending duplicate emails.

Fixes #1439

joschi added a commit that referenced this issue Oct 20, 2015

Merge pull request #1492 from Graylog2/issue-1439
Handle user email values with multiple addresses
(cherry picked from commit ba1e464, refs #1439)

joschi added a commit that referenced this issue Oct 20, 2015

Merge pull request #1492 from Graylog2/issue-1439
Handle user email values with multiple addresses
(cherry picked from commit ba1e464, refs #1439)

@joschi joschi closed this Oct 20, 2015

@bernd

This comment has been minimized.

Member

bernd commented Oct 20, 2015

This will be fixed in the upcoming Graylog 1.2.2 release. Thank you for the report!

See #1492 for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment