# $Id: procmailrc.mlm,v 1.1 2005/07/11 22:36:38 ca Exp $ # Generic procmailrc script to deal with mailing list managers (mlm). # Contributed by Philip Guenther. # # - it requires one local user, here: smxmlm # - this works for mlm that have two different programs for execution # and take the listname as argument. # # - entries in aliases: # o accept mail for smxmlm+detail: # smxmlm++: local: # # o redirect mail to mailing lists to smxmlm + mailing-list: # sm9-design-request: smxmlm+sm9-design-request # sm9-design-editor: smxmlm+sm9-design-editor # sm9-design-subscribe: smxmlm+sm9-design-subscribe # sm9-design-unsubscribe: smxmlm+sm9-design-unsubscribe # sm9-design-owner: smxmlm+sm9-design-owner # sm9-users-request: smxmlm+sm9-users-request # sm9-users-editor: smxmlm+sm9-users-editor # ... # Note: this does not work for virtual hosting, # currently $HOST is used as domain part. MAILDIR=$HOME/Mail LOGFILE=$MAILDIR/procmail.log COMSAT=no BINDIR=$HOME/bin VERBOSE=YES # get +detail, i.e., arg=detail arg=$1 # -owner mail gets fed to bouncequeue; extract the listname # from the argument. This is ugly because of limitations in # how extraction works in procmail's regexps # 1. check that argument (+detail) ends in "-owner". # 2. get begin of detail up to last "-" # 3. cut off trailing "-" :0 w * arg ?? -owner^^ * arg ?? ^^\/.+- * MATCH ?? ^^\/.*[^-] | $BINDIR/bouncequeue "$MATCH@$HOST" # All other address get fed to queue. The 'E' flag is so # that this recipe won't be run if bouncequeue failed :0 Ew | $BINDIR/queue "$arg@$HOST" # If we reach here, then bouncequeue or queue failed. # Set EXITCODE from their exit status so that the LMTP # response reflects their failure. EXITCODE = $?