X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=imap-send.c;h=1a577a0a094342315bd3f68e8d13ef7f57a22f50;hb=176959d7423988183ffbe1b35fc1de7f786bb596;hp=7107923a39247b5c18ad443dc2309971e44abdb4;hpb=4de113cdf55631ef1f8bf34658fb647509520e8a;p=git.git diff --git a/imap-send.c b/imap-send.c index 7107923a3..1a577a0a0 100644 --- a/imap-send.c +++ b/imap-send.c @@ -230,7 +230,7 @@ enum CAPABILITY { LITERALPLUS, NAMESPACE, STARTTLS, - AUTH_CRAM_MD5, + AUTH_CRAM_MD5 }; static const char *cap_list[] = { @@ -1431,8 +1431,14 @@ static int count_messages(struct msg_data *msg) while (1) { if (!prefixcmp(p, "From ")) { + p = strstr(p+5, "\nFrom: "); + if (!p) break; + p = strstr(p+7, "\nDate: "); + if (!p) break; + p = strstr(p+7, "\nSubject: "); + if (!p) break; + p += 10; count++; - p += 5; } p = strstr(p+5, "\nFrom "); if (!p)