-/*
- * Try to extract a numeric message ID
- */
-long extract_msg_id(char *id_string) {
- long msgid = 0L;
- int i, j;
- char buf[256];
-
- strncpy(buf, id_string, sizeof buf);
- id_string[255] = 0;
-
- for (i=0; i<strlen(buf); ++i) {
- if (buf[i]=='<') {
- strcpy(buf, &buf[i]);
- for (j=0; j<strlen(buf); ++j)
- if (buf[j]=='>') buf[j]=0;
- }
- }
-
- msgid = atol(buf);
- if (msgid) return(msgid);
-
- for (i=0; i<strlen(buf); ++i) {
- if (!isdigit(buf[i])) {
- strcpy(&buf[i], &buf[i+1]);
- i = 0;
- }
- }
-
- msgid = atol(buf);
- return(msgid);
-}
-
-
/*
* pipe message through netproc
*/
now = conv_date(&buf[6]);
else if (!strncasecmp(buf, "From: ", 6))
strcpy(from, &buf[6]);
- else if (!strncasecmp(buf, "Message-ID: ", 12))
- message_id = extract_msg_id(&buf[12]);
else if (!strncasecmp(buf, "Content-type: ", 14))
strcpy(content_type, &buf[14]);
else if (!strncasecmp(buf, "From ", 5)) { /* ignore */