NeoMutt  2024-12-12-19-ge4b57e
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
lib.c File Reference

POP helper routines. More...

#include "config.h"
#include <arpa/inet.h>
#include <errno.h>
#include <netdb.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "private.h"
#include "mutt/lib.h"
#include "config/lib.h"
#include "email/lib.h"
#include "core/lib.h"
#include "conn/lib.h"
#include "question/lib.h"
#include "progress/lib.h"
#include "adata.h"
#include "edata.h"
#include "mutt_logging.h"
+ Include dependency graph for lib.c:

Go to the source code of this file.

Functions

const char * pop_get_field (enum ConnAccountField field, void *gf_data)
 Get connection login credentials - Implements ConnAccount::get_field() -.
 
int pop_parse_path (const char *path, struct ConnAccount *cac)
 Parse a POP mailbox name.
 
static void pop_error (struct PopAccountData *adata, char *msg)
 Copy error message to err_msg buffer.
 
static int fetch_capa (const char *line, void *data)
 Parse CAPA response - Implements pop_fetch_t -.
 
static int fetch_auth (const char *line, void *data)
 Parse AUTH response - Implements pop_fetch_t -.
 
static int pop_capabilities (struct PopAccountData *adata, int mode)
 Get capabilities from a POP server.
 
int pop_connect (struct PopAccountData *adata)
 Open connection.
 
int pop_open_connection (struct PopAccountData *adata)
 Open connection and authenticate.
 
void pop_logout (struct Mailbox *m)
 Logout from a POP server.
 
int pop_query_d (struct PopAccountData *adata, char *buf, size_t buflen, char *msg)
 Send data from buffer and receive answer to the same buffer.
 
int pop_fetch_data (struct PopAccountData *adata, const char *query, struct Progress *progress, pop_fetch_t callback, void *data)
 Read Headers with callback function.
 
static int check_uidl (const char *line, void *data)
 Parse UIDL response - Implements pop_fetch_t -.
 
int pop_reconnect (struct Mailbox *m)
 Reconnect and verify indexes if connection was lost.
 

Detailed Description

POP helper routines.

Authors
  • Vsevolod Volkov
  • Richard Russon
  • Pietro Cerutti

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 lib.c.

Function Documentation

◆ pop_parse_path()

int pop_parse_path ( const char *  path,
struct ConnAccount cac 
)

Parse a POP mailbox name.

Parameters
pathPath to parse
cacAccount to store details
Return values
0success
-1error

Split a POP path into host, port, username and password

Definition at line 82 of file lib.c.

83{
84 /* Defaults */
85 cac->flags = 0;
87 cac->port = 0;
88 cac->service = "pop";
90
91 struct Url *url = url_parse(path);
92
93 if (!url || ((url->scheme != U_POP) && (url->scheme != U_POPS)) ||
94 !url->host || (account_from_url(cac, url) < 0))
95 {
96 url_free(&url);
97 mutt_error(_("Invalid POP URL: %s"), path);
98 return -1;
99 }
100
101 if (url->scheme == U_POPS)
102 cac->flags |= MUTT_ACCT_SSL;
103
104 struct servent *service = getservbyname((url->scheme == U_POP) ? "pop3" : "pop3s", "tcp");
105 if (cac->port == 0)
106 {
107 if (service)
108 cac->port = ntohs(service->s_port);
109 else
110 cac->port = (url->scheme == U_POP) ? POP_PORT : POP_SSL_PORT;
111 }
112
113 url_free(&url);
114 return 0;
115}
#define MUTT_ACCT_SSL
Account uses SSL/TLS.
Definition: connaccount.h:47
const char * pop_get_field(enum ConnAccountField field, void *gf_data)
Get connection login credentials - Implements ConnAccount::get_field() -.
Definition: lib.c:56
#define mutt_error(...)
Definition: logging2.h:92
#define _(a)
Definition: message.h:28
int account_from_url(struct ConnAccount *cac, const struct Url *url)
Fill ConnAccount with information from url.
Definition: mutt_account.c:44
@ MUTT_ACCT_TYPE_POP
Pop Account.
Definition: mutt_account.h:37
#define POP_SSL_PORT
Definition: private.h:36
#define POP_PORT
Definition: private.h:35
const char * service
Name of the service, e.g. "imap".
Definition: connaccount.h:61
const char *(* get_field)(enum ConnAccountField field, void *gf_data)
Definition: connaccount.h:70
unsigned char type
Connection type, e.g. MUTT_ACCT_TYPE_IMAP.
Definition: connaccount.h:59
MuttAccountFlags flags
Which fields are initialised, e.g. MUTT_ACCT_USER.
Definition: connaccount.h:60
unsigned short port
Port to connect to.
Definition: connaccount.h:58
A parsed URL proto://user:password@host:port/path?a=1&b=2
Definition: url.h:69
char * host
Host.
Definition: url.h:73
char * path
Path.
Definition: url.h:75
enum UrlScheme scheme
Scheme, e.g. U_SMTPS.
Definition: url.h:70
struct Url * url_parse(const char *src)
Fill in Url.
Definition: url.c:239
void url_free(struct Url **ptr)
Free the contents of a URL.
Definition: url.c:124
@ U_POPS
Url is pops://.
Definition: url.h:38
@ U_POP
Url is pop://.
Definition: url.h:37
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pop_error()

