We use procmail so our users can modify there own alias lists and yet have the
lists be global lists to the entire local network. Our problem is a procmail
list call inside a procmail list doesn't work. E.g., the list is called
ai-seminar and from within ai-seminar another procmail list is called whose name
is ai-staff.
Any help on this would be greatly appreicated!!
--Laura Falk
--Departmental Computing Organization
--Electrical Engineering and Computer Science
Here is the procmailrc file and what was logged to the log file:
rc file
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
PATH=/bin:/usr/bin:/usr/ucb:/usr/etc/local:/usr/local/bin # add more if
appropriateSHELL=/bin/sh
VERBOSE=yes
LOGFILE=/var/log/procmail.log
LOG=$list:$listreq:$subscribers
# list should contain the submitting address of the list
# listreq should contain the request address of the list
# subscribers should name the file which contains the list of subscribers
# separated by whitespace
:3wfh
!^Subject:.*((add|remove).*list|subscribe)
!^From +(postmaster|Mailer)
!^X-Loop: loop
| formail -b -IReturn-Receipt-To: -I"Errors-To: $listreq" \
-I "Sender: $listreq" -I"Precedence: bulk" -IReceived: -I"X-Loop: loop"\
# -i "Reply-To: $list" # uncomment if you want, many people
# consider this a bad idea.
# If memberlist is longer than 2048 bytes, you will have to insert a
# LINEBUF=some_big_number here because procmail uses a buffer of size
# $LINEBUF to expand the inline 'cat'
LINEBUF=30000 # cseg list is the longest--ez
:Aw
! -f$listreq `/usr/etc/local/procmail.dc $subscribers` # the -f and
-oi are sendmail options
# omit if not applicable
# the -f flag will only take effect if the sender is not local
# Alternatively you could have put the burden on the shell for expanding the
# 'cat' by providing the following action line instead:
# | $SENDMAIL -oi `/usr/etc/local/procmail.dc $subscribers`; # the ; forces
the procmail to pass
# on the line to the shell unparsed
# Anything not delivered yet (either because it was from the postmaster
# or mailer-daemon, or because it might be a request-message) will be forwarded
# to the list maintainer:
:0w
! -oi $listreq
# In case not even this works, the mail will be appended to the
# following last-resort files
UMASK=666 # this is probably inevitable since procmail (in this case)
# could be running under the local-sender's uid or the
# daemon or mailer-uid (in the remote-sender's case)
DEFAULT=/tmp/${listreq}s # first-choice
ORGMAIL=/var/tmp/${listreq}s # a last-last-resort-file in case the
# filesystem for /tmp/mylist-request should be full
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5
log fileprocmail: Assigning
"LOG=ai-seminar(_at_)eecs(_dot_)umich(_dot_)edu:ai-seminar-request(_at_)eecs(_dot_)umic(_dot_)edu:/y/atl/ai-seminar.aliases"
ai-seminar(_at_)eecs(_dot_)umich(_dot_)edu:ai-seminar-request(_at_)eecs(_dot_)umich(_dot_)edu:/y/atl/ai-seminar.aiasesprocmail:
Match on ! "^Subject:.*((add|remove).*list|subscribe)"
procmail: Match on ! "^From +(postmaster|Mailer)"
procmail: Match on ! "^X-Loop: loop"
procmail: Executing "formail,-b,-IReturn-Receipt-To:,-IErrors-To:
ai-seminar-reuest(_at_)eecs(_dot_)umich(_dot_)edu,-I,Sender:
ai-seminar-request(_at_)eecs(_dot_)umich(_dot_)edu,-IPrecedence:
ulk,-IReceived:,-IX-Loop: loop#,-i,Reply-To:
ai-seminar(_at_)eecs(_dot_)umich(_dot_)edu"
procmail: Assigning
"LOG=ai-staff(_at_)eecs(_dot_)umich(_dot_)edu:ai-staff-request(_at_)eecs(_dot_)umich(_dot_)ed:/y/atl/ai-staff.aliases"
ai-staff(_at_)eecs(_dot_)umich(_dot_)edu:ai-staff-request(_at_)eecs(_dot_)umich(_dot_)edu:/y/atl/ai-staff.aliasesrocmail:
Match on ! "^Subject:.*((add|remove).*list|subscribe)"
procmail: Match on ! "^From +(postmaster|Mailer)"
procmail: No match on ! "^X-Loop: loop"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5