procmail
[Top] [All Lists]

Re: Folder: bounced

2004-12-14 05:57:31
On Mon, Dec 13, 2004 at 09:55:36PM +1100, Adam Bogacki wrote:

I've incorporated Dman's suggestion about a DEFAULT .Inbox 
and commented out the PATH (that's new surely ?).

After reviewing your messages, though, I'm not entirely
convinced you followed me completely on that point.  I'll
touch on it again below.  Meanwhile, what's surely new?

That PATH shouldn't be set in most cases?  No, that's not
new.  Here is a note from Phillip Guenther, procmail's
nominal current code maintainer, from 2002:

http://www.xray.mpe.mpg.de/mailing-lists/procmail/2002-09/msg00392.html

The subject is also addressed on Nancy McGough's procmail QuickStart
pages.  Look for "path" on those pages at
http://www.ii.com/internet/robots/procmail/qs/ .

That is probably not your problem, as I said earlier, though.  It's just
a stylistic point and something to keep you out of trouble in general.
The point is that procmail should normally be compiled with the
right path.  If it's not, either something is wrong or you have
a very unusual one-off situation.


I attach a longer segment of procmail.log 
in order to diagnose why procmail is not filtering.

I don't know why but this procmail.log is two days old
and uses VERBOSE=off while .promailrc has had VERBOSE=on for
some time. It could be the output of /etc/procmail, but it's where
/home/adam/.procmailrc would put it.

Well, if you're not sure if it's the right log, how can we use it
to help you?  And, really, we need *verbose* logs to see anything
useful.  However, the snippet you have below is from a verbose log.


My /home/adam/procmail.log .................

   procmail: Assigning "LOGABSTRACT=all"
   procmail: Assigning "DROPPRIVS=yes"
   procmail: Assuming identity of the recipient, VERBOSE=off
   procmail: Assigning "FORMAIL=/usr/bin/formail"
   procmail: Assigning "SENDMAIL=/usr/sbin/sendmail"
   procmail: Locking "msgid.lock"
   procmail: Executing "/usr/bin/formail,-D,8192,msgid.cache"
   procmail: Non-zero exitcode (1) from "/usr/bin/formail"

Meaning, I believe, the Message-ID wasn't in the duplicates cache.
So that would be normal for non-dupes.


   procmail: Assigning "LASTFOLDER=/usr/bin/formail -D 8192 msgid.cache"
   procmail: Unlocking "msgid.lock"
   procmail: Assigning "LASTFOLDER=backup"
   procmail: Opening "backup"
   procmail: Acquiring kernel-lock
   From root(_at_)paradise(_dot_)net(_dot_)nz  Sat Dec 11 14:57:42 2004
    Subject: Anacron job 'cron.daily' on Tux
      Folder: backup
      procmail: Executing " cd backup && rm -f dummy 'ls -t msg.* | sed
      -e 1,200d'"
      /bin/bash: line 0: cd: backup: Not a directory


Well, that looks to me to be a problem.  You???!


      procmail: Assigning "LASTFOLDER= cd backup && rm -f dummy 'ls -t
      msg.* | sed -e 1,200d'"
      From root(_at_)paradise(_dot_)net(_dot_)nz  Sat Dec 11 14:57:42 2004
       Subject: Anacron job 'cron.daily' on Tux
         Folder:  cd backup && rm -f dummy 'ls -t msg.* | sed -e 1,200d'
       1368
       procmail: Match on
       "(^(((Resent-)?(From|Sender)|X-Envelope-From):|>?From
       
)([^>]*[^((_dot_)%(_at_)a-z0-9])?(Post(ma(st(er)?|n)|office)|(send)?Mail(er)?|daemon|mmdf|n?uucp|ops|r(esponse|oot)|(bbs\.)?smtp(error)?|s(erv(ices?|er)|ystem)|A(dmin(istrator)?|MMGR))(([^).!:a-z0-9][-_a-z0-9]*)?[%@>
       ][^<)]*(\(.*\).*)?)?$([^>]|$))"
       procmail: Locking "bounced.lock"
       procmail: Assigning "LASTFOLDER=bounced"
       procmail: Opening "bounced"
       procmail: Acquiring kernel-lock
       procmail: Unlocking "bounced.lock"
       procmail: Notified comsat:
       "adam(_at_)241260:/home/adam/Maildir/bounced"
       From root(_at_)paradise(_dot_)net(_dot_)nz  Sat Dec 11 14:57:42 2004
        Subject: Anacron job 'cron.daily' on Tux
          Folder: bounced                                                     
   1368


