]> granicus.if.org Git - mutt/commitdiff
detect pipermail-style obscured return path in mbox From lines
authorMichael Elkins <me@sigpipe.org>
Tue, 15 Jan 2013 04:39:15 +0000 (20:39 -0800)
committerMichael Elkins <me@sigpipe.org>
Tue, 15 Jan 2013 04:39:15 +0000 (20:39 -0800)
see #1200

from.c

diff --git a/from.c b/from.c
index f157be64e306623bc8841e94b464e0f9e6806dcd..e154b57d74c8279aaa48a91c768fb9acc6962679 100644 (file)
--- a/from.c
+++ b/from.c
@@ -96,8 +96,19 @@ int is_from (const char *s, char *path, size_t pathlen, time_t *tp)
        q = !q;
       }
     }
-    
+
     if (q || !*p) return 0;
+
+    /* pipermail archives have the return_path obscured such as "me at mutt.org" */
+    if (ascii_strncasecmp(p, " at ", 4) == 0)
+    {
+      p = strchr(p + 4, ' ');
+      if (!p)
+      {
+       dprint (1, (debugfile, "is_from(): error parsing what appears to be a pipermail-style obscured return_path: %s\n", s));
+       return 0;
+      }
+    }
     
     if (path)
     {