procmail
[Top] [All Lists]

re: filtering duplicates

2001-08-18 01:11:45
At 03:18 AM 8/17/01 -0500, you wrote:
Bob Holtzman <holtzm(_at_)illusions(_dot_)com> writes:
No replys to the first post. Let's try it again....anyone?

I'm having a problem filtering duplicates with procmail-3.13.1-2. The
recipe is

             :0 Whc: msgid.lock
             | formail -D 8192 msgid.cache

             :0 a:
             /home/holtzm/mail/duplicates

That's not your entire rcfile.  The source of the problem is before
these lines.


This resides in $HOME/Procmail/duplicates.rc which is called from
$Home/.procmailrc via PMDIR=$HOME/Procmail and
INCLUDERC=$PMDIR/duplicates.rc. This is the first fiter called.

the log file with verbose turned on is

[holtzm(_at_)localhost holtzm]$ mailstat

That's not the logfile.  That's the output of mailstat, which while
generated from the logfile is formatted quite different.  For one: the
entries are sorted by number of occurences so you lose the connection
between error messages.


You're right of course. I thought mailstat and typed log file.


There are still useful bits that we can pick out:

     0       6  ## /bin/sh: /home/holtzm/mail/backup: Not a directory

That doesn't appear to be related to the problem you reported, but I
would guess that you have the following two recipes in your rcfile:

             :0 c
             backup

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

The error message indicates that you didn't create that directory.
You'll find it's a file now.  Just remove the file and create it as
a directory.

Right. It's a file that IIRC was created the first time I ran that
filter. The backups are written to it successfully, so I ignored it.




     0       6  ## formail: Couldn't open "msgid.cache"

formail is trying to open the cache for reading and writing and failing.
If the file doesn't exist and formail can't create it, you'll get this
message.  You'll also get that message if the file permissions don't
allow both read and write by you.

It exists. The duplicates filter worked at one time and the file was
created then. At some point it stopped working.

[holtzm(_at_)localhost holtzm]$ ls -l msgid.cache
-rw-rw-rw-   1 holtzm   holtzm          0 Sep 10  2000 msgid.cache



...
     0       6  ## procmail: Assigning "LASTFOLDER= cd 
/home/holtzm/mail/backup && rm -f dummy `ls -t msg.* | sed -e 1,32d`"
     0       6  ## procmail: Assigning "LASTFOLDER=/home/holtzm/mail/backup"

Ah, there's confirmation of my guess above.


...
     0       6  ## procmail: Assigning "MAILDIR=/var/spool/mail"

Here's the problem.  You've told procmail to change directories into
/var/spool/mail, a directory that you don't have write access to.
Was that what you intended to do, or did you include that assignment in
your rcfile for a different reason?

[holtzm(_at_)localhost holtzm]$ ls -l /var/spool/mail
drwxrwxr-x   3 root     mail         1024 Aug 14 18:04 mail


In general, a user's rcfile should not set MAILDIR to any directory
outside of their home directory.  Below their home directory is fine, but
elsewhere usually indicates a misunderstanding of the MAILDIR variable.
(In particular, it has *nothing* to do with qmail's maildir mail folder
format.  Procmail's use of the MAILDIR variable predates qmail's use of
it by at least four years.)

That did it. when I commented out the MAILDIR=/var/spool/mail  the
duplicates filter started working. I never would have figured that
out for myself as I used an example as a guide when I set up the
.procmailrc file and it had the MAILDIR= line.

Many thanks for the help.

-- 
Bob Holtzman
"If you think you're getting free lunch
 ......check the price of the beer!"





_______________________________________________
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>