Feature request about sa_debug

Patrick Proniewski patrick.proniewski at univ-lyon2.fr
Mon Jun 26 08:58:01 CEST 2023


Hello,

I’m running at work a load-balanced farm of 3 MX servers that filter about 1 million email messages per month with Amavisd-new / SpamAssassin / etc.

It’s important for us to get some verbosity, at least periodically, in our logs so we can pinpoint the origin of a problem later. So I’m using this setup in amavisd.conf : 

$sa_debug = 1;
@debug_recipient_maps =
 (new_RE(
   qr'.*b at example\.net',
));

I’ve find out that email addresses for our domain which user part is ending with the letter b are not so common, but also not so rare, so I can get some random messages going through with full debug activated. Still it can leave me without any debug/verbose logs for few hours, making it harder to do forensic when a problem occurs. Obviously I won’t setup debug verbosity for every email going through as that would be a huge waste of resources.

So my feature request is the following: 

It would be really nice to have a setting like sa_debug_sampling (or sa_debug_ratio, sa_debug_sample, etc.) taking an integer value (eg. 100) that would trigger debug logging for 1 email message every sa_debug_sampling messages (eg. 1 message every 100 messages).
The sampling can be fuzzy, for a sa_debug_sampling value of 100 I would not mind getting a debug output every 90 to 110 messages.

Another way to address that could be time-based with a setting like sa_debug_interval taking an integer value in seconds (eg. 10) that would trigger debug logging for 1 email message every sa_debug_interval seconds (eg. 1 message every 10 secondes).

I don’t know if it’s even feasible but I guess I’ll never know if I don’t ask :)

Best regards,

Patrick
(I’m subscribed to the digest, fell free to Cc. me)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2251 bytes
Desc: not available
URL: <https://lists.amavis.org/pipermail/amavis-users/attachments/20230626/8070efd2/attachment.p7s>


More information about the amavis-users mailing list