My impression is that procmail can't find your backup directory and therefore
reacts to the failed delivery.  My impression may or may not be entirely
correct.



My .procmailrc .. with a few '<snips>' ....

VERBOSE=on
LINEBUF=4096
#PATH=$HOME/bin:/usr/local/bin:/usr/bin:/bin
MAILDIR=$HOME/Maildir #make sure it exists
set DEFAULT="`cd .`/.Inbox/"

That is total nonsense and means you misunderstood my earlier comment.
That is not procmail syntax.  It is (t)?csh-shell syntax.  I used it
as an example or analogy of what your other nonsense syntax was doing.
I did not mean for you to emulate it or, worse, import it into procmail!


#DEFAULT=$MAILDIR/.Inbox/


Look: all you really want is -- and this was my original point last go-round --
this:

   DEFAULT = "$HOME/Maildir/.Inbox/"


I was trying to communicate to you earlier that the procmail invocation,
"MAILDIR", is not simply a static assignment but is a process.  When you
type "MAILDIR = foo" in procmail and the rcfile gets executed, procmail
*changes its working directory* to foo (if it can find it).  This is
different from setting static environment or other variables.  For
example, if I say "BAR = blah", well, "BAR" is no special or magical
word to procmail.  What happens is simply an assignment, which you
probably had imagined to be the result.  But "MAILDIR" on the other hand
is a magical word to procmail.  When it sees it, it *acts* (or tries
to).  That is what I meant in the previous post when I said setting
it is analogous to, in a shell, typing "chdir wherever".

My point, in summary, was that you should set DEFAULT to something,
but not to a process.

   DEFAULT = "$HOME/Maildir/.Inbox/"

puts you in the same place as

  DEFAULT = "`cd .`/Maildir/.Inbox/"

you will concur, right?[1]  But the second one is silly.  It's like,
instead of going from your kitchen to your garage through the
door that lies between them, you instead went out your front door,
around the block, and into the garage from the outside.  You
could do that.  You'd still be in your garage at the end.  But
why would you want to do it that way?

[1] This assumes you know that a dot in the shell means the current dir.




LOGFILE=$HOME/procmail.log
LOGABSTRACT=all
<snip>
FORMAIL=/usr/bin/formail
SENDMAIL=/usr/sbin/sendmail
<snip>
:0 Whc: msgid.lock
| $FORMAIL -D 8192 msgid.cache
<snip>
:0 c
backup

Okay, this is your problem. "backup" seems to be an mbox-style folder
(flat file), and not a directory.  (And you don't have a lockfile,
though you should.)  So you are putting a copy in this folder,
and then you are continuing and trying to clone *yet another* copy
below in the action that is failing.


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

You saw above in the verbose log that procmail can't cd to backup,
because it can't find any such directory.  On the other hand,
the first save to backup (but without any lockfile!) happened
without "comment" by procmail -- because (my inference from
the data) it exists as a flat file.



My .muttrc includes ...

set mbox_type=Maildir
set mbox=~/Maildir/.Inbox/
set folder=~/Maildir/
set record="~/Maildir/.Sent/"

Not that this matters, really, but you are not being consistent
with your quotation marks.  Either put them in all the statements
or take them all out.  Doing it part-way offends one's
sensibilities as a silly inconsistency.  :)

set spoolfile=~/Maildir/

-- 
dman

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>