91 struct Tag *tag = NULL;
137 if (!com || (com[0] ==
'\0'))
192 struct Alias *a = NULL;
222 buf_printf(err,
_(
"Warning: Bad IDN '%s' in alias '%s'"), estr, name);
229 struct Alias **ap = NULL;
280 if (*line->
dptr ==
' ')
328 struct Alias **ap = NULL;
345 struct Alias *a = *ap;
364 N_(
"Define an alias (name to email address)"),
365 N_(
"alias [ -group <name> ... ] <key> <address> [,...] [ # <comments> ]"),
366 "configuration.html#alias" },
368 N_(
"Define a list of alternate email addresses for the user"),
369 N_(
"alternates [ -group <name> ... ] <regex> [ <regex> ... ]"),
370 "configuration.html#alternates" },
372 N_(
"Add addresses to an address group"),
373 N_(
"group [ -group <name> ... ] { -rx <regex> ... | -addr <address> ... }"),
374 "configuration.html#addrgroup" },
376 N_(
"Add address to the list of mailing lists"),
377 N_(
"lists [ -group <name> ... ] <regex> [ ... ]"),
378 "configuration.html#lists" },
380 N_(
"Add address to the list of subscribed mailing lists"),
381 N_(
"subscribe [ -group <name> ... ] <regex> [ ... ]"),
382 "configuration.html#lists" },
384 N_(
"Remove an alias definition"),
385 N_(
"unalias { * | <key> ... }"),
386 "configuration.html#alias" },
388 N_(
"Remove addresses from `alternates` list"),
389 N_(
"unalternates { * | <regex> ... }"),
390 "configuration.html#alternates" },
392 N_(
"Remove addresses from an address `group`"),
393 N_(
"ungroup [ -group <name> ... ] { * | -rx <regex> ... | -addr <address> ... }"),
394 "configuration.html#addrgroup" },
396 N_(
"Remove address from the list of mailing lists"),
397 N_(
"unlists { * | <regex> ... }"),
398 "configuration.html#lists" },
400 N_(
"Remove address from the list of subscribed mailing lists"),
401 N_(
"unsubscribe { * | <regex> ... }"),
402 "configuration.html#lists" },
void mutt_addrlist_clear(struct AddressList *al)
Unlink and free all Address in an AddressList.
int mutt_addrlist_parse2(struct AddressList *al, const char *s)
Parse a list of email addresses.
int mutt_addrlist_to_intl(struct AddressList *al, char **err)
Convert an Address list to Punycode.
void grouplist_add_addrlist(struct GroupList *gl, struct AddressList *al)
Add Address list to a GroupList.
void grouplist_destroy(struct GroupList *gl)
Free a GroupList.
void mutt_auto_subscribe(const char *mailto)
Check if user is subscribed to mailing list.
void parse_alias_comments(struct Alias *alias, const char *com)
Parse the alias/query comment field.
void parse_alias_tags(const char *tags, struct TagList *tl)
Parse a comma-separated list of tags.
const struct Command AliasCommands[]
Alias Commands.
void alias_tags_to_buffer(struct TagList *tl, struct Buffer *buf)
Write a comma-separated list of tags to a Buffer.
int parse_grouplist(struct GroupList *gl, struct Buffer *token, struct Buffer *line, struct Buffer *err, struct HashTable *groups)
Parse a group context.
Parse Group/Lists Commands.
Alias private Module data.
void alias_free(struct Alias **ptr)
Free an Alias.
void aliaslist_clear(struct AliasArray *aa)
Empty a List of Aliases.
struct Alias * alias_new(void)
Create a new Alias.
Representation of a single alias to an email address.
NotifyAlias
Alias notification types.
@ NT_ALIAS_ADD
Alias has been added.
@ NT_ALIAS_CHANGE
Alias has been changed.
Parse Alternate Commands.
#define ARRAY_ADD(head, elem)
Add an element at the end of the array.
#define ARRAY_REMOVE(head, elem)
Remove an entry from the array, shifting down the subsequent entries.
#define ARRAY_FOREACH(elem, head)
Iterate over all elements of the array.
int buf_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
size_t buf_addstr_n(struct Buffer *buf, const char *s, size_t len)
Add a string to a Buffer, expanding it if necessary.
void buf_reset(struct Buffer *buf)
Reset an existing Buffer.
size_t buf_addch(struct Buffer *buf, char c)
Add a single character to a Buffer.
size_t buf_addstr(struct Buffer *buf, const char *s)
Add a string to a Buffer.
char * buf_strdup(const struct Buffer *buf)
Copy a Buffer's string.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
@ CF_NONE
No flags are set.
@ CMD_SUBSCRIBE
:subscribe
@ CMD_UNSUBSCRIBE
:unsubscribe
@ CMD_ALTERNATES
:alternates
@ CMD_UNALTERNATES
:unalternates
CommandResult
Error codes for command_t parse functions.
@ MUTT_CMD_SUCCESS
Success: Command worked.
@ MUTT_CMD_ERROR
Error: Can't help the user.
@ MUTT_CMD_WARNING
Warning: Help given to the user.
short cs_subset_number(const struct ConfigSubset *sub, const char *name)
Get a number config item by name.
Convenience wrapper for the config headers.
Convenience wrapper for the core headers.
Structs that make up an email.
bool mutt_parse_mailto(struct Envelope *env, char **body, const char *src)
Parse a mailto:// url.
void mutt_env_free(struct Envelope **ptr)
Free an Envelope.
struct Envelope * mutt_env_new(void)
Create a new Envelope.
enum CommandResult parse_unalias(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
Parse the 'unalias' command - Implements Command::parse() -.
enum CommandResult parse_subscribe(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
Parse the 'subscribe' command - Implements Command::parse() -.
enum CommandResult parse_unlists(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
Parse the 'unlists' command - Implements Command::parse() -.
enum CommandResult parse_alternates(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
Parse the 'alternates' command - Implements Command::parse() -.
enum CommandResult parse_lists(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
Parse the 'lists' command - Implements Command::parse() -.
enum CommandResult parse_group(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
Parse the 'group' and 'ungroup' commands - Implements Command::parse() -.
enum CommandResult parse_unalternates(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
Parse the 'unalternates' command - Implements Command::parse() -.
enum CommandResult parse_unsubscribe(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
Parse the 'unsubscribe' command - Implements Command::parse() -.
enum CommandResult parse_alias(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
Parse the 'alias' command - Implements Command::parse() -.
#define mutt_debug(LEVEL,...)
struct HashElem * mutt_hash_insert(struct HashTable *table, const char *strkey, void *data)
Add a new element to the Hash Table (with string keys)
void * mutt_hash_find(const struct HashTable *table, const char *strkey)
Find the HashElem data in a Hash Table element using a key.
struct HashTable * mutt_hash_new(size_t num_elems, HashFlags flags)
Create a new Hash Table (with string keys)
@ MUTT_HASH_STRCASECMP
use strcasecmp() to compare keys
@ MUTT_HASH_STRDUP_KEYS
make a copy of the keys
@ LL_DEBUG4
Log at debug level 4.
@ LL_DEBUG5
Log at debug level 5.
@ LL_NOTIFY
Log of notifications.
#define FREE(x)
Free memory and set the pointer to NULL.
@ MODULE_ID_ALIAS
ModuleAlias, Alias
Convenience wrapper for the library headers.
bool notify_send(struct Notify *notify, enum NotifyType event_type, int event_subtype, void *event_data)
Send out a notification message.
int mutt_regexlist_add(struct RegexList *rl, const char *str, uint16_t flags, struct Buffer *err)
Compile a regex string and add it to a list.
bool mutt_regexlist_match(struct RegexList *rl, const char *str)
Does a string match any Regex in the list?
struct Slist * slist_parse(const char *str, uint32_t flags)
Parse a list of strings into a list.
bool slist_is_empty(const struct Slist *list)
Is the slist empty?
void slist_free(struct Slist **ptr)
Free an Slist object.
bool mutt_istr_equal(const char *a, const char *b)
Compare two strings, ignoring case.
char * mutt_str_dup(const char *str)
Copy a string, safely.
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
void * neomutt_get_module_data(struct NeoMutt *n, enum ModuleId id)
Get the private data for a Module.
@ NT_ALIAS
Alias has changed, NotifyAlias, EventAlias.
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
regmatch_t * mutt_prex_capture(enum Prex which, const char *str)
Match a precompiled regex against a string.
@ PREX_ALIAS_TAGS
tags:a,b,c
@ PREX_ALIAS_TAGS_MATCH_POST
... tags:a,b,c[ ...]
@ PREX_ALIAS_TAGS_MATCH_PRE
[... ]tags:a,b,c ...
@ PREX_ALIAS_TAGS_MATCH_TAGS
... tags:[a,b,c] ...
#define TAILQ_FOREACH(var, head, field)
#define STAILQ_HEAD_INITIALIZER(head)
#define STAILQ_FOREACH(var, head, field)
#define STAILQ_INSERT_TAIL(head, elm, field)
#define TAILQ_FIRST(head)
#define TAILQ_HEAD_INITIALIZER(head)
#define TAILQ_EMPTY(head)
#define STAILQ_NEXT(elm, field)
static regoff_t mutt_regmatch_end(const regmatch_t *match)
Return the end of a match.
static regoff_t mutt_regmatch_start(const regmatch_t *match)
Return the start of a match.
void alias_reverse_delete(struct HashTable *reverse_aliases, struct Alias *alias)
Remove an email address lookup for an Alias.
void alias_reverse_add(struct Alias *alias)
Add an email address lookup for an Alias.
Manage alias reverse lookups.
struct Buffer * mailbox
Mailbox and host address.
Alias private Module data.
struct AliasArray aliases
User's email aliases.
struct HashTable * reverse_aliases
Hash Table of aliases (email address -> alias)
struct RegexList subscribed
Regexes to match subscribed mailing lists.
struct RegexList mail
Regexes to match mailing lists.
struct HashTable * auto_subscribe_cache
Hash Table: "mailto:" (no value)
struct HashTable * groups
Hash Table: "group-name" -> Group.
struct RegexList unmail
Regexes to exclude false matches in mail.
struct RegexList unsubscribed
Regexes to exclude false matches in subscribed.
A shortcut for an email address or addresses.
char * comment
Free-form comment string.
struct AddressList addr
List of Addresses the Alias expands to.
String manipulation buffer.
char * dptr
Current read/write position.
const char * name
Name of the Command.
struct AddressList to
Email's 'To' list.
Container for Accounts, Notifications.
struct Notify * notify
Notifications handler.
struct ConfigSubset * sub
Inherited config items.
Context for config parsing (history/backtrace)
Detailed error information from config parsing.
struct Buffer * message
Error message.
struct ListHead head
List containing values.
#define D_SLIST_SEP_COMMA
Slist items are comma-separated.