procmail
[Top] [All Lists]

If your folders are plain files ...

1996-08-26 22:16:51
Athar Shiraz Siddiqui wrote,

| I  came across the manpages with the following info :

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

|           :0 c
|           backup
| 
|           :0 ic
|           | cd backup && rm -f dummy `ls -t msg.* | sed -e 1,32d`           

| The above method ...  works well on a "Directory" .... BUT ... I use
| .... pine ...  and it uses files to represent folders ...

| Therefore when 
| I try this , it gives an error .. saying that the directory inbox ( 
| in place of backup in above recipe ) does not exist. Is there a solution 
| here ? will this work in elm ?

Even if you use an MUA like Pine or Elm, both of which expect folders to be
plain files, your backup area can still be a directory where each message is
in a separate file.

Use a directory (where backup copies of messages will be kept as individual
files) for this backup routine, and then later in your .procmailrc save
messages to plain folders that Pine will read.

Nonetheless, the following topics have been discussed before and surely are
in the best_of_procmail archives:

1. Keeping a maximum of X messages in a (plain file, non-directory) folder
and automatically deleting the oldest message when the X+1st arrives so that
there never are more than X messages there; and

2. Checking the byte count of a folder before saving there and stashing the
incoming message somewhere else (or returning it) if the folder is too big or
if saving the incoming message there would make it too big.

These are a couple wheels we've already invented.

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