procmail
[Top] [All Lists]

Re: Procmail and Maildir/

2000-08-14 09:34:07
Thanks for your info. But in this case,  my emaile will no longer be 
sorted by the date/time that the emailed is delivered to my server cos 
they will all have _ and a chunk fo random numbers/alphabets. Is there 
anyway to change the behaviour?

You could change your $DEFAULT from

    DEFAULT=$MAILDIR/Maildir/

to

    DEFAULT=$MAILDIR/Maildir/.

which will cause procmail's behavior to change as:

                      specified directory.  If the directory name
       ends in "/.", then this directory is presumed to be an  MH
       folder;  i.e.  procmail  will use the next number it finds
       available.  When procmail is  delivering...

Mail will then appear in the order 1,2,3,4,5,6,7,8,9,10,11,12...

If you just say "ls" inside that directory then 10 will come before 2
(not in order) but if you say

    ls | sort -n

then mail will appear in order of first to last.  "ls | sort -nr" will 
give you the most recent mail first, and so on.

Alternately, you could do this:

    $ cd $MAILDIR/Maildir/
    $ touch 100000

then messages will appear in the order 100001, 100002, 100003... and
so 100002 will appear before 100010 and you'll be all set.

Of course, when you receive your 900000th message, the next number
will be 1000000 which will appear before message 999999 :^<

hth
-- 
Neither I nor my employer will accept any liability for any problems
or consequential loss caused by relying on this information.
Collin Park                         Not a statement of my employer.

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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