##### lm_mailman-member.rc # # Resource file for procmail. # Filters membership reminders from lists handled by mailman. # # Variables, in (set before calling): # LISTFOLDER Where to store the email if it's from this list. # Does not return when email is saved. If empty, nothing # will be saved and return value is in ISTHISLIST. # LISTFOLDER_UMASK If set, umask to use when saving to LISTFOLDER. # Variables, returned: # ISTHISLIST Set to "1" if email is from this list, unset otherwise. # # Run with e.g.: # LISTFOLDER=somepath/mailmanpasswords-List # INCLUDERC=yourpath/lm_mailman-member.rc # in your $HOME/.procmailrc. # This must be before the first lm_mailman.rc! # # 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 # 13, 29 Apr; 1 Dec 2002 # 2 Jun; 2 Jul; 4 Nov 2003 # 24 Jun; 1 Sep 2004 # 1 Apr 2007 # 25 Oct 2014 Adjust recognition patterns. # ISTHISLIST= ## Set ISTHISLIST if match occurs # membership reminders: :0 * ^From (mailman|[^@]*)-(admin|bounces|owner)[^@]*@ * ^From: ([a-z0-9_]+|mailman)[^@]*-(bounces|owner)@ * ^Subject:( .* mailing list (memberships )?reminder|.*Mitgliedschafts-Erinnerung) #* ^To: $LISTTO * ^X-Mailman-Version: { # some of these phrases may be broken into lines # use scoring (3 of 4 must match) :0 B * 1^0 reminder, sent out * 1^0 mailing list membership * 1^0 membership on the mailing list * 1^0 change your membership * 1^0 has requested a password reminder * 1^0 ^Password * 1^0 ^Your .* password is * -2^0 . { ISTHISLIST=1 } :0 B * 1^0 monatliche Infomail * 1^1 Mailinglist * 1^0 ^list.*password * -2^0 . { ISTHISLIST=1 } } ## If match occurred and LISTFOLDER is set, save to LISTFOLDER :0 * ISTHISLIST ?? ^^1^^ * ! LISTFOLDER ?? ^^^^ { :0 * ! LISTFOLDER_UMASK ?? ^^^^ { UMASK=$LISTFOLDER_UMASK } :0 : $LISTFOLDER } ##### EOF lm_mailman-member.rc