##### lm_lsoft-listserv.rc # # Resource file for procmail. # Filters list messages from lists handled by L-Soft's listserv. # See http://www.lsoft.com/ # # Variables, in (set before calling): # LISTNAME list name (between [...] in Subject:); # LISTEMAIL address of list (leave out part after @ and any generic # parts like -return); defaults to LISTNAME # optional; use if there's an admin address # LISTSERVERDOMAIN domain of the list server handling this list # (the part after @) # LISTTO your address to which list emails are sent # 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 # Variables, returned: # ISTHISLIST set to "1" if email is from this list, unset otherwise # # Run with e.g.: # LISTNAME="WEATHER-L" # # setting of LISTEMAIL is optional (set if there's a list admin address) # LISTEMAIL="weatheradmin" # LISTSERVERDOMAIN="SOME.PLACE.NET" # LISTTO="youremail@dom.ain" # LISTFOLDER=somepath/weather-List # INCLUDERC=yourpath/lm_lsoft-listserv.rc # in your $HOME/.procmailrc. # # 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 # 11, 12, 13, 14, 22 Apr; 1 Dec 2002 # 16 Oct 2003 # 5 Jan 2004 # 30 Oct 2016 Fix From:, Sender: patterns for list emails. (Yep, 1st change in # almost 13 years...!) # ## LISTEMAIL defaults to LISTNAME :0 * LISTEMAIL ?? ^^^^ { LISTEMAIL=$LISTNAME } ## Set ISTHISLIST if match occurs ISTHISLIST= # admin: :0 * $ ^From:.*LISTSERV@$LISTSERVERDOMAIN * $ ^TO_$LISTTO { :0 * $ ^(Subject:.*$LISTNAME|.*-ListID: $LISTNAME) { ISTHISLIST=1 } :0 B #* $ ^.*SUB[A-Z]* $LISTNAME * $ ^> [A-Z]+ $LISTNAME { ISTHISLIST=1 } } # list: :0 * $ ^From (owner-$LISTNAME|$LISTNAME-owner).*@$LISTSERVERDOMAIN * $ ^Sender:.*$LISTNAME(|-request)@$LISTSERVERDOMAIN { ISTHISLIST=1 } :0 * $ ^From owner-$LISTNAME.*@$LISTSERVERDOMAIN #* $ 1^1 ^(From|Reply-To|Approved-By):.*$LISTEMAIL@$LISTSERVERDOMAIN * $ 1^1 ^(From|Reply-To|Approved-By):.*$LISTEMAIL * $ -1^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 } LISTEMAIL= ##### EOF lm_lsoft-listserv.rc