thanks Zoki

I wasn't confusing things, I probably just didn't write the question well
(I think I had a bit of a headache at the time...)

I was saying that I could get my email resorted into different mailboxes,
but I couldn't sort have them sorted by date in the mailboxes. I didn't
want my mail program to be sorting them. I wanted it sorted in the
mailbox.

I ended up writing a perl script to sort all the email in a mailbox by
date.

thanks for your help anyway.

On Wed, 28 Jun 2000, Zoki wrote:
> On Wed, 28 Jun 2000, Chris Dowling wrote:
> 
> <snip>
> 
> ->I've just set up a new set of procmail recipies, and want to have all my
> ->mail resorted according to these rules.
> ->
> ->I know I can simply do
> ->    formail -s procmail < mailbox
> ->
> ->but I have many mailboxes, and one of the things I want to keep intact is
> ->the order (ie: date) that everything arrived.
> ->
> ->one idea I had was to get all the mailboxes in one file, then somehow sort
> ->that file in order of date arival.
> 
> 
> *** I'm afraid you're mixing up a few things. If you want to sort on date,
> go to your mail agent and sort it, if you want specific filtering rules
> like puting mail from [EMAIL PROTECTED] in $HOME/mail/totos_mail then you
> put a filtering rule in $HOME/.procmailrc and you use the script which
> follows. It reads .procmailrc, and filters your mailbox. Make sure the
> destinations exist and don't do it while reading the mail in the mailbox
> you're filtering!
> 
> ## START ##
> 
> #!/bin/bash
> 
> ORGMAIL=/var/spool/mail/$LOGNAME
> 
> if cd $HOME &&
>       test -s $ORGMAIL &&
>       lockfile -r 0 -l 1024 /tmp/.newmail.lock 2>/dev/null
> then
>       trap "rm -f /tmp/.newmail.lock" 1 2 3 13 15
>       umask 077
>       lockfile -l 1024 -ml
>       cat $ORGMAIL >> /tmp/.newmail &&
>       cat /dev/null > $ORGMAIL
>       lockfile -mu
>       formail -s procmail < /tmp/.newmail &&
>       rm -f /tmp/.newmail
>       rm -f /tmp/.newmail.lock
> fi
> exit 0
> 
>       ## END ##
> 
> Cheers!
>    _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/
>   _/ Zoran GRBIC       _/  Linux user & advocate  _/
>  _/ UNIX Sys Analyst  _/  Both Micro$oft's clean _/
> _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/
> Mailed with Linux & Pine...
> 
> 
> -- 
> To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
> as the Subject.
> 


Chris Dowling.
[EMAIL PROTECTED]

A bus station is where a bus stops.
A train station is where a train stops.
On my desk, I have a work station......

O-



-- 
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.

Reply via email to