On Wed, Dec 02, 2009 at 12:01:38PM +0100, jema...@gnu.org wrote:
> 
>    I've moved to a "0 size mailbox" approach to handling my email
>    (which works well with org and, in fact, requires org to work at
>    all really) so this is not an issue for me.
> 
> That sounds like an interesting approach.  Could you elaborate on
> that? Yes, I also have problems with my huge longstanding mailboxes
> :(

Since I use maildir its fairly easy to perform mass operations on
email.

I have a shell script which nightly moved messages that are over two
weeks old and aren't "flagged" to an archive folder, which keeps my
normal mailbox access quick. Typically less than 300 messages in any
incoming folder, and archives grow forever.

Incoming folder:  ~/Mail/.Domain.com/Inbox/{cur,tmp,new}
Archive  folder:  ~/Mail/.Archive.Domain.com/Inbox/{cur,tmp,new}

# Any directory with an Archive subdir will be autoarchived.
# /home/rladams/Maildir/.Adamsinfoserv_com.Inbox is archived to 
# /home/rladams/Maildir/.Archive.Adamsinfoserv_com.Inbox

echo "********** $0 running at `date`"

find /home/rladams/Maildir -type d -name .Archive.\* | \
    while read MyArchive 
do 
        
        SRC=`echo $MyArchive | sed 's/\.Archive//g'`
        
        
  # If file is older than 14 days, and isn't flagged, move it.
        
        [ -d ${SRC}/cur ] && {
                echo "********** Archiving $SRC to $MyArchive."
                find ${SRC}/cur -type f -mtime +14 ! -name '*,*F*' | \
                        grep '^/home/rladams/Maildir' | \
                        while read X 
                do 
                        echo     mv $X ${MyArchive}/cur
                        mv $X ${MyArchive}/cur
                done
        }
done



------------------------------------------------------------------
Russell Adams                            rlad...@adamsinfoserv.com

PGP Key ID:     0x1160DCB3           http://www.adamsinfoserv.com/

Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3


_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to