NeoMutt  2018-07-16 +952-a2da0a
Teaching an old dog new tricks
DOXYGEN
mutt_account.c File Reference

ConnAccount object used by POP and IMAP. More...

#include "config.h"
#include <stdio.h>
#include <string.h>
#include "mutt/mutt.h"
#include "email/lib.h"
#include "conn/conn.h"
#include "mutt_account.h"
#include "curs_lib.h"
#include "filter.h"
#include "globals.h"
#include "options.h"
#include "pop/pop.h"
+ Include dependency graph for mutt_account.c:

Go to the source code of this file.

Functions

bool mutt_account_match (const struct ConnAccount *a1, const struct ConnAccount *a2)
 Compare account info (host/port/user) More...
 
int mutt_account_fromurl (struct ConnAccount *account, const struct Url *url)
 Fill ConnAccount with information from url. More...
 
void mutt_account_tourl (struct ConnAccount *account, struct Url *url)
 Fill URL with info from account. More...
 
int mutt_account_getuser (struct ConnAccount *account)
 Retrieve username into ConnAccount, if necessary. More...
 
int mutt_account_getlogin (struct ConnAccount *account)
 Retrieve login info into ConnAccount, if necessary. More...
 
int mutt_account_getpass (struct ConnAccount *account)
 Fetch password into ConnAccount, if necessary. More...
 
void mutt_account_unsetpass (struct ConnAccount *account)
 Unset ConnAccount's password. More...
 
char * mutt_account_getoauthbearer (struct ConnAccount *account)
 Get an OAUTHBEARER token. More...
 

Variables

char * ImapLogin
 Config: (imap) Login name for the IMAP server (defaults to ImapUser) More...
 
char * ImapOauthRefreshCmd
 Config: (imap) External command to generate OAUTH refresh token. More...
 
char * ImapPass
 Config: (imap) Password for the IMAP server. More...
 
char * NntpPass
 Config: (nntp) Password for the news server. More...
 
char * NntpUser
 Config: (nntp) Username for the news server. More...
 
char * PopOauthRefreshCmd
 Config: (pop) External command to generate OAUTH refresh token. More...
 
char * PopPass
 Config: (pop) Password of the POP server. More...
 
char * PopUser
 Config: (pop) Username of the POP server. More...
 
char * SmtpOauthRefreshCmd
 Config: (smtp) External command to generate OAUTH refresh token. More...
 
char * SmtpPass
 Config: (smtp) Password for the SMTP server. More...
 

Detailed Description

ConnAccount object used by POP and IMAP.

Authors
  • Brendan Cully

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file mutt_account.c.

Function Documentation

bool mutt_account_match ( const struct ConnAccount a1,
const struct ConnAccount a2 
)

Compare account info (host/port/user)

Parameters
a1First ConnAccount
a2Second ConnAccount
Return values
trueAccounts match

Definition at line 60 of file mutt_account.c.

61 {
62  if (a1->type != a2->type)
63  return false;
64  if (mutt_str_strcasecmp(a1->host, a2->host) != 0)
65  return false;
66  if (a1->port != a2->port)
67  return false;
68  if (a1->flags & a2->flags & MUTT_ACCT_USER)
69  return strcmp(a1->user, a2->user) == 0;
70 
71 #ifdef USE_NNTP
72  if (a1->type == MUTT_ACCT_TYPE_NNTP)
73  return (a1->flags & MUTT_ACCT_USER) && a1->user[0] ? false : true;
74 #endif
75 
76  const char *user = NONULL(Username);
77 
78 #ifdef USE_IMAP
79  if ((a1->type == MUTT_ACCT_TYPE_IMAP) && ImapUser)
80  user = ImapUser;
81 #endif
82 
83 #ifdef USE_POP
84  if ((a1->type == MUTT_ACCT_TYPE_POP) && PopUser)
85  user = PopUser;
86 #endif
87 
88 #ifdef USE_NNTP
89  if ((a1->type == MUTT_ACCT_TYPE_NNTP) && NntpUser)
90  user = NntpUser;
91 #endif
92 
93  if (a1->flags & MUTT_ACCT_USER)
94  return strcmp(a1->user, user) == 0;
95  if (a2->flags & MUTT_ACCT_USER)
96  return strcmp(a2->user, user) == 0;
97 
98  return true;
99 }
WHERE char * Username
User&#39;s login name.
Definition: globals.h:50
#define NONULL(x)
Definition: string2.h:39
char user[128]
Definition: connaccount.h:31
char * NntpUser
Config: (nntp) Username for the news server.
Definition: mutt_account.c:47
char host[128]
Definition: connaccount.h:34
unsigned short port
Definition: connaccount.h:35
unsigned char type
Connection type, e.g. MUTT_ACCT_TYPE_IMAP.
Definition: connaccount.h:36
unsigned char flags
Which fields are initialised, e.g. MUTT_ACCT_USER.
Definition: connaccount.h:37
Imap Account.
Definition: mutt_account.h:49
Nntp (Usenet) Account.
Definition: mutt_account.h:52
Pop Account.
Definition: mutt_account.h:50
int mutt_str_strcasecmp(const char *a, const char *b)
Compare two strings ignoring case, safely.
Definition: string.c:625
WHERE char * ImapUser
Config: (imap) Username for the IMAP server.
Definition: globals.h:115
char * PopUser
Config: (pop) Username of the POP server.
Definition: mutt_account.c:50
#define MUTT_ACCT_USER
Definition: mutt_account.h:57

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mutt_account_fromurl ( struct ConnAccount account,
const struct Url url 
)

