procmail
[Top] [All Lists]

Re: Getting started.

2001-08-16 02:11:02
"Jody 'Jolinux' Harvey" <jharvey(_at_)jolinux(_dot_)net> writes:
I am new to Procmail. Dallman Ross recommended I sign up for this list
(blame him).
I want to create a procmail.rc in my /etc/ in order to kill emails
containing viruses and spam. I have read on how to setup
procmail.rc on a user level. How do I set it up for the whole system?
Example:

# Set to yes when debugging
VERBOSE=no

RBOSE=on                      # "on" for more log info than you can stand

I'll assume that was the result of a slip of the cut-n-paste button.


SHELL=/bin/sh                   # be smart - use only sh here!

This is good.


SENDMAIL=/usr/lib/sendmail

This is not.  procmail sets the SENDMAIL variable for you: you should
only override it if you removed sendmail from the compiled in location,
which would be a bad idea for other reasons.


INCLUDERC="$HOME/.acks/.incrc"  # set yours as needed.  Mine sets
                               # $DATE=yymmdd as clarified below
LOGFILE=$HOME/.plogs/$DATE      # logs > 7 days to get purged by cron!
MAILDIR=$HOME/Mail              # set active maildrop directory

I would avoid setting MAILDIR for everyone.  That belongs in the user's
rcfile in my book, but it's your system...


ORGMAIL=/var/spool/mail/jharvey   # fall-through maildrop

If the compiled in value for ORGMAIL is wrong, then you should recompile
procmail with the correct value.  There are things procmail does using
ORGMAIL before it even opens an rcfile, so setting here can never be
completely correct.


PATH=$HOME/bin:/usr/local/bin:/usr/bin:/bin

Um, isn't that the default value?  Furthermore, newer versions of procmail
purposely use a different path for the /etc/procmailrc file that doesn't
include $HOME/bin for security.  Including the above assignment may open
a security hole on your system.


As you see, jharvey (my user name), is there. What would I put there if I
wanted to run procmail on all email coming in? Thanks.

You're looking for the LOGNAME variable.  (But don't set ORGMAIL in your
/etc/procmailrc file!)


Philip Guenther
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>
  • Getting started., Jody 'Jolinux' Harvey
    • Re: Getting started., Philip Guenther <=