58 static const char *types[] = {
"",
"imap",
"pop",
"smtp",
"nntp" };
81 mutt_perror(
_(
"Line is malformed: expected <key: val>, got <%s>"), line);
173 if (!c_account_command)
181 make_cmd(cmd_buf, cac, c_account_command);
static MuttAccountFlags call_cmd(struct ConnAccount *cac, const struct Buffer *cmd)
Call the account command.
static MuttAccountFlags parse_one(struct ConnAccount *cac, char *line)
Parse a single line of the response.
static void make_cmd(struct Buffer *buf, const struct ConnAccount *cac, const char *cmd)
Build the command line for the external account command.
MuttAccountFlags mutt_account_call_external_cmd(struct ConnAccount *cac)
Retrieve account credentials via an external command.
Connection Credentials External Command.
int buf_add_printf(struct Buffer *buf, const char *fmt,...)
Format a string appending a Buffer.
size_t buf_addstr(struct Buffer *buf, const char *s)
Add a string to a Buffer.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
const char * cs_subset_string(const struct ConfigSubset *sub, const char *name)
Get a string config item by name.
Convenience wrapper for the config headers.
uint8_t MuttAccountFlags
Flags, Which ConnAccount fields are initialised, e.g. MUTT_ACCT_PORT.
#define MUTT_ACCT_NO_FLAGS
No flags are set.
#define MUTT_ACCT_SSL
Account uses SSL/TLS.
#define MUTT_ACCT_PASS
Password field has been set.
#define MUTT_ACCT_USER
User field has been set.
#define MUTT_ACCT_LOGIN
Login field has been set.
Convenience wrapper for the core headers.
char * mutt_file_read_line(char *line, size_t *size, FILE *fp, int *line_num, ReadLineFlags flags)
Read a line from a file.
#define mutt_file_fclose(FP)
#define MUTT_RL_NO_FLAGS
No flags are set.
char ** EnvList
Private copy of the environment variables.
#define mutt_warning(...)
int filter_wait(pid_t pid)
Wait for the exit of a process and return its status.
pid_t filter_create(const char *cmd, FILE **fp_in, FILE **fp_out, FILE **fp_err, char **envlist)
Set up filter program.
Convenience wrapper for the library headers.
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
size_t mutt_str_copy(char *dest, const char *src, size_t dsize)
Copy a string into a buffer (guaranteeing NUL-termination)
ConnAccount object used by POP and IMAP.
@ MUTT_ACCT_TYPE_NONE
Account type is unknown.
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_ACCOUNT_CMD_MATCH_KEY
[key]: value
@ PREX_ACCOUNT_CMD_MATCH_VALUE
key: [value]
@ PREX_ACCOUNT_CMD
key: value
static size_t mutt_regmatch_len(const regmatch_t *match)
Return the length of a match.
static regoff_t mutt_regmatch_start(const regmatch_t *match)
Return the start of a match.
String manipulation buffer.
Login details for a remote server.
char login[128]
Login name.
char host[128]
Server to login to.
unsigned char type
Connection type, e.g. MUTT_ACCT_TYPE_IMAP.
MuttAccountFlags flags
Which fields are initialised, e.g. MUTT_ACCT_USER.
Container for Accounts, Notifications.
struct ConfigSubset * sub
Inherited config items.