##### lm_googlegroups.rc # # Resource file for procmail. # Filters list messages from lists handled by Google groups. # # Variables, in (set before calling): # LISTNAME list name (e.g. in Reply-to: or in Mailing-List:, but # not necessarily between [...] in Subject:) # LISTEMAIL address of list (leave out part after @ and any generic # parts like -return); defaults to LISTNAME # 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 filter files are stored # Variables, returned: # ISTHISLIST set to "1" if email is from this list, unset otherwise # LISTEMAIL unset # # Run with e.g.: # LISTNAME="app-users" # LISTEMAIL="app-users" # LISTFOLDER=somepath/app-List # INCLUDERC=yourpath/lm_googlegroups.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.dnsalias.net/soft/procmail/ # # Copyright (C) by Volker Kuhlmann # Released under the terms of the GNU General Public License (GPL) Version 2. # See http://www.gnu.org/ for details. # # Volker Kuhlmann # 18 Nov 2009 # 05 Aug 2011 # 14 Jun 2013 # 14 Jul 2014 Fix List-Archive: recognition. # 13 Dec 2015 Fix List-Archive: recognition. Unset temp variable at end. # ## LISTEMAIL defaults to LISTNAME :0 * LISTEMAIL ?? ^^^^ { LISTEMAIL=$LISTNAME } ## Set ISTHISLIST if match occurs ISTHISLIST= LSERVERDOM__="googlegroups.com" # admin: :0 * $ ^From: noreply@$LSERVERDOM__ * ^Subject: Confirm your subscription * ^X-Google-Loop: confirm_boxsub #* ^Message-Id: .*\.google\.com> * B ?? $ https?://groups.google.com/group/$LISTEMAIL/boxsubscribe { ISTHISLIST=1 } :0 * ^From: noreply@googlegroups.com * ^Subject: Google Groups: Please confirm (subscription|unsubscribe) to * $ ^Reply-to: $LISTEMAIL-(un)?subconfirm.*@$LSERVERDOM__ * ^X-Google-Loop: (un)?sub_requested * B ?? $ http://groups.google.com/group/$LISTEMAIL/(sub\?subconfirm=|unsub\?) { ISTHISLIST=1 } # list: :0 * $ ^List-Id: <$LISTEMAIL.$LSERVERDOM__> * $ ^(X-BeenThere|Sender): $LISTEMAIL@$LSERVERDOM__ * $ ^Mailing-List: list $LISTEMAIL@$LSERVERDOM__; * $ ^List-Archive:.*|$) #* $ ^Subject: \[($LISTEMAIL|$LISTNAME)] { 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_googlegroups.rc