procmail
[Top] [All Lists]

Re: LASTFOLDER blues

2007-03-24 11:15:17
On Sat, Mar 24, 2007 at 06:17:58PM +0100, Axel Thimm wrote:

By the way, it's really annoying that you're sending with
MIME encoding to this text-based list.  Please don't do that.


On Sat, Mar 24, 2007 at 03:42:45PM +0100, Dallman Ross wrote:

Well, I don't know of any documentation that implies that
LASTFOLDER is equivalent to a zero exit status.

The documentations says "This variable is assigned to by
procmail whenever it is delivering to a folder or program.  It
always contains the name of the last file (or program) procmail
delivered to.  If the last delivery was to several directory
folders together then $LASTFOLDER will contain the hardlinked
filenames as a space separated list."

The definitely wrong part is "It always contains the name of the
last file [...] procmail delivered to" implying that LASTFOLDER
points to successful deliveries.


Well, the e flag does work.  If you're having file system trouble,
that would seem to be a useful thing to do.

  :0
  * conditions
  {
    :0:
    badpermshere

    :0 e:
    errorfolder
  }

Anybody see a cleaner way?

That was what I meant with "Do I need to pair every delivery
action with an :0 e action marking success or failure?". I hope
there is a better non-hacky way to do that.

(I think you should find out what's going wrong with your
filesystem.)

Of course, but once in a decade the fs is allowed to have
troubles like a bad disk or fs full. procmails does look a bit
fragile in this light, especially I one now has to manually check
all recipes for success or failure like above. :/

I suppose I agree that it would be nice if things were less
fragile.  Maybe someone else has thoughts about that to share.
But meanwhile, set up a deliver rcfile that contains the
error checking.  Then call it instead of manually coding in
the check each time.


----------------- start delivery.rc -----------------


  :0:
  ${MYDELIVERY:-${DEFAULT:-$ORGMAIL}}

  :0 e:
  $FAILSAFE

------------------ end delivery.rc ------------------


Main rc:

  :0
  * conditions
  {
     MYDELIVERY = $HOME/Mail/example
     INCLUDERC = delivery.rc
  }



Or just set the deliver folder there and save the INCLUDERC for
the end of the section.

Dallman

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