Skip to content
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

Watcher email action uses the same Message-ID if multiple mail actions are used #29563

Closed
ypid-geberit opened this issue Apr 17, 2018 · 3 comments

Comments

@ypid-geberit
Copy link

ypid-geberit commented Apr 17, 2018

Elasticsearch version (bin/elasticsearch --version): Version: 5.5.1, Build: 19c13d0/2017-07-18T20:44:24.823Z, JVM: 1.8.0_151

Plugins installed: repository-azure, x-pack

JVM version (java -version):

openjdk version "1.8.0_151"
OpenJDK Runtime Environment (IcedTea 3.6.0) (build 1.8.0_151-b12 suse-18.1-x86_64)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)

OS version (uname -a if on a Unix-like system): openSUSE Leap 42.3, Linux xxxxxxxx 4.4.114-42-default #1 SMP Tue Feb 6 10:58:10 UTC 2018 (b6ee9ae) x86_64 x86_64 x86_64 GNU/Linux

Description of the problem including expected versus actual behavior: Watcher email action uses the same Message-ID if multiple mail actions are used in the same watch. This can cause unexpected behavior for mail servers (MTAs). It is therefore expected to either omit the Message-ID field, or ensure that a unique one is used for every mail action.

Steps to reproduce:

Please include a minimal but complete recreation of the problem, including
(e.g.) index creation, mappings, settings, query etc. The easier you make for
us to reproduce it, the more likely that somebody will take the time to look at it.

  1. Define and put watch with multiple email actions into Elasticsearch. Example:

    ---
    
    ## Only a partial watch definition.
    ## Note that I am using YAML. PS: YAML is awesome.
    
    actions:
      test1:
        email:
          to: 'Robin Schneider <[email protected]>'
    
          subject: 'Test 1'
          body: 'test'
    
      test2:
        email:
          to: 'Robin Schneider <[email protected]>'
    
          subject: 'Test 2'
          body: 'test'
  2. Trace network connection using tcpdump 'port 25' -nn -s 0 -w /tmp/watcher_mail.pcap or Wireshark.

  3. Execute or simulate the watch.

  4. Reassemble the TCP connection.

Provide logs (if relevant):

This is reproducible.

Run 1 (for both mails the same):

Message-ID: _inlined__49e6b804-2e77-4214-8b02-1c0a412caa32-2018-04-16T08:28:32.888Z
Subject: Test 1
MIME-Version: 1.0

Run 2 (for both mails the same):

Message-ID: _inlined__37d6df2a-7eeb-451f-9b64-d54ecffe166f-2018-04-17T14:57:56.172Z
Subject: Test 1
MIME-Version: 1.0
@jasontedor
Copy link
Member

This repository is for open source Elasticsearch only yet this issue concerns X-Pack. For that, please use the forum.

@ypid-geberit
Copy link
Author

ypid-geberit commented Apr 17, 2018

@jasontedor Sorry for that and thanks for the pointer. I reported it in the forum: https://discuss.elastic.co/t/bug-report-x-pack-watcher-email-action-uses-the-same-message-id-if-multiple-mail-actions-are-used/128399

We also have a Elastic subscription. Just give me a hint if it helps when I also open a case pointing to this.

@jasontedor
Copy link
Member

Sorry for that and thanks for the pointer.

No apology necessary, it's completely understandable. We will also be making improvements in this area soon so I'm sorry that we continue to point you elsewhere in the meantime.

We also have a Elastic subscription. Just give me a hint if it helps when I also open a case pointing to this.

In that case your best approach would be to open a support case (and link to the forum post).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants