procmail
[Top] [All Lists]

Re: Backing up mail

1999-11-21 12:48:51
Goodness, Brock, you don't need all those layers of nesting.  Also, you
didn't take care of mail of exactly 500000 bytes.

| I wanted to create a recipe that would backup incoming mail according to
| the following two parameters:
| 
| 1) If it's under 500000 bytes, then backup the whole message.
| 
| 2) If it's over 500000 bytes, then only backup the header.

What if it's exactly 500000 bytes?  I'll continue as if #1 read "if it's
500000 bytes or under."

| 4) In any case, the mail should continue through to the regular filters,
| and possibly my INBOX.

OK.

| 3) If we run out of disk space, or any other error, give it back to
| sendmail.

Can't help you there.

| Can you please check the following recipe and let me know how it matches
| up? Also, if I'm wasting any processing time and there's a more efficient
| way of doing it.


| :0c
| * ! ^X-Backup: Disabled
|       {
|       :0W
|       * < 500000
|               {
|               :0:$BACKDIR/lock.mail.backup.personal
|               $BACKPFILE
|               }
| 
|       :0W
|       * > 500000
|               {
|               :0h:$BACKDIR/lock.mail.backup.personal
|               $BACKPFILE
|               }
|       }
| 
| :0e
| { EXITCODE = 75 HOST }


 :0
 * !^X-Backup: Disabled
 {
  :0Wc: # $BACKPFILE$LOCKEXT will do just fine as the local lockfile
  * < 500001
  $BACKPFILE
  :0EWhc:
  $BACKPFILE

  :0
  { EXITCODE = 75  HOST }
 }

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