From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-3.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id A2F5E1F4B5 for ; Sat, 16 Nov 2019 17:52:55 +0000 (UTC) Received: by mail-qt1-x831.google.com with SMTP id n4so14834431qte.2 for ; Sat, 16 Nov 2019 09:52:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=date:from:to:subject:message-id:mail-followup-to:mime-version :content-disposition; bh=L9uElAGRjxNowHz+qOiJq+OICFuD90UlabuB7fBUPXE=; b=Az1y+vdqYwDTMj63q9Cj5NEb9ci68fpj0MlVM0ap5ZicRSTX4pMRg4P7sHgCFNZJXb 9iXZLvgUnA+V5f1OR6r0J17KAhYjhFQCzxMvC13rxyFMOPs0O4J3y7rGDdk5SIm4pNVS vOeD+h1mO1UXyT78JwctYnTZniuP16fGtN+Gs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mail-followup-to :mime-version:content-disposition; bh=L9uElAGRjxNowHz+qOiJq+OICFuD90UlabuB7fBUPXE=; b=X6gOF+L3sqhNN0ymJLfdSdYUEucr23FARUQXxLNhvtTLpwe74BnDTQaVrG5c7mCh4q 6ua2rDx1lwztW04Of64U865c9hzBuaGBh964c4uK4aUFmwbkP0gX9oY372X5OMQJvOFF LmY26nvrYzuI6I9P5qpZP5PukMmA9UTxw5wtFTtWnx+6+atnK0jHk5l3A3J1Ec+SDMsQ fY06n3iEI5jY7RA0My3rWf+Xc+l77mjwOjgZELTsDXbY9jkJ+fqg+aIyhDVG6oEUUkRI Oq1/3EyEPjP6uDQaT4RHQiOL1F3Y63MoTWMbmYFUcedIpezXskppCRBmO8XV6IYKJMfQ 3RkQ== X-Gm-Message-State: APjAAAVqJ+ic+7nQ+INeTmpYgMQ6RAPdj4h5x0YLhafA1OXLW8hG3xYb NbiFPsvt6IfD50ll3heE5GNVk5gXL77IyA== X-Google-Smtp-Source: APXvYqxbLEb8ZFlqV1WX2hJU35qiomA+z5ZLjAAdYcTlu/ElMvZCb+9/YJKs1ntTDTAnveXAaI8qsQ== X-Received: by 2002:ac8:721a:: with SMTP id a26mr19815136qtp.208.1573926773704; Sat, 16 Nov 2019 09:52:53 -0800 (PST) Received: from chatter.i7.local (107-179-243-71.cpe.teksavvy.com. [107.179.243.71]) by smtp.gmail.com with ESMTPSA id 143sm6053751qke.54.2019.11.16.09.52.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Nov 2019 09:52:53 -0800 (PST) Date: Sat, 16 Nov 2019 12:52:51 -0500 From: Konstantin Ryabitsev To: meta@public-inbox.org Subject: Filter example for ML footers Message-ID: <20191116175251.ykhpp6zuo5f6kqiy@chatter.i7.local> Mail-Followup-To: meta@public-inbox.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline List-Id: Hello: Groups.io adds a super-obnoxious footer to all outgoing messages, and I would like to be able to filter that out. Example: https://lore.kernel.org/keys/20191111161300.hc7vb7rcb45gsqmg@chatter.i7.local/ The obnoxious footer can be either part of the main body (default "chaotic evil" version) or a separate mime-part (configurable, "lawful evil"). I tried to wrap my brain around existing filters, but they don't quite do the exact thing I need, specifically: - if there is a text/plain mime-part with just "^-=-=.*=-=-$", remove it - if there is no more content left after removing the footer, nuke the entire mime-part Any quick pointers how this can be accomplished? TIA. -K