static void pop_error ( struct PopAccountData adata,
char *  msg 
)
static

Copy error message to err_msg buffer.

Parameters
adataPOP Account data
msgError message to save

Definition at line 122 of file lib.c.

123{
124 char *t = strchr(adata->err_msg, '\0');
125 char *c = msg;
126
127 size_t plen = mutt_str_startswith(msg, "-ERR ");
128 if (plen != 0)
129 {
130 char *c2 = mutt_str_skip_email_wsp(msg + plen);
131
132 if (*c2)
133 c = c2;
134 }
135
136 mutt_str_copy(t, c, sizeof(adata->err_msg) - strlen(adata->err_msg));
138}
void mutt_str_remove_trailing_ws(char *s)
Trim trailing whitespace from a string.
Definition: string.c:565
char * mutt_str_skip_email_wsp(const char *s)
Skip over whitespace as defined by RFC5322.
Definition: string.c:608
size_t mutt_str_startswith(const char *str, const char *prefix)
Check whether a string starts with a prefix.
Definition: string.c:230
size_t mutt_str_copy(char *dest, const char *src, size_t dsize)
Copy a string into a buffer (guaranteeing NUL-termination)
Definition: string.c:581
char err_msg[POP_CMD_RESPONSE]
Definition: adata.h:56
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pop_capabilities()

static int pop_capabilities ( struct PopAccountData adata,
int  mode 
)
static

Get capabilities from a POP server.

Parameters
adataPOP Account data
modeInitial capabilities
Return values
0Successful
-1Connection lost
-2Execution error

Definition at line 202 of file lib.c.

