NeoMutt  2021-10-29-43-g6b8931
Teaching an old dog new tricks
DOXYGEN
Address Predicate API

Prototype for an Address Test function. More...

Functions

bool mutt_is_mail_list (const struct Address *addr)
 Is this the email address of a mailing list? - Implements addr_predicate_t -. More...
 
bool mutt_is_subscribed_list (const struct Address *addr)
 Is this the email address of a user-subscribed mailing list? - Implements addr_predicate_t -. More...
 

Detailed Description

Prototype for an Address Test function.

Parameters
aAddress to test
Return values
trueAddress matches the test

Function Documentation

◆ mutt_is_mail_list()

bool mutt_is_mail_list ( const struct Address addr)

Is this the email address of a mailing list? - Implements addr_predicate_t -.

Parameters
addrAddress to test
Return values
trueIt's a mailing list

Definition at line 44 of file maillist.c.

45 {
47  return mutt_regexlist_match(&MailLists, addr->mailbox);
48  return false;
49 }
struct RegexList UnMailLists
List of regexes to blacklist false matches in MailLists.
Definition: globals.c:42
struct RegexList MailLists
List of regexes to match mailing lists.
Definition: globals.c:41
bool mutt_regexlist_match(struct RegexList *rl, const char *str)
Does a string match any Regex in the list?
Definition: regex.c:194
char * mailbox
Mailbox and host address.
Definition: address.h:38
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mutt_is_subscribed_list()

bool mutt_is_subscribed_list ( const struct Address addr)

Is this the email address of a user-subscribed mailing list? - Implements addr_predicate_t -.

Parameters
addrAddress to test
Return values
trueIt's a subscribed mailing list

Definition at line 56 of file maillist.c.

57 {
60  {
62  }
63  return false;
64 }
struct RegexList SubscribedLists
List of regexes to match subscribed mailing lists.
Definition: globals.c:43
struct RegexList UnSubscribedLists
List of regexes to blacklist false matches in SubscribedLists.
Definition: globals.c:40
+ Here is the call graph for this function:
+ Here is the caller graph for this function: