mhonarc-dev

Re: Requeueing messages processed by mharc?

2003-01-08 22:59:51
     # CHANGE: tests if directory exists; saves a system call
     :0 Wic
     * ? test ! -d $MBOXROOT/mhonarc-users
     `mkdir -m 755 -p $MBOXROOT/mhonarc-users`

But isn't the call to 'test' a system call or does procmail handle
it specially.  If not, calling mkdir always uses a single system
call while your method uses one or two system calls.

Boy, we can't put anything past you.  :)

Traditionally, 'test' has been a less expensive call than 'mkdir', so
you only have an expensive call when both need to be run.  I guess the
comment should have been

   # CHANGE: tests if directory exists; potentially less overhead

     # CHANGE: skip if MESGDATE_ already set; saves a fork
     # CHANGE: only send headers to extract-mesg-date; cuts down on memory
     :0 Wih
     * MESGDATE_ ?? ^^^^
     MESGDATE_=| 
/mnt/WWW/customers/mhonarc.org/htdocs/archive/bin/extract-me
sg-date -fmt '%Y-%m'

I like this.  The ^^^^ notation is weird though.  Is that supposed to
be a regex?

Yes.  The first ^^ anchors it at the very beginning of the thing being
matched, and the second ^^ anchors it at the very end.  The benefit of
using ^^ is that it spans newlines, so I got in the habit of using it.

There's a better explanation at

  http://mirror.ncsa.uiuc.edu/procmail/ssjaaa/pm-tips-body.html#explaning___and

(Yes, I changed some of the other stuff around for optimization :)  But 
the issue that I'm most interested in is the last block which places the
message back into the message queue if delivery failed.  

Unfortunately, this will not work.  The message-id cache will cause
the message to be quietly dropped when delivered back to the archive
account.  I.e.  There is an initial formail rule that checks the
message-id cache, and if the id exists, the message is quietly dropped.

Ahh.  I suppose a way around that is to check if the message-id is in
the cache before adding it, and only adding it after successful delivery.

Something really screwing has to happen for an delivery error to occur,
but of course, anything can happen (like out-of-disk space).  I'm unsure
that requeuing (ignore the message-id cache issue) is the best solution,
with one reason due to the existence of different MTAs.

OK.  Just thought I'd ask.  :)

Chris

---------------------------------------------------------------------
To sign-off this list, send email to majordomo(_at_)mhonarc(_dot_)org with the
message text UNSUBSCRIBE MHONARC-DEV

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