203{
204 char buf[1024] = { 0 };
205
206 /* don't check capabilities on reconnect */
207 if (adata->capabilities)
208 return 0;
209
210 /* init capabilities */
211 if (mode == 0)
212 {
213 adata->cmd_capa = false;
214 adata->cmd_stls = false;
215 adata->cmd_user = 0;
216 adata->cmd_uidl = 0;
217 adata->cmd_top = 0;
218 adata->resp_codes = false;
219 adata->expire = true;
220 adata->login_delay = 0;
221 buf_init(&adata->auth_list);
222 }
223
224 /* Execute CAPA command */
225 if ((mode == 0) || adata->cmd_capa)
226 {
227 mutt_str_copy(buf, "CAPA\r\n", sizeof(buf));
228 switch (pop_fetch_data(adata, buf, NULL, fetch_capa, adata))
229 {
230 case 0:
231 {
232 adata->cmd_capa = true;
233 break;
234 }
235 case -1:
236 return -1;
237 }
238 }
239
240 /* CAPA not supported, use defaults */
241 if ((mode == 0) && !adata->cmd_capa)
242 {
243 adata->cmd_user = 2;
244 adata->cmd_uidl = 2;
245 adata->cmd_top = 2;
246
247 mutt_str_copy(buf, "AUTH\r\n", sizeof(buf));
248 if (pop_fetch_data(adata, buf, NULL, fetch_auth, adata) == -1)
249 return -1;
250 }
251
252 /* Check capabilities */
253 if (mode == 2)
254 {
255 char *msg = NULL;
256
257 if (!adata->expire)
258 msg = _("Unable to leave messages on server");
259 if (adata->cmd_top == 0)
260 msg = _("Command TOP is not supported by server");
261 if (adata->cmd_uidl == 0)
262 msg = _("Command UIDL is not supported by server");
263 if (msg && adata->cmd_capa)
264 {
265 mutt_error("%s", msg);
266 return -2;
267 }
268 adata->capabilities = true;
269 }
270
271 return 0;
272}
struct Buffer * buf_init(struct Buffer *buf)
Initialise a new Buffer.
Definition: buffer.c:61
static int fetch_capa(const char *line, void *data)
Parse CAPA response - Implements pop_fetch_t -.
Definition: lib.c:146
static int fetch_auth(const char *line, void *data)
Parse AUTH response - Implements pop_fetch_t -.
Definition: lib.c:181
int pop_fetch_data(struct PopAccountData *adata, const char *query, struct Progress *progress, pop_fetch_t callback, void *data)
Read Headers with callback function.
Definition: lib.c:510
bool resp_codes
server supports extended response codes
Definition: adata.h:47
unsigned int cmd_top
optional command TOP
Definition: adata.h:46
bool capabilities
Definition: adata.h:40
bool expire
expire is greater than 0
Definition: adata.h:48
time_t login_delay
minimal login delay capability
Definition: adata.h:52
bool cmd_stls
optional command STLS
Definition: adata.h:43
unsigned int cmd_uidl
optional command UIDL
Definition: adata.h:45
bool cmd_capa
optional command CAPA
Definition: adata.h:42
unsigned int cmd_user
optional command USER
Definition: adata.h:44
struct Buffer auth_list
list of auth mechanisms
Definition: adata.h:53
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pop_connect()

int pop_connect ( struct PopAccountData adata)

Open connection.

Parameters
adataPOP Account data
Return values
0Successful
-1Connection lost
-2Invalid response

Definition at line 281 of file lib.c.

282{
283 char buf[1024] = { 0 };
284
285 adata->status = POP_NONE;
286 if ((mutt_socket_open(adata->conn) < 0) ||
287 (mutt_socket_readln(buf, sizeof(buf), adata->conn) < 0))
288 {
289 mutt_error(_("Error connecting to server: %s"), adata->conn->account.host);
290 return -1;
291 }
292
293 adata->status = POP_CONNECTED;
294
295 if (!mutt_str_startswith(buf, "+OK"))
296 {
297 *adata->err_msg = '\0';
298 pop_error(adata, buf);
299 mutt_error("%s", adata->err_msg);
300 return -2;
301 }
302
303 pop_apop_timestamp(adata, buf);
304
305 return 0;
306}
void pop_apop_timestamp(struct PopAccountData *adata, char *buf)
Get the server timestamp for APOP authentication.
Definition: auth.c:301
static void pop_error(struct PopAccountData *adata, char *msg)
Copy error message to err_msg buffer.
Definition: lib.c:122
@ POP_CONNECTED
Connected to server.
Definition: private.h:50
@ POP_NONE
No connected to server.
Definition: private.h:49
int mutt_socket_open(struct Connection *conn)
Simple wrapper.
Definition: socket.c:76
#define mutt_socket_readln(buf, buflen, conn)
Definition: socket.h:56
char host[128]
Server to login to.
Definition: connaccount.h:54
struct ConnAccount account
Account details: username, password, etc.
Definition: connection.h:49
unsigned int status
Definition: adata.h:39
struct Connection * conn
Connection to POP server.
Definition: adata.h:38
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pop_open_connection()

int pop_open_connection ( struct PopAccountData adata)

Open connection and authenticate.

Parameters
adataPOP Account data
Return values
0Successful
-1Connection lost
-2Invalid command or execution error
-3Authentication cancelled

Definition at line 316 of file lib.c.

