##### lm_smartlist.rc # # Resource file for procmail. # Filters list messages from lists handled by SmartList. # # 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 # 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 # 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" # LISTFOLDER=somepath/weather-List # INCLUDERC=yourpath/lm_skeleton.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 # 3 Aug 2003 # 5 Jan; 30 Nov 2004 # ## LISTEMAIL defaults to LISTNAME :0 * LISTEMAIL ?? ^^^^ { LISTEMAIL=$LISTNAME } ## Set ISTHISLIST if match occurs ISTHISLIST= # admin: :0 * $ ^(From |Return-Path: <)$LISTNAME-request@$LISTSERVERDOMAIN * $ ^From: SmartList <$LISTNAME-request@$LISTSERVERDOMAIN> * $ ^X-Loop: $LISTNAME@$LISTSERVERDOMAIN * $ ^Subject:.*(subscribe|confirm) { ISTHISLIST=1 } # list: :0 * 1^0 $ ^X-Loop: $LISTNAME@$LISTSERVERDOMAIN * 1^0 $ ^Resent-Sender: $LISTNAME-request@$LISTSERVERDOMAIN { :0 * 1^0 $ ^(From |Return-Path: <)bounce-$LISTNAME=[^@]*@$LISTSERVERDOMAIN * 1^0 $ ^X-Mailing-List: <$LISTNAME@$LISTSERVERDOMAIN> * 1^0 $ ^List-Id: <$LISTNAME.$LISTSERVERDOMAIN> * 1^0 $ ^List-(un)?subscribe: { ISTHISLIST=1 } } ## If match occurred and LISTFOLDER is set, save to LISTFOLDER :0: * ISTHISLIST ?? ^^1^^ * ! LISTFOLDER ?? ^^^^ $LISTFOLDER LISTEMAIL= ##### EOF lm_smartlist.rc