Fill ConnAccount with information from url.

Parameters
accountConnAccount to fill
urlUrl to parse
Return values
0Success
-1Error

Definition at line 108 of file mutt_account.c.

109 {
110  /* must be present */
111  if (url->host)
112  mutt_str_strfcpy(account->host, url->host, sizeof(account->host));
113  else
114  return -1;
115 
116  if (url->user)
117  {
118  mutt_str_strfcpy(account->user, url->user, sizeof(account->user));
119  account->flags |= MUTT_ACCT_USER;
120  }
121  if (url->pass)
122  {
123  mutt_str_strfcpy(account->pass, url->pass, sizeof(account->pass));
124  account->flags |= MUTT_ACCT_PASS;
125  }
126  if (url->port)
127  {
128  account->port = url->port;
129  account->flags |= MUTT_ACCT_PORT;
130  }
131 
132  return 0;
133 }
char * pass
Definition: url.h:71
char user[128]
Definition: connaccount.h:31
char host[128]
Definition: connaccount.h:34
#define MUTT_ACCT_PASS
Definition: mutt_account.h:59
char pass[256]
Definition: connaccount.h:33
unsigned short port
Definition: connaccount.h:35
#define MUTT_ACCT_PORT
Definition: mutt_account.h:56
char * user
Definition: url.h:70
size_t mutt_str_strfcpy(char *dest, const char *src, size_t dsize)
Copy a string into a buffer (guaranteeing NUL-termination)
Definition: string.c:742
char * host
Definition: url.h:72
unsigned char flags
Which fields are initialised, e.g. MUTT_ACCT_USER.
Definition: connaccount.h:37
unsigned short port
Definition: url.h:73
#define MUTT_ACCT_USER
Definition: mutt_account.h:57

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mutt_account_tourl ( struct ConnAccount account,
struct Url url 
)

Fill URL with info from account.

Parameters
accountSource ConnAccount
urlUrl to fill

The URL information is a set of pointers into account - don't free or edit account until you've finished with url (make a copy of account if you need it for a while).

Definition at line 144 of file mutt_account.c.

145 {
146  url->scheme = U_UNKNOWN;
147  url->user = NULL;
148  url->pass = NULL;
149  url->port = 0;
150  url->path = NULL;
151 
152 #ifdef USE_IMAP
153  if (account->type == MUTT_ACCT_TYPE_IMAP)
154  {
155  if (account->flags & MUTT_ACCT_SSL)
156  url->scheme = U_IMAPS;
157  else
158  url->scheme = U_IMAP;
159  }
160 #endif
161 
162 #ifdef USE_POP
163  if (account->type == MUTT_ACCT_TYPE_POP)
164  {
165  if (account->flags & MUTT_ACCT_SSL)
166  url->scheme = U_POPS;
167  else
168  url->scheme = U_POP;
169  }
170 #endif
171 
172 #ifdef USE_SMTP
173  if (account->type == MUTT_ACCT_TYPE_SMTP)
174  {
175  if (account->flags & MUTT_ACCT_SSL)
176  url->scheme = U_SMTPS;
177  else
178  url->scheme = U_SMTP;
179  }
180 #endif
181 
182 #ifdef USE_NNTP
183  if (account->type == MUTT_ACCT_TYPE_NNTP)
184  {
185  if (account->flags & MUTT_ACCT_SSL)
186  url->scheme = U_NNTPS;
187  else
188  url->scheme = U_NNTP;
189  }
190 #endif
191 
192  url->host = account->host;
193  if (account->flags & MUTT_ACCT_PORT)
194  url->port = account->port;
195  if (account->flags & MUTT_ACCT_USER)
196  url->user = account->user;
197  if (account->flags & MUTT_ACCT_PASS)
198  url->pass = account->pass;
199 }
char * pass
Definition: url.h:71
enum UrlScheme scheme
Definition: url.h:69
Url is imaps://.
Definition: url.h:39
char user[128]
Definition: connaccount.h:31
Url wasn&#39;t recognised.
Definition: url.h:34
Url is imap://.
Definition: url.h:38
char host[128]
Definition: connaccount.h:34
#define MUTT_ACCT_PASS
Definition: mutt_account.h:59
char pass[256]
Definition: connaccount.h:33
Url is nntps://.
Definition: url.h:41
unsigned short port
Definition: connaccount.h:35
#define MUTT_ACCT_PORT
Definition: mutt_account.h:56
char * user
Definition: url.h:70
Url is smtps://.
Definition: url.h:43
unsigned char type
Connection type, e.g. MUTT_ACCT_TYPE_IMAP.
Definition: connaccount.h:36
char * host
Definition: url.h:72
unsigned char flags
Which fields are initialised, e.g. MUTT_ACCT_USER.
Definition: connaccount.h:37
Imap Account.
Definition: mutt_account.h:49
char * path
Definition: url.h:74
Nntp (Usenet) Account.
Definition: mutt_account.h:52
Pop Account.
Definition: mutt_account.h:50
Url is pop://.
Definition: url.h:36
unsigned short port
Definition: url.h:73
Url is nntp://.
Definition: url.h:40
Url is smtp://.
Definition: url.h:42
#define MUTT_ACCT_SSL
Definition: mutt_account.h:60
Smtp Account.
Definition: mutt_account.h:51
Url is pops://.
Definition: url.h:37
#define MUTT_ACCT_USER
Definition: mutt_account.h:57

+ Here is the caller graph for this function:

int mutt_account_getuser ( struct ConnAccount account)

Retrieve username into ConnAccount, if necessary.

Parameters
accountConnAccount to fill
Return values
0Success
-1Failure

Definition at line 207 of file mutt_account.c.

208 {
209  char prompt[STRING];
210 
211  /* already set */
212  if (account->flags & MUTT_ACCT_USER)
213  return 0;
214 #ifdef USE_IMAP
215  else if ((account->type == MUTT_ACCT_TYPE_IMAP) && ImapUser)
216  mutt_str_strfcpy(account->user, ImapUser, sizeof(account->user));
217 #endif
218 #ifdef USE_POP
219  else if ((account->type == MUTT_ACCT_TYPE_POP) && PopUser)
220  mutt_str_strfcpy(account->user, PopUser, sizeof(account->user));
221 #endif
222 #ifdef USE_NNTP
223  else if ((account->type == MUTT_ACCT_TYPE_NNTP) && NntpUser)
224  mutt_str_strfcpy(account->user, NntpUser, sizeof(account->user));
225 #endif
226  else if (OptNoCurses)
227  return -1;
228  /* prompt (defaults to unix username), copy into account->user */
229  else
230  {
231  /* L10N: Example: Username at myhost.com */
232  snprintf(prompt, sizeof(prompt), _("Username at %s: "), account->host);
233  mutt_str_strfcpy(account->user, Username, sizeof(account->user));
234  if (mutt_get_field_unbuffered(prompt, account->user, sizeof(account->user), 0))
235  return -1;
236  }
237 
238  account->flags |= MUTT_ACCT_USER;
239 
240  return 0;
241 }
WHERE char * Username
User&#39;s login name.
Definition: globals.h:50
char user[128]
Definition: connaccount.h:31
#define _(a)
Definition: message.h:28
WHERE bool OptNoCurses
(pseudo) when sending in batch mode
Definition: options.h:45
char * NntpUser
Config: (nntp) Username for the news server.
Definition: mutt_account.c:47
char host[128]
Definition: connaccount.h:34
size_t mutt_str_strfcpy(char *dest, const char *src, size_t dsize)
Copy a string into a buffer (guaranteeing NUL-termination)
Definition: string.c:742
unsigned char type
Connection type, e.g. MUTT_ACCT_TYPE_IMAP.
Definition: connaccount.h:36
unsigned char flags
Which fields are initialised, e.g. MUTT_ACCT_USER.
Definition: connaccount.h:37
Imap Account.
Definition: mutt_account.h:49
int mutt_get_field_unbuffered(char *msg, char *buf, size_t buflen, int flags)
Ask the user for a string (ignoring macro buffer)
Definition: curs_lib.c:292
Nntp (Usenet) Account.
Definition: mutt_account.h:52
Pop Account.
Definition: mutt_account.h:50
#define STRING
Definition: string2.h:35
WHERE char * ImapUser
Config: (imap) Username for the IMAP server.
Definition: globals.h:115
char * PopUser
Config: (pop) Username of the POP server.
Definition: mutt_account.c:50
#define MUTT_ACCT_USER
Definition: mutt_account.h:57

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mutt_account_getlogin ( struct ConnAccount account)

Retrieve login info into ConnAccount, if necessary.

Parameters
accountConnAccount to fill
Return values
0Success
-1Failure

Definition at line 249 of file mutt_account.c.

250 {
251  /* already set */
252  if (account->flags & MUTT_ACCT_LOGIN)
253  return 0;
254 #ifdef USE_IMAP
255  else if (account->type == MUTT_ACCT_TYPE_IMAP)
256  {
257  if (ImapLogin)
258  {
259  mutt_str_strfcpy(account->login, ImapLogin, sizeof(account->login));
260  account->flags |= MUTT_ACCT_LOGIN;
261  }
262  }
263 #endif
264 
265  if (!(account->flags & MUTT_ACCT_LOGIN))
266  {
267  if (mutt_account_getuser(account) == 0)
268  {
269  mutt_str_strfcpy(account->login, account->user, sizeof(account->login));
270  account->flags |= MUTT_ACCT_LOGIN;
271  }
272  else
273  {
274  mutt_debug(1, "Couldn't get user info\n");
275  return -1;
276  }
277  }
278 
279  return 0;
280 }
char login[128]
Definition: connaccount.h:32
#define MUTT_ACCT_LOGIN
Definition: mutt_account.h:58
char user[128]
Definition: connaccount.h:31
int mutt_account_getuser(struct ConnAccount *account)
Retrieve username into ConnAccount, if necessary.
Definition: mutt_account.c:207
size_t mutt_str_strfcpy(char *dest, const char *src, size_t dsize)
Copy a string into a buffer (guaranteeing NUL-termination)
Definition: string.c:742
unsigned char type
Connection type, e.g. MUTT_ACCT_TYPE_IMAP.
Definition: connaccount.h:36
unsigned char flags
Which fields are initialised, e.g. MUTT_ACCT_USER.
Definition: connaccount.h:37
Imap Account.
Definition: mutt_account.h:49
char * ImapLogin
Config: (imap) Login name for the IMAP server (defaults to ImapUser)
Definition: mutt_account.c:43
#define mutt_debug(LEVEL,...)
Definition: logging.h:85

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mutt_account_getpass ( struct ConnAccount account)

Fetch password into ConnAccount, if necessary.

Parameters
accountConnAccount to fill
Return values
0Success
-1Failure

Definition at line 288 of file mutt_account.c.

289 {
290  char prompt[STRING];
291 
292  if (account->flags & MUTT_ACCT_PASS)
293  return 0;
294 #ifdef USE_IMAP
295  else if ((account->type == MUTT_ACCT_TYPE_IMAP) && ImapPass)
296  mutt_str_strfcpy(account->pass, ImapPass, sizeof(account->pass));
297 #endif
298 #ifdef USE_POP
299  else if ((account->type == MUTT_ACCT_TYPE_POP) && PopPass)
300  mutt_str_strfcpy(account->pass, PopPass, sizeof(account->pass));
301 #endif
302 #ifdef USE_SMTP
303  else if ((account->type == MUTT_ACCT_TYPE_SMTP) && SmtpPass)
304  mutt_str_strfcpy(account->pass, SmtpPass, sizeof(account->pass));
305 #endif
306 #ifdef USE_NNTP
307  else if ((account->type == MUTT_ACCT_TYPE_NNTP) && NntpPass)
308  mutt_str_strfcpy(account->pass, NntpPass, sizeof(account->pass));
309 #endif
310  else if (OptNoCurses)
311  return -1;
312  else
313  {
314  snprintf(prompt, sizeof(prompt), _("Password for %s@%s: "),
315  (account->flags & MUTT_ACCT_LOGIN) ? account->login : account->user,
316  account->host);
317  account->pass[0] = '\0';
318  if (mutt_get_password(prompt, account->pass, sizeof(account->pass)))
319  return -1;
320  }
321 
322  account->flags |= MUTT_ACCT_PASS;
323 
324  return 0;
325 }
char * PopPass
Config: (pop) Password of the POP server.
Definition: mutt_account.c:49
char login[128]
Definition: connaccount.h:32
#define mutt_get_password(A, B, C)
Definition: curs_lib.h:79
#define MUTT_ACCT_LOGIN
Definition: mutt_account.h:58
char user[128]
Definition: connaccount.h:31
#define _(a)
Definition: message.h:28
WHERE bool OptNoCurses
(pseudo) when sending in batch mode
Definition: options.h:45
char host[128]
Definition: connaccount.h:34
#define MUTT_ACCT_PASS
Definition: mutt_account.h:59
char pass[256]
Definition: connaccount.h:33
char * NntpPass
Config: (nntp) Password for the news server.
Definition: mutt_account.c:46
char * ImapPass
Config: (imap) Password for the IMAP server.
Definition: mutt_account.c:45
size_t mutt_str_strfcpy(char *dest, const char *src, size_t dsize)
Copy a string into a buffer (guaranteeing NUL-termination)
Definition: string.c:742
unsigned char type
Connection type, e.g. MUTT_ACCT_TYPE_IMAP.
Definition: connaccount.h:36
unsigned char flags
Which fields are initialised, e.g. MUTT_ACCT_USER.
Definition: connaccount.h:37
Imap Account.
Definition: mutt_account.h:49
Nntp (Usenet) Account.
Definition: mutt_account.h:52
Pop Account.
Definition: mutt_account.h:50
#define STRING
Definition: string2.h:35
char * SmtpPass
Config: (smtp) Password for the SMTP server.
Definition: mutt_account.c:52
Smtp Account.
Definition: mutt_account.h:51

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mutt_account_unsetpass ( struct ConnAccount account)

Unset ConnAccount's password.

Parameters
accountConnAccount to modify

Definition at line 331 of file mutt_account.c.

332 {
333  account->flags &= ~MUTT_ACCT_PASS;
334 }
#define MUTT_ACCT_PASS
Definition: mutt_account.h:59
unsigned char flags
Which fields are initialised, e.g. MUTT_ACCT_USER.
Definition: connaccount.h:37

+ Here is the caller graph for this function:

char* mutt_account_getoauthbearer ( struct ConnAccount account)

Get an OAUTHBEARER token.

Parameters
accountAccount to use
Return values
ptrOAuth token
NULLError

Run an external command to generate the oauth refresh token for an account, then create and encode the OAUTHBEARER token based on RFC7628.

Note
Caller should free the token

Definition at line 347 of file mutt_account.c.

348 {
349  FILE *fp;
350  char *cmd = NULL;
351  char *token = NULL;
352  size_t token_size = 0;
353  char *oauthbearer = NULL;
354  size_t oalen;
355  char *encoded_token = NULL;
356  size_t encoded_len;
357  pid_t pid;
358 
359  /* The oauthbearer token includes the login */
360  if (mutt_account_getlogin(account))
361  return NULL;
362 
363 #ifdef USE_IMAP
364  if ((account->type == MUTT_ACCT_TYPE_IMAP) && ImapOauthRefreshCmd)
365  cmd = ImapOauthRefreshCmd;
366 #endif
367 #ifdef USE_POP
368  else if ((account->type == MUTT_ACCT_TYPE_POP) && PopOauthRefreshCmd)
369  cmd = PopOauthRefreshCmd;
370 #endif
371 #ifdef USE_SMTP
372  else if ((account->type == MUTT_ACCT_TYPE_SMTP) && SmtpOauthRefreshCmd)
373  cmd = SmtpOauthRefreshCmd;
374 #endif
375 
376  if (!cmd)
377  {
378  /* L10N: You will see this error message if (1) you have "oauthbearer" in
379  one of your $*_authenticators and (2) you do not have the corresponding
380  $*_oauth_refresh_command defined. So the message does not mean "None of
381  your $*_oauth_refresh_command's are defined."
382  */
383  mutt_error(_("No OAUTH refresh command defined"));
384  return NULL;
385  }
386 
387  pid = mutt_create_filter(cmd, NULL, &fp, NULL);
388  if (pid < 0)
389  {
390  mutt_perror(_("Unable to run refresh command"));
391  return NULL;
392  }
393 
394  token = mutt_file_read_line(NULL, &token_size, fp, NULL, 0);
395  mutt_file_fclose(&fp);
396  mutt_wait_filter(pid);
397 
398  if (!token || *token == '\0')
399  {
400  mutt_error(_("Command returned empty string"));
401  FREE(&token);
402  return NULL;
403  }
404 
405  /* Determine the length of the keyed message digest, add 50 for overhead. */
406  oalen = strlen(account->login) + strlen(account->host) + strlen(token) + 50;
407  oauthbearer = mutt_mem_malloc(oalen);
408 
409  snprintf(oauthbearer, oalen, "n,a=%s,\001host=%s\001port=%d\001auth=Bearer %s\001\001",
410  account->login, account->host, account->port, token);
411 
412  FREE(&token);
413 
414  encoded_len = strlen(oauthbearer) * 4 / 3 + 10;
415  encoded_token = mutt_mem_malloc(encoded_len);
416  mutt_b64_encode(oauthbearer, strlen(oauthbearer), encoded_token, encoded_len);
417  FREE(&oauthbearer);
418  return encoded_token;
419 }
char login[128]
Definition: connaccount.h:32
#define mutt_perror(...)
Definition: logging.h:89
char * mutt_file_read_line(char *line, size_t *size, FILE *fp, int *line_num, int flags)
Read a line from a file.
Definition: file.c:632
char * PopOauthRefreshCmd
Config: (pop) External command to generate OAUTH refresh token.
Definition: mutt_account.c:48
#define _(a)
Definition: message.h:28
char host[128]
Definition: connaccount.h:34
unsigned short port
Definition: connaccount.h:35
void * mutt_mem_malloc(size_t size)
Allocate memory on the heap.
Definition: memory.c:99
unsigned char type
Connection type, e.g. MUTT_ACCT_TYPE_IMAP.
Definition: connaccount.h:36
Imap Account.
Definition: mutt_account.h:49
size_t mutt_b64_encode(const char *in, size_t inlen, char *out, size_t outlen)
Convert raw bytes to null-terminated base64 string.
Definition: base64.c:85
Pop Account.
Definition: mutt_account.h:50
char * SmtpOauthRefreshCmd
Config: (smtp) External command to generate OAUTH refresh token.
Definition: mutt_account.c:51
int mutt_file_fclose(FILE **f)
Close a FILE handle (and NULL the pointer)
Definition: file.c:149
#define mutt_error(...)
Definition: logging.h:88
#define FREE(x)
Definition: memory.h:46
pid_t mutt_create_filter(const char *s, FILE **in, FILE **out, FILE **err)
Set up filter program.
Definition: filter.c:216
int mutt_account_getlogin(struct ConnAccount *account)
Retrieve login info into ConnAccount, if necessary.
Definition: mutt_account.c:249
Smtp Account.
Definition: mutt_account.h:51
int mutt_wait_filter(pid_t pid)
Wait for the exit of a process and return its status.
Definition: filter.c:227
char * ImapOauthRefreshCmd
Config: (imap) External command to generate OAUTH refresh token.
Definition: mutt_account.c:44

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

char* ImapLogin

Config: (imap) Login name for the IMAP server (defaults to ImapUser)

Definition at line 43 of file mutt_account.c.

char* ImapOauthRefreshCmd

Config: (imap) External command to generate OAUTH refresh token.

Definition at line 44 of file mutt_account.c.

char* ImapPass

Config: (imap) Password for the IMAP server.

Definition at line 45 of file mutt_account.c.

char* NntpPass

Config: (nntp) Password for the news server.

Definition at line 46 of file mutt_account.c.

char* NntpUser

Config: (nntp) Username for the news server.

Definition at line 47 of file mutt_account.c.

char* PopOauthRefreshCmd

Config: (pop) External command to generate OAUTH refresh token.

Definition at line 48 of file mutt_account.c.

char* PopPass

Config: (pop) Password of the POP server.

Definition at line 49 of file mutt_account.c.

char* PopUser

Config: (pop) Username of the POP server.

Definition at line 50 of file mutt_account.c.

char* SmtpOauthRefreshCmd

Config: (smtp) External command to generate OAUTH refresh token.

Definition at line 51 of file mutt_account.c.

char* SmtpPass

Config: (smtp) Password for the SMTP server.

Definition at line 52 of file mutt_account.c.