]> granicus.if.org Git - neomutt/commitdiff
Permit list patterns that match the domain name of an address; these
authorThomas Roessler <roessler@does-not-exist.org>
Sun, 4 Jan 2004 10:51:49 +0000 (10:51 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Sun, 4 Jan 2004 10:51:49 +0000 (10:51 +0000)
patterns begin with '@'.  Example:  subscribe @bugs.guug.de matches
all messages sent to the bug tracking system.

hdrline.c

index 7156ecf9eb5156f90d9cacf269c4803d9c3b88e7..d400c7398b8bd0f5da17f204227061757057c872 100644 (file)
--- a/hdrline.c
+++ b/hdrline.c
 
 static int _mutt_is_mail_list (ADDRESS *addr, LIST *p)
 {
+  char *s;
   if (addr->mailbox)
   {
     for (;p; p = p->next)
+    {
       if (mutt_strncasecmp (addr->mailbox, p->data, mutt_strlen (p->data)) == 0)
        return 1;
+      else if (*p->data == '@' && (s = strchr (addr->mailbox, '@')))
+       if (mutt_strncasecmp (s, p->data, mutt_strlen (p->data)) == 0)
+         return 1;
+    }
   }
   return 0;
 }