procmail
[Top] [All Lists]

Re: The Safe backup in procmailex

1997-05-29 10:59:00
On Thu, 29 May 1997 14:58:45 +0000 (GMT), "Matthew G. Saroff" 
<msaroff(_at_)pca(_dot_)net> said:

The safe backup in the procmailex man page is:

   :0 c
   backup

That example bugs me.  It claims to be safe, but it isn't.  I'd suggest
adding something like

    # If the save to backup failed, requeue.
    :0 e
    { EXITCODE = 75 HOST }

after the above recipe.

*** man/procmailex.man.~1~      Fri Dec 20 22:28:18 1996
--- man/procmailex.man  Thu May 29 13:14:49 1997
***************
*** 68,80 ****
  If you are fairly new to procmail and plan to experiment a little bit
  it often helps to have a
  .I safety net
! of some sort.  Inserting the following two recipes above all other recipes
! will make sure that of all arriving mail always the last 32 messages will
! be preserved.  In order for it to work as intended, you have to create
! a directory named `backup' in $MAILDIR prior to inserting these two recipes.
  .Sx 5
  :0 @CONTINUE@
  backup
  
  :0 @IGNORE_WRITERR@@CONTINUE@
  | cd backup && rm \-f dummy `ls \-t msg.* | sed \-e 1,32d`
--- 68,86 ----
  If you are fairly new to procmail and plan to experiment a little bit
  it often helps to have a
  .I safety net
! of some sort.  Inserting the following three recipes above all other
! recipes will make sure that of all arriving mail always the last 32
! messages will be preserved (if a backup copy of the message being
! delivered can't be created the message will be returned to the mail
! queue for another try later).  In order for it to work as intended, you
! have to create a directory named `backup' in $MAILDIR prior to inserting
! these recipes.
  .Sx 5
  :0 @CONTINUE@
  backup
+ 
+ :0 @ERROR_DO@
+ { EXITCODE = 75 HOST }
  
  :0 @IGNORE_WRITERR@@CONTINUE@
  | cd backup && rm \-f dummy `ls \-t msg.* | sed \-e 1,32d`

-- 
Roderick Schertler
roderick(_at_)argon(_dot_)org

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