X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=mymail.git;a=blobdiff_plain;f=mymail.c;h=6fa18140c17872fb422026bbea7a120df621f085;hp=21425a5f896c85d1c22f17715bdef0bb66252489;hb=406c3891838fc77131dbbbd29423b61259cd789d;hpb=7766227c183e8c2c328f0330ff1e2615cbaee1fa diff --git a/mymail.c b/mymail.c index 21425a5..6fa1814 100644 --- a/mymail.c +++ b/mymail.c @@ -21,11 +21,13 @@ /* - This command is a dumb mail indexer. It can either (1) scan - directories containing mbox files, and create a db file containing - for each mail a list of fields computed from the header, or (2) - read such a db file and get all the mails matching regexp-defined - conditions on the fields, to create a resulting mbox file. + mymail is a simple mail indexer. It can: + + (1) scan mbox files, and create a db file containing for each mail a + list of fields computed from its header. + + (2) read such a db file, gets all the mails matching regexp-defined + conditions on the fields, and generates a resulting mbox file. It is low-tech, simple, light and fast. @@ -84,6 +86,8 @@ enum { ID_PARTICIPANT, ID_BODY, ID_TIME_INTERVAL, + ID_MAIL_ID, + ID_REFERENCE_ID, MAX_ID }; @@ -96,7 +100,9 @@ static char *field_keys[] = { "date", "part", "body", - "interval" + "interval", + "mailid", + "references" }; /********************************************************************/ @@ -153,6 +159,20 @@ static struct parsable_field fields_to_parse[] = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, + { + ID_MAIL_ID, + REG_ICASE, + "^message-id: ", + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } + }, + + { + ID_REFERENCE_ID, + REG_ICASE, + "^\\(in-reply-to\\|references\\): ", + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } + }, + }; /********************************************************************/