Hi!
Thanks for your suggestion... but I thought for Maildir format, there
are subdirectories like Maildir/cur Maildir/new and Maildir/tmp ?
Cos the last time I tried, if the receipent doesn't have a Maildir in
his home directory and I specified DEFAULT=$MAILDIR/Maildir/ , procmail
will auto create the above directory structures for the user. But if I
were to specify DEFAULT=$MAILDIR/Maildir/new/. , and if the directory
doesn't exist, it will bounce back the email to the sender.
Hmm... on the topic of Maildir, does anyone have any suggestion on what
Maildir compliant POP/IMAP daemon to use? Cos I am currently testing out
UW IMAPd patched to support Maildir and it appears to have some problems
across NFS mounts. Mainly being that the daemon will return back the
contents of the Maildir/cur directory before the Maildir/new/* files are
moved there even thou the files are moved there during the login
session. I'm currently using RedHat Linux 6.2 .
Thanks!
Quoting Collin Park <collin(_at_)cup(_dot_)hp(_dot_)com>:
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