NeoMutt  2025-12-11-435-g4ac674
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
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?
 
bool mutt_is_subscribed_list (const struct Address *addr)
 Is this the email address of a user-subscribed mailing list?
 

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?

Definition at line 45 of file maillist.c.

46{
48 ASSERT(md);
49
51 return mutt_regexlist_match(&md->mail, buf_string(addr->mailbox));
52 return false;
53}
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
Definition buffer.h:96
@ MODULE_ID_EMAIL
ModuleEmail, Email code
Definition module_api.h:64
bool mutt_regexlist_match(struct RegexList *rl, const char *str)
Does a string match any Regex in the list?
Definition regex.c:200
void * neomutt_get_module_data(struct NeoMutt *n, enum ModuleId id)
Get the private data for a Module.
Definition neomutt.c:585
#define ASSERT(COND)
Definition signal2.h:59
struct Buffer * mailbox
Mailbox and host address.
Definition address.h:37
Email private Module data.
Definition module_data.h:32
struct RegexList unmail
Regexes to exclude false matches in mail.
Definition module_data.h:46
struct RegexList mail
Regexes to match mailing lists.
Definition module_data.h:38
Container for Accounts, Notifications.
Definition neomutt.h:41
+ 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?

Definition at line 60 of file maillist.c.

61{
63 ASSERT(md);
64
65 if (!mutt_regexlist_match(&md->unmail, buf_string(addr->mailbox)) &&
67 {
69 }
70 return false;
71}
struct RegexList unsubscribed
Regexes to exclude false matches in subscribed.
Definition module_data.h:47
struct RegexList subscribed
Regexes to match subscribed mailing lists.
Definition module_data.h:42
+ Here is the call graph for this function:
+ Here is the caller graph for this function: