procmail
[Top] [All Lists]

procmail works at command line but .procmailrc is not filtering - RESEND

2000-01-21 09:24:06
Mail was down for a couple of days so any responses to my plea for help never 
made it so I'm resending.



problem ( I think ) is:

filters in rcfile aren't working.

I can run procmail from the command line and the message I pipe in goes to the 
default file.  I have set up 3 different receipes to redirect mail and none 
work.  To test whether or not my expression in the rcfile is valid I'm using 
egrep at the bourne shell command line, ie, egrep "^From:.A" /var/mail/agreen. 
This works some of the time.  If a mail note is from the NT platform my test 
fails but if it's from sendmailit works.  I think it has to do with how NT 
writes the From: section ,ie,  

        From: "Green, Antoinette" 
<Antoinette(_dot_)Green(_at_)usa(_dot_)xerox(_dot_)com>
vs.
        From: Antoinette Green <agreen(_at_)eng(_dot_)mc(_dot_)xerox(_dot_)com>

I'm not sure that egrep is an effective way to debug procmail because when my 
command line egrep test works my .procmailrc still does redirect the mail to 
the 
file I've specified in the rcfile.  Below is a copy of my .procmailrc file.  

If you're so inclined to provide me with some insight I would appreciate it.

Thanks.

#

------------- End Forwarded Message -------------

# Please check if all the paths in PATH are reachable, remove the ones that
# are not.

VERBOSE=on
PATH=$HOME/bin:/usr/bin:/usr/ucb:/bin:/usr/local/bin:.
MAILDIR=$HOME/Mail      # You'd better make sure it exists
DEFAULT=$MAILDIR/default
                        # We don't use a global lockfile here now.
                        # Instead we use local lockfiles everywhere.
                        # This allows mail to arrive in all mailboxes
                        # concurrently, or allows you to read one mailbox
                        # while mail arrives in another.

# The next recipe will split up Digests into their individual messages.
# Don't do this if you use a global lockfile before this recipe (deadlock)

#:0
#* ^Subject:.*Digest
#|formail +1 -d -s procmail

LOGFILE=$MAILDIR/from           # Put it here, in order to avoid logging
                                # the arrival of the digest.

# An alternative and probably more efficient solution to splitting up a digest
# would be (only works for standard format mailbox files though):

#:0:
#* ^Subject:.*Other Digest
#|formail +1 -ds cat >>this_lists_mailbox

# Notice the double : in the next recipe, this will cause a lockfile
# named "$MAILDIR/todd.lock" to be used if and only if this mail is going
# into the file "todd".

:0:                             # Anything from thf
* ^From:.A
test                            # will go to $MAILDIR/test

:0:                             # Anything from thf
* ^From:.G
G                               # will go to $MAILDIR/G

:0:                             # Anything from thf
* ^From:.J
J                               # will go to $MAILDIR/J
:0:                             # Anything from thf
* ^From:.k
k                               # will go to $MAILDIR/k

# The next recipe will likewise use $MAILDIR/uunetbox.lock as a lock file.

#:0:                            # Anything from people at uunet
#* ^From(_dot_)*(_at_)uunet
#uunetbox                       # will go to $MAILDIR/uunetbox


# And here the lockfile will be $MAILDIR/henries.lock of course.

#:0:                            # Anything from Henry
#* ^From.*henry
#henries                                # will go to $MAILDIR/henries


# But you can specify any lockfile you want, like "myfile".  The following
# recipe will use "$MAILDIR/myfile" as the lock file.

##:0:myfile                     # All 'questions' will go to
#* ^Subject:.*questions
#toread                         # $MAILDIR/toread

# Anything that has not been delivered by now will go to $DEFAULT

# After procmail sees the end of the rcfile, it pretends that it sees a
# LOCKFILE=$DEFAULT$LOCKEXT
# Therefore $DEFAULT is always locked.
<Prev in Thread] Current Thread [Next in Thread>