char tmp[512];
char *cp;
int inheader = 1;
+ int readnewline = 0;
int newmail = 0;
char from_[HDR_LEN] = "";
else if (strncasecmp(buf, "X-Priority: 1", 13) == 0 && buf[13] == '\0')
priority = 1;
}
- } else if (strncasecmp(buf, "From ", 5) == 0) {
+ } else if (strlen(buf) == 0) {
+ readnewline = 1;
+ } else if (readnewline && strncasecmp(buf, "From ", 5) == 0) {
inheader = 1;
+ readnewline = 0;
stringcopy(from_, buf+5, sizeof(from_));
- }
+ } else
+ readnewline = 0;
}
fclose(f);