317{
318 char buf[1024] = { 0 };
319
320 int rc = pop_connect(adata);
321 if (rc < 0)
322 return rc;
323
324 rc = pop_capabilities(adata, 0);
325 if (rc == -1)
326 goto err_conn;
327 if (rc == -2)
328 return -2;
329
330#ifdef USE_SSL
331 /* Attempt STLS if available and desired. */
332 const bool c_ssl_force_tls = cs_subset_bool(NeoMutt->sub, "ssl_force_tls");
333 if ((adata->conn->ssf == 0) && (adata->cmd_stls || c_ssl_force_tls))
334 {
335 if (c_ssl_force_tls)
336 adata->use_stls = 2;
337 if (adata->use_stls == 0)
338 {
339 enum QuadOption ans = query_quadoption(_("Secure connection with TLS?"),
340 NeoMutt->sub, "ssl_starttls");
341 if (ans == MUTT_ABORT)
342 return -2;
343 adata->use_stls = 1;
344 if (ans == MUTT_YES)
345 adata->use_stls = 2;
346 }
347 if (adata->use_stls == 2)
348 {
349 mutt_str_copy(buf, "STLS\r\n", sizeof(buf));
350 rc = pop_query(adata, buf, sizeof(buf));
351 // Clear any data after the STLS acknowledgement
352 mutt_socket_empty(adata->conn);
353 if (rc == -1)
354 goto err_conn;
355 if (rc != 0)
356 {
357 mutt_error("%s", adata->err_msg);
358 }
359 else if (mutt_ssl_starttls(adata->conn))
360 {
361 mutt_error(_("Could not negotiate TLS connection"));
362 return -2;
363 }
364 else
365 {
366 /* recheck capabilities after STLS completes */
367 rc = pop_capabilities(adata, 1);
368 if (rc == -1)
369 goto err_conn;
370 if (rc == -2)
371 return -2;
372 }
373 }
374 }
375
376 if (c_ssl_force_tls && (adata->conn->ssf == 0))
377 {
378 mutt_error(_("Encrypted connection unavailable"));
379 return -2;
380 }
381#endif
382
383 rc = pop_authenticate(adata);
384 if (rc == -1)
385 goto err_conn;
386 if (rc == -3)
388 if (rc != 0)
389 return rc;
390
391 /* recheck capabilities after authentication */
392 rc = pop_capabilities(adata, 2);
393 if (rc == -1)
394 goto err_conn;
395 if (rc == -2)
396 return -2;
397
398 /* get total size of mailbox */
399 mutt_str_copy(buf, "STAT\r\n", sizeof(buf));
400 rc = pop_query(adata, buf, sizeof(buf));
401 if (rc == -1)
402 goto err_conn;
403 if (rc == -2)
404 {
405 mutt_error("%s", adata->err_msg);
406 return rc;
407 }
408
409 unsigned int n = 0, size = 0;
410 sscanf(buf, "+OK %u %u", &n, &size);
411 adata->size = size;
412 return 0;
413
414err_conn:
415 adata->status = POP_DISCONNECTED;
416 mutt_error(_("Server closed connection"));
417 return -1;
418}
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
Definition: helpers.c:47
int mutt_ssl_starttls(struct Connection *conn)
Negotiate TLS over an already opened connection.
Definition: gnutls.c:1146
void mutt_clear_error(void)
Clear the message line (bottom line of screen)
Definition: mutt_logging.c:74
int pop_authenticate(struct PopAccountData *adata)
Authenticate with a POP server.
Definition: auth.c:523
int pop_connect(struct PopAccountData *adata)
Open connection.
Definition: lib.c:281
static int pop_capabilities(struct PopAccountData *adata, int mode)
Get capabilities from a POP server.
Definition: lib.c:202
#define pop_query(adata, buf, buflen)
Definition: private.h:111
@ POP_DISCONNECTED
Disconnected from server.
Definition: private.h:51
QuadOption
Possible values for a quad-option.
Definition: quad.h:36
@ MUTT_ABORT
User aborted the question (with Ctrl-G)
Definition: quad.h:37
@ MUTT_YES
User answered 'Yes', or assume 'Yes'.
Definition: quad.h:39
enum QuadOption query_quadoption(const char *prompt, struct ConfigSubset *sub, const char *name)
Ask the user a quad-question.
Definition: question.c:379
void mutt_socket_empty(struct Connection *conn)
Clear out any queued data.
Definition: socket.c:306
unsigned int ssf
Security strength factor, in bits (see notes)
Definition: connection.h:50
Container for Accounts, Notifications.
Definition: neomutt.h:42
struct ConfigSubset * sub
Inherited config items.
Definition: neomutt.h:46
size_t size
Definition: adata.h:50
unsigned int use_stls
Definition: adata.h:41
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pop_logout()

