##### lm_groupsio.rc # # Resource file for procmail. # Filters list messages from lists handled by groups.io. # # Variables, in (set before calling): # LISTNAME List name (e.g. between [...] in Subject:). # LISTEMAIL Address of list (leave out part after @ and any generic # parts like -return); defaults to LISTNAME. # LISTSERVERDOMAIN Domain of the list server handling this list # (the part after @). # LISTFOLDER Where to store email if it's from this list; # nothing will be stored if this is empty. # LISTFOLDER_UMASK If set, umask to use when saving to LISTFOLDER. # PROCDIR Directory where the procmail resource files are stored. # These may be unused by some of the listserver handlers (lm_*.rc): # LISTTO Your address to which list emails are sent. # Variables, returned: # ISTHISLIST Set to "1" if email is from this list, unset otherwise. # LISTEMAIL Unset. # # Run with e.g.: # LISTNAME="Weather Discussion" # LISTEMAIL="weatherdisc" # LISTSERVERDOMAIN="weather.net" # LISTFOLDER=somepath/weather-List # INCLUDERC=yourpath/lm_template.rc # in your $HOME/.procmailrc (you can leave out LISTEMAIL if it's the same as # LISTNAME). # # The latest version is always available from: # http://volker.top.geek.nz/soft/procmail/ # # Copyright (C) by Volker Kuhlmann # http://volker.top.geek.nz/contact.html # Released under the terms of the GNU General Public License (GPL) Version 2. # See http://www.gnu.org/ for details. # # Volker Kuhlmann # 31 Mar 2020 Created from lm_template.rc. # ## LISTEMAIL defaults to LISTNAME :0 * LISTEMAIL ?? ^^^^ { LISTEMAIL=$LISTNAME } ## Set ISTHISLIST if match occurs ISTHISLIST= #LSERVERDOM__="(yahoogroups|egroups|onelist).com" ## Admin (subscribe/unsubscribe) email: # # Reply-to: is set in confirmation request email, but not in welcome email. # # The "welcome to groups.io" can't be filtered for this list because it is not # specific to the list, only to groups.io. # :0 * $ ^Return-Path: <(invite|notice)bounce[a-z0-9+_.-]+@groups\.io> * $ ^From:.*<$LISTNAME\+(invite[a-z0-9+_.-]+|owner)@groups\.io> #* $ ^Reply-To:.*<$LISTNAME\+invite[a-z0-9+_.-]+@groups\.io> * $ ^Subject:.*$LISTNAME@groups\.io * $ ^Message-ID: <[a-z0-9+_.-]+@groups\.io> * $ ^DKIM-Signature:.*=groups\.io; { ISTHISLIST=1 } ## List email: :0 * $ ^Return-Path: * $ ^Subject:.*\[$LISTNAME] * $ ^X-Received: from .*by .*with .*for <$LISTNAME@groups\.io>; * $ ^List-Unsubscribe:.*//.*groups\.io.*/$LISTNAME/ * $ ^Sender: $LISTNAME@groups\.io * $ ^List-Id: <$LISTNAME.groups\.io> * $ ^Mailing-List: list $LISTNAME@groups\.io; * $ ^DKIM-Signature:.*=groups\.io; { ISTHISLIST=1 } ## If match occurred and LISTFOLDER is set, save to LISTFOLDER :0 * ISTHISLIST ?? ^^1^^ * ! LISTFOLDER ?? ^^^^ { :0 * ! LISTFOLDER_UMASK ?? ^^^^ { UMASK=$LISTFOLDER_UMASK } :0 : $LISTFOLDER } LISTEMAIL= #LSERVERDOM__= ##### EOF lm_groupsio.rc