[Marxism] procmail

Hans G. Ehrbar ehrbar at lists.econ.utah.edu
Fri Nov 21 11:45:23 MST 2003


Here is what I did, and I think it's working now:

I created the procmailrc file

/etc/procmailrcs/marxism.procmailrc

which stores the last 100 messages in the directory

/var/lib/mailman/archives/private/marxism.last100

before these messages are seen by mailman,
and I added the following line to /etc/aliases:

marxism: "|/usr/bin/procmail -m /etc/procmailrcs/marxism-procmailrc"

Here is the content of
/etc/procmailrcs/marxism.procmailrc


------------------------------------------------
MAILDIR=/var/lib/mailman/archives/private

#The following stores the last 100 incoming mails
#before they are seen by mailman
#in the directory
#/var/lib/mailman/archives/private/marxism.last100
#This comes from man procmailex

:0 c
marxism.last100

:0 ic
| cd marxism.last100 && rm -f dummy `ls -t msg.* | sed -e 1,100d`

:0
|/usr/lib/mailman/mail/mailman post marxism
----------------------------------------------------------


Both the file
/etc/procmailrcs/marxism.procmailrc
and the directory
/var/lib/mailman/archives/private/marxism.last100
are owned by ehrbar,
in this way procmail will store the files as user ehrbar.

I also had the following entry in /etc/exim/exim.conf
------------------------------------------------------------------
# This director handles aliasing using a traditional /etc/aliases file.
# If any of your aliases expand to pipes or files, you will need to set
# up a user and a group for these deliveries to run under. You can do
# this by uncommenting the "user" option below (changing the user name
# as appropriate) and adding a "group" option if necessary.
#I had to do this for the procmail alias


system_aliases:
  driver = aliasfile
  file_transport = address_file
  pipe_transport = address_pipe
  file = /etc/aliases
  search_type = lsearch
  user = root
  group = list

-----------------------------------------------------------------

but procmail was not doing its thing
as root.list but as nobody.nogroup
I think procmail was refusing to do it
as root for security reasons.
In Debian, mailman runs as root,
this is not ideal

Hans.




More information about the Marxism mailing list