72 |
/* Capabilities of mail server. */ |
/* Capabilities of mail server. */ |
73 |
#define CAPABILITY_NONE 0x00 |
#define CAPABILITY_NONE 0x00 |
74 |
#define CAPABILITY_NAMESPACE 0x01 |
#define CAPABILITY_NAMESPACE 0x01 |
75 |
|
#define CAPABILITY_AUTH_CRAM_MD5 0x02 |
76 |
|
|
77 |
/* Flags for logger. */ |
/* Flags for logger. */ |
78 |
#define LOG_PREAMBLE 0 |
#define LOG_PREAMBLE 0 |
109 |
#define RESPONSE_READONLY 5 |
#define RESPONSE_READONLY 5 |
110 |
#define RESPONSE_TRYCREATE 6 |
#define RESPONSE_TRYCREATE 6 |
111 |
|
|
112 |
/* Size virtual buffer. */ |
/* Size of input buffer. */ |
113 |
#define VIRTUAL_BUF 4096 |
#define INPUT_BUF 4096 |
114 |
|
|
115 |
/* Authentication mechanisms string. */ |
/* Authentication mechanisms string. */ |
116 |
#define AUTH_MECH_LEN 512 |
#define AUTH_MECH_LEN 512 |
152 |
} namesp_t; |
} namesp_t; |
153 |
|
|
154 |
|
|
155 |
|
/* auth.c */ |
156 |
|
int imf_cram_md5(int *sock, char *user, char *pass); |
157 |
|
|
158 |
/* file.c */ |
/* file.c */ |
159 |
int read_config(char *cfg); |
int read_config(char *cfg); |
160 |
int parse_config(FILE * fd); |
int parse_config(FILE * fd); |
191 |
|
|
192 |
/* imap.c */ |
/* imap.c */ |
193 |
unsigned int send_command(int *sock, char *cmd); |
unsigned int send_command(int *sock, char *cmd); |
194 |
|
void send_command_cont(int *sock, char *cmd); |
195 |
|
|
196 |
#ifdef DEBUG |
#ifdef DEBUG |
197 |
int imap_noop(int *sock); |
int imap_noop(int *sock); |
200 |
int imap_capability(int *sock); |
int imap_capability(int *sock); |
201 |
int imap_namespace(int *sock); |
int imap_namespace(int *sock); |
202 |
int imap_logout(int *sock); |
int imap_logout(int *sock); |
203 |
int imap_authenticate(int *sock, char *auth); |
int imap_authenticate(int *sock, char *auth, int cont); |
204 |
int imap_login(int *sock, char *user, char *pass); |
int imap_login(int *sock, char *user, char *pass); |
205 |
|
|
206 |
/* int imap_list(int *sock, char *refer, char *mbox); */ |
/* int imap_list(int *sock, char *refer, char *mbox); */ |
307 |
void message_date(char *mesg, char *destmbox); |
void message_date(char *mesg, char *destmbox); |
308 |
void default_variables(char *mbox, char *destmbox); |
void default_variables(char *mbox, char *destmbox); |
309 |
|
|
|
|
|
310 |
/* response.c */ |
/* response.c */ |
311 |
void receive_response(int *sock, char *buf); |
void receive_response(int *sock, char *buf); |
312 |
int server_response(int *sock, unsigned int tag); |
int server_response(int *sock, unsigned int tag); |
314 |
int greeting_response(int *sock); |
int greeting_response(int *sock); |
315 |
int logout_response(int *sock, unsigned int tag); |
int logout_response(int *sock, unsigned int tag); |
316 |
int capability_response(int *sock, unsigned int tag); |
int capability_response(int *sock, unsigned int tag); |
317 |
void auth_mechanisms(void); |
int authenticate_response(int *sock, unsigned int tag, unsigned char **cont); |
318 |
int namespace_response(int *sock, unsigned int tag, namesp_t * nsp); |
int namespace_response(int *sock, unsigned int tag, namesp_t * nsp); |
319 |
int status_response(int *sock, unsigned int tag, char *mbox); |
int status_response(int *sock, unsigned int tag, char *mbox); |
320 |
int select_response(int *sock, unsigned int tag); |
int select_response(int *sock, unsigned int tag); |
324 |
int append_response(int *sock, unsigned int tag); |
int append_response(int *sock, unsigned int tag); |
325 |
int copy_response(int *sock, unsigned int tag); |
int copy_response(int *sock, unsigned int tag); |
326 |
int analyze_response(int *sock, char *buf); |
int analyze_response(int *sock, char *buf); |
327 |
void init_vbuf(void); |
void init_ibuf(void); |
328 |
void reset_vbuf(void); |
void reset_ibuf(void); |
329 |
void check_vbuf(size_t n); |
void check_ibuf(void); |
330 |
|
|
331 |
/* socket.c */ |
/* socket.c */ |
332 |
int init_connection(int *sock, char *serv, unsigned short int port, unsigned int protocol); |
int init_connection(int *sock, char *serv, unsigned short int port, unsigned int protocol); |