procmail
[Top] [All Lists]

Backing up mail

1999-11-21 12:23:46
Hi,

I wanted to create a recipe that would backup incoming mail according to
the following two parametters:

1) If it's under 500000 bytes, then backup the whole message.

2) If it's over 500000 bytes, then only backup the header.

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

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

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.

Thanks!



: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 }


-- 
Brock Rozen                                              
brozen(_at_)torah(_dot_)org
Director of Technical Services                             (410) 602-1350
Project Genesis                                     http://www.torah.org/ 


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