17 |
|
|
18 |
#include "imap4d.h" |
#include "imap4d.h" |
19 |
|
|
20 |
|
char *capa[] = { |
21 |
|
"IMAP4rev1", |
22 |
|
"NAMESPACE", |
23 |
|
#ifdef WITH_GSSAPI |
24 |
|
"AUTH=GSSAPI", |
25 |
|
#endif |
26 |
|
NULL |
27 |
|
}; |
28 |
|
|
29 |
int |
int |
30 |
imap4d_capability (struct imap4d_command *command, char *arg) |
imap4d_capability (struct imap4d_command *command, char *arg) |
31 |
{ |
{ |
32 |
|
int i; |
33 |
|
|
34 |
(void)arg; |
(void)arg; |
35 |
if (! (command->states & state)) |
if (! (command->states & state)) |
36 |
return util_finish (command, RESP_BAD, "Wrong state"); |
return util_finish (command, RESP_BAD, "Wrong state"); |
37 |
util_out (RESP_NONE, "CAPABILITY IMAP4rev1 NAMESPACE"); |
util_send ("* CAPABILITY"); |
38 |
|
for (i = 0; capa[i]; i++) |
39 |
|
util_send(" %s", capa[i]); |
40 |
|
util_send("\r\n"); |
41 |
return util_finish (command, RESP_OK, "Completed"); |
return util_finish (command, RESP_OK, "Completed"); |
42 |
} |
} |