nanog mailing list archives

Re: NANOG Featured on "Packet Pushers" Podcast Network! πŸ¦ƒ Happy Thanksgiving! + More


From: Roman Tatarnikov via NANOG <nanog () lists nanog org>
Date: Fri, 28 Nov 2025 10:53:55 -0800

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

Attachment: signature.asc
Description:

_______________________________________________
NANOG mailing list 
https://lists.nanog.org/archives/list/nanog () lists nanog org/message/NKZLP3XSIEPUYAKE2CQIKB4O5PZXDTHQ/

Current thread: