On 24 April 2018 at 21:24 Peter Blok < pblok@bsd4all.org> wrote:


Hi,

If a user moves a mail to a Junk folder, this e-mail is going thru imap_sieve and ends up in sa-learn. I wrote some tools to immediately propagate that to the other node of the cluster as well as locally.

Everything works fine, but sometimes I see a storm of requests hogging the CPU and I would like to collect some debugging information, Preferably I would like the permanent unique id of the mail in the maildir, but am looking for some kind of unique id that will help me identify if an e-mail somehow passes the sieve filter multiple times.

Basically I have changed the pipe to sa-learn to my proxy that will send it across to the other node as well as call sa-learn locally. So something I can get in a sieve script and pass along.

Peter




You could try parsing mail's message-id header and use it when present.
---
Aki Tuomi