procmail
[Top] [All Lists]

Re: Repost: filtering duplicates

2001-08-17 01:10:24
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.

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.

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`

That's quoted from the procamilex(5) manpage which says, immeadiately
before those recipes:

                                            <...> In order for it
       to work as intended, you have to create a directory  named
       `backup' in $MAILDIR prior to inserting these two recipes.

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.



     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.


...
     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?

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.)


...
     0       1  ## procmail: Error while writing to "_siAQ.localhos"
     0       1  ## procmail: Error while writing to "_xiAQ.localhos"

These are from procmail's attempts to create the msgid.lock file.

None of the other log entries seemed particularly relevant.


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>