parsedmarc icon indicating copy to clipboard operation
parsedmarc copied to clipboard

Emails are archived or deleted even if Elasticsearch server is killed during import

Open AnaelMobilia opened this issue 2 years ago • 2 comments

Hi,

The situation :

  • Massive import of DMARC reports (~50k) on one time, mail after mail
  • Elasticsearch was killed (OOM) during the import

Elasticsearch consider each mail as done despite the fact that it can't store results in Elasticsearch.

This is due to :

I see two options in order to prevent this issue :

  • Biggest one (and cleanest) : don't move (or delete) mails in get_dmarc_reports_from_mailbox, but after having results reports saved in elasticsearch (implies to have an UUID pointer to the email)
  • Easiest one (and dirtiest) : check for Elasticsearch (or other) server connectivity before moving (or deleting) emails

@seanthegeek have you a preference ?

Bests regards, Anael

AnaelMobilia avatar Oct 17 '22 09:10 AnaelMobilia

Similar to #242

AnaelMobilia avatar Jan 06 '23 09:01 AnaelMobilia

I had a similar problem because my elasticsearch available disk space went below the threshold, so it began rejecting the updates, after the mail messages were moved. That may not be detected by a connectivity check.

rodpayne avatar Apr 06 '24 22:04 rodpayne