On Thu, 31 Jul 2003, Peter C. Norton wrote: > ( echo "#!/bin/bash" > [ "x" = "x$1" ] && exit > echo "touch -d \"\$( egrep '^Date: ' $1 | head -1 | sed 's/^Date: //')\" $1' ) >> > /tmp/timechange.sh > > chmod +x /tmp/timechange.sh > > find /path/to/maildirs -type f | xargs -n 1 /tmp/timechange.sh > > This is untested, and it won't be fast, but if you only need to do it > once then it should work.
<blush> Yikes, that was very easy. I had to modify it a little bit but it did the trick. Thanks very much. Actually, though, it turns out that I asked the wrong question. As far as I can tell, the issue is the actual file names (not file dates) of the messages. The bottom line, it appears, is the default order in which messages are presented by the IMAP server, which I believe is by the order of the file names (same order a standard 'ls' in the maildir would display them). So, I'd need to actually change file names around to get them into order. I'm sure I could just rename them, but obviously the names generated by Courier provide some optimization--I don't know all the details, but I know that the names include the message size and other info (looks like message IDs or something, though I don't find the same strings inside the message itself). So, I don't want to mess all that up. Any *quick* ideas for how to rename the files with the appropriate ID codes (or whatever is included in the names) automatically? As I said, this is not a big deal, and I really don't want to get everybody to do my work for me, especially if it turns out not to be trivial for the experts. If I had to, I could always look at Courier's source to see how it is naming and write my own utility, but again I just thought that in the interest of time somebody else might have a quicker, clever way (usually the case). Thanks a bunch in any case. -- DY ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ courier-users mailing list [EMAIL PROTECTED] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
