Ah, the power of `procmail`: PROCDIR=$HOME/.config/procmail :0 * ^List-Id: .*\<([a-z0-9-]+\.)?arin\.net\> { SWITCHRC=$PROCDIR/arin.list } :0 * ^List-Id: (North American Network Operators Group|.*\<(.+\.)?nanog\.org\>) { SWITCHRC=$PROCDIR/nang.list } # vim: set filetype=procmail: Not many know about `INCLUDERC` and `SWITCHRC` directives in `procmail`. But hopefully you got the idea. And it will help you break-down `procmail` config into multiple ones and group filters based on categories. Didn't knew about Google Apps Script. Thanks Tom. Gives me something to look into. And happy holidays everyone. On Fri, Nov 28, 2025 at 01:03:52PM -0500, Tom Beecher via NANOG wrote:
That’s great news, Tom! Perhaps you’ll share your filter for dropping NANOG promotional emails? And no fair using ChatGPT :)
In my Google Apps Script that I use for header based filtering, I would just do this:
... // NANOG Newsletters var from_h = message.getHeader("From"); var reply-to_h = message.getHeader("Reply-To"); if ( (from_h.includes('nanog-announce@lists.nanog.org') && reply-to_h.includes('news@nanog.org')) {
message.getThread().addLabel(GmailApp.getUserLabelByName("NANOG-Promo")); message.getThread().moveToArchive(); } ...
In a real mail client this is easier, but same idea.
-- Roman V Tatarnikov | https://linkedin.com/in/rtatarnikov