monit-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[monit-dev] Patch to ensure unique message-ids for notification mails


From: Steve Purcell
Subject: [monit-dev] Patch to ensure unique message-ids for notification mails
Date: Sun, 4 May 2008 19:35:43 +0200

I noticed that distinct monit notification mails were getting detected as duplicates; this can happen if a few services are restarted in the same polling period, for example, and is due to monit using only the UNIX time to build Message-Id headers.

Here's a suggested patch to make those headers somewhat more unique:

diff -r1.62 sendmail.c
190c190
<     do_send(&S, "Message-id: <address@hidden>\r\n", time(NULL), S.localhost);
---
> do_send(&S, "Message-id: <address@hidden>\r\n", time(NULL), random(), S.localhost);


Best wishes,

-Steve




reply via email to

[Prev in Thread] Current Thread [Next in Thread]