M
mw
I have several approx 22,000 emails from various mailing lists (Maildir
format) in a directory that I wish to sort and move to another directory
based on the date field in the header.
ie: date in email header
Date: 26 Apr 2003 05:53:41 -0000
ie:
Date: Sat, 28 May 2003 21:44:27 -0400
Basically I would a script that would move all emails with the word Apr
in the email date header to a directory called April. All emails with
the word May in the email date header to be moved to the May directory
and so on...
I have tried doing it with MUA filtering, however it is painfully
slow....and my knowledge of grep and bash/perl scripting is at best
painfully weak. I have googled/played with this for hours, however I
still cannot get a functional script of any sort to work.
I would appreciate any advice or pointers.
Regards,
Mark
format) in a directory that I wish to sort and move to another directory
based on the date field in the header.
ie: date in email header
Date: 26 Apr 2003 05:53:41 -0000
ie:
Date: Sat, 28 May 2003 21:44:27 -0400
Basically I would a script that would move all emails with the word Apr
in the email date header to a directory called April. All emails with
the word May in the email date header to be moved to the May directory
and so on...
I have tried doing it with MUA filtering, however it is painfully
slow....and my knowledge of grep and bash/perl scripting is at best
painfully weak. I have googled/played with this for hours, however I
still cannot get a functional script of any sort to work.
I would appreciate any advice or pointers.
Regards,
Mark