14 |
extern filter_t *filters; |
extern filter_t *filters; |
15 |
|
|
16 |
unsigned int options; /* Program options. */ |
unsigned int options; /* Program options. */ |
17 |
|
unsigned int capabilities; /* Capabilities of mail server. */ |
18 |
char logfile[PATH_MAX]; /* Log file. */ |
char logfile[PATH_MAX]; /* Log file. */ |
19 |
|
|
20 |
|
|
28 |
account_t *ca; /* Current account. */ |
account_t *ca; /* Current account. */ |
29 |
mbox_t *cm; /* Current mailbox. */ |
mbox_t *cm; /* Current mailbox. */ |
30 |
|
|
31 |
options = OPTION_DETAILS_NORMAL; |
options = (OPTION_DETAILS_NORMAL | OPTION_NAMESPACE); |
32 |
*logfile = 0; |
*logfile = 0; |
33 |
|
|
34 |
while ((c = getopt(argc, argv, "c:hl:qv")) != -1) { |
while ((c = getopt(argc, argv, "c:hl:qv")) != -1) { |
58 |
} |
} |
59 |
} |
} |
60 |
|
|
61 |
|
catch_signals(); |
62 |
|
|
63 |
read_config(confile); |
read_config(confile); |
64 |
open_logfile(); |
open_logfile(); |
65 |
|
|
|
catch_signals(); |
|
|
|
|
66 |
for (ca = accounts; ca; ca = ca->next) { |
for (ca = accounts; ca; ca = ca->next) { |
67 |
|
|
68 |
#ifndef SSL_TLS |
#ifndef SSL_TLS |
84 |
if (r != RESPONSE_PREAUTH && login(ca->username, ca->password)) |
if (r != RESPONSE_PREAUTH && login(ca->username, ca->password)) |
85 |
continue; |
continue; |
86 |
|
|
87 |
|
check_namespace(); |
88 |
|
|
89 |
for (cm = ca->mboxes; cm; cm = cm->next) |
for (cm = ca->mboxes; cm; cm = cm->next) |
90 |
if (!*cm->filters) |
if (!*cm->filters) |
91 |
mailbox_status(cm->name); |
mailbox_status(cm->name); |