void pop_logout ( struct Mailbox m)

Logout from a POP server.

Parameters
mMailbox

Definition at line 424 of file lib.c.

425{
427
428 if (adata->status == POP_CONNECTED)
429 {
430 int rc = 0;
431 char buf[1024] = { 0 };
432 mutt_message(_("Closing connection to POP server..."));
433
434 if (m->readonly)
435 {
436 mutt_str_copy(buf, "RSET\r\n", sizeof(buf));
437 rc = pop_query(adata, buf, sizeof(buf));
438 }
439
440 if (rc != -1)
441 {
442 mutt_str_copy(buf, "QUIT\r\n", sizeof(buf));
443 rc = pop_query(adata, buf, sizeof(buf));
444 }
445
446 if (rc < 0)
447 mutt_debug(LL_DEBUG1, "Error closing POP connection\n");
448
450 }
451
452 adata->status = POP_DISCONNECTED;
453}
#define mutt_message(...)
Definition: logging2.h:91
#define mutt_debug(LEVEL,...)
Definition: logging2.h:89
@ LL_DEBUG1
Log at debug level 1.
Definition: logging2.h:43
struct PopAccountData * pop_adata_get(struct Mailbox *m)
Get the Account data for this mailbox.
Definition: adata.c:73
void * adata
Private data (for Mailbox backends)
Definition: account.h:42
bool readonly
Don't allow changes to the mailbox.
Definition: mailbox.h:116
POP-specific Account data -.
Definition: adata.h:37
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pop_query_d()

int pop_query_d ( struct PopAccountData adata,
char *  buf,
size_t  buflen,
char *  msg 
)

Send data from buffer and receive answer to the same buffer.

Parameters
adataPOP Account data
bufBuffer to send/store data
buflenBuffer length
msgProgress message
Return values
0Successful
-1Connection lost
-2Invalid command or execution error

Definition at line 465 of file lib.c.

466{
467 if (adata->status != POP_CONNECTED)
468 return -1;
469
470 /* print msg instead of real command */
471 if (msg)
472 {
473 mutt_debug(MUTT_SOCK_LOG_CMD, "> %s", msg);
474 }
475
477
478 char *c = strpbrk(buf, " \r\n");
479 if (c)
480 *c = '\0';
481 snprintf(adata->err_msg, sizeof(adata->err_msg), "%s: ", buf);
482
483 if (mutt_socket_readln_d(buf, buflen, adata->conn, MUTT_SOCK_LOG_FULL) < 0)
484 {
485 adata->status = POP_DISCONNECTED;
486 return -1;
487 }
488 if (mutt_str_startswith(buf, "+OK"))
489 return 0;
490
491 pop_error(adata, buf);
492 return -2;
493}
int mutt_socket_readln_d(char *buf, size_t buflen, struct Connection *conn, int dbg)
Read a line from a socket.
Definition: socket.c:238
#define MUTT_SOCK_LOG_FULL
Definition: socket.h:54
#define MUTT_SOCK_LOG_CMD
Definition: socket.h:52
#define mutt_socket_send_d(conn, buf, dbg)
Definition: socket.h:58
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pop_fetch_data()

int pop_fetch_data ( struct PopAccountData adata,
const char *  query,
struct Progress *  progress,
pop_fetch_t  callback,
void *  data 
)

Read Headers with callback function.

Parameters
adataPOP Account data
queryPOP query to send to server
progressProgress bar
callbackFunction called for each header read
dataData to pass to the callback
Return values
0Successful
-1Connection lost
-2Invalid command or execution error
-3Error in callback(*line, *data)

This function calls callback(*line, *data) for each received line, callback(NULL, *data) if rewind(*data) needs, exits when fail or done.

Definition at line 510 of file lib.c.

