Opened on 03/18/2014 at 09:52:22 AM

Last modified on 10/05/2019 at 09:13:56 PM

#167 new change

Batch similar cron mails

Reported by: trev Assignee:
Priority: P3 Milestone:
Module: Infrastructure Keywords:
Cc: mathias@adblockplus.org Blocked By:
Blocking: Platform: Unknown
Ready: no Confidential: no
Tester: Verified working: no
Review URL(s):

Description

Background

Currently, a single failure condition (typically Mercurial server unreachable) can easily generate several hundred cron mails. This is counterproductive, important issues can easily get lost. For any incident only the first report is interesting, the subsequent reports of the same issue only add noise.

What to change

One of our servers can take care of batching mails (this can be server4 or a new server), we can call it mailman.adblockplus.org. All cron mails should go to cron@mailman.adblockplus.org (as a side-effect, this will take care of Google's overeager anti-spam policies). The processing of that email address should be done by a script with the following functionality:

  • Remember all mail subjects seen in the past 5 minutes (minus the server identifier).
  • If the mail subject hasn't been seen in the past 5 minutes: forward the mail to the admins immediately.
  • If the mail subject has been seen in the past 5 minutes: batch the mail.
  • Optional: reject mails where the claimed server name doesn't match the IP address (will take care of mails sent out by test VMs).
  • Optional: log all mails in a way that allows looking them up/searching later.

In addition there should be a cron job that will look at the batches and send them to the admins as a single mail if either condition is met:

  • Last mail in the batch was received at least 5 minutes ago.
  • First mail in the batch was received at least 20 minutes ago.

Attachments (0)

Change History (1)

comment:1 Changed on 07/29/2014 at 01:58:06 PM by matze

  • Cc mathias@adblockplus.org added
  • Platform set to Unknown
  • Ready unset

Just an idea; but what about just modifying the Message-ID: resp. References: header, so that cron(8) messages with e.g. the same subject, date and hour are grouped in any mail client by default?

Add Comment

Modify Ticket

Change Properties
Action
as new .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from (none).
Next status will be 'reviewing'.
 
Note: See TracTickets for help on using tickets.