512{
513 char buf[1024] = { 0 };
514 long pos = 0;
515 size_t lenbuf = 0;
516
517 mutt_str_copy(buf, query, sizeof(buf));
518 int rc = pop_query(adata, buf, sizeof(buf));
519 if (rc < 0)
520 return rc;
521
522 char *inbuf = MUTT_MEM_MALLOC(sizeof(buf), char);
523
524 while (true)
525 {
526 const int chunk = mutt_socket_readln_d(buf, sizeof(buf), adata->conn, MUTT_SOCK_LOG_FULL);
527 if (chunk < 0)
528 {
529 adata->status = POP_DISCONNECTED;
530 rc = -1;
531 break;
532 }
533
534 char *p = buf;
535 if (!lenbuf && (buf[0] == '.'))
536 {
537 if (buf[1] != '.')
538 break;
539 p++;
540 }
541
542 mutt_str_copy(inbuf + lenbuf, p, sizeof(buf));
543 pos += chunk;
544
545 /* cast is safe since we break out of the loop when chunk<=0 */
546 if ((size_t) chunk >= sizeof(buf))
547 {
548 lenbuf += strlen(p);
549 }
550 else
551 {
552 progress_update(progress, pos, -1);
553 if ((rc == 0) && (callback(inbuf, data) < 0))
554 rc = -3;
555 lenbuf = 0;
556 }
557
558 MUTT_MEM_REALLOC(&inbuf, lenbuf + sizeof(buf), char);
559 }
560
561 FREE(&inbuf);
562 return rc;
563}
#define FREE(x)
Definition: memory.h:55
#define MUTT_MEM_REALLOC(pptr, n, type)
Definition: memory.h:43
#define MUTT_MEM_MALLOC(n, type)
Definition: memory.h:41
bool progress_update(struct Progress *progress, size_t pos, int percent)
Update the state of the progress bar.
Definition: progress.c:80
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pop_reconnect()

int pop_reconnect ( struct Mailbox m)

Reconnect and verify indexes if connection was lost.

Parameters
mMailbox
Return values
0Success
-1Error

Definition at line 608 of file lib.c.

609{
611
612 if (adata->status == POP_CONNECTED)
613 return 0;
614
615 while (true)
616 {
618
619 int rc = pop_open_connection(adata);
620 if (rc == 0)
621 {
622 struct Progress *progress = progress_new(MUTT_PROGRESS_NET, 0);
623 progress_set_message(progress, _("Verifying message indexes..."));
624
625 for (int i = 0; i < m->msg_count; i++)
626 {
627 struct PopEmailData *edata = pop_edata_get(m->emails[i]);
628 edata->refno = -1;
629 }
630
631 rc = pop_fetch_data(adata, "UIDL\r\n", progress, check_uidl, m);
632 progress_free(&progress);
633 if (rc == -2)
634 {
635 mutt_error("%s", adata->err_msg);
636 }
637 }
638
639 if (rc == 0)
640 return 0;
641
642 pop_logout(m);
643
644 if (rc < -1)
645 return -1;
646
647 if (query_quadoption(_("Connection lost. Reconnect to POP server?"),
648 NeoMutt->sub, "pop_reconnect") != MUTT_YES)
649 {
650 return -1;
651 }
652 }
653}
static int check_uidl(const char *line, void *data)
Parse UIDL response - Implements pop_fetch_t -.
Definition: lib.c:574
struct PopEmailData * pop_edata_get(struct Email *e)
Get the private data for this Email.
Definition: edata.c:68
int pop_open_connection(struct PopAccountData *adata)
Open connection and authenticate.
Definition: lib.c:316
void pop_logout(struct Mailbox *m)
Logout from a POP server.
Definition: lib.c:424
@ MUTT_PROGRESS_NET
Progress tracks bytes, according to $net_inc
Definition: lib.h:82
struct Progress * progress_new(enum ProgressType type, size_t size)
Create a new Progress Bar.
Definition: progress.c:139
void progress_free(struct Progress **ptr)
Free a Progress Bar.
Definition: progress.c:110
void progress_set_message(struct Progress *progress, const char *fmt,...) __attribute__((__format__(__printf__
int mutt_socket_close(struct Connection *conn)
Close a socket.
Definition: socket.c:100
void * edata
Driver-specific data.
Definition: email.h:74
int msg_count
Total number of messages.
Definition: mailbox.h:88
struct Email ** emails
Array of Emails.
Definition: mailbox.h:96
POP-specific Email data -.
Definition: edata.h:32
+ Here is the call graph for this function:
+ Here is the caller graph for this function: