28 |
int login(char *user, char *pass) |
int login(char *user, char *pass) |
29 |
{ |
{ |
30 |
imap_login(user, pass); |
imap_login(user, pass); |
31 |
|
|
32 |
|
log_info(LOG_USERNAME, user); |
33 |
|
|
34 |
return server_response("LOGIN"); |
return server_response("LOGIN"); |
35 |
} |
} |
36 |
|
|
48 |
if (!r) |
if (!r) |
49 |
mailbox_status(mbox); |
mailbox_status(mbox); |
50 |
|
|
51 |
log_info(2, mbox); |
log_info(LOG_MAILBOX, mbox); |
52 |
|
|
53 |
return r; |
return r; |
54 |
} |
} |
103 |
|
|
104 |
if (match_filter(filters[i], mesgs)) |
if (match_filter(filters[i], mesgs)) |
105 |
continue; |
continue; |
106 |
|
|
107 |
|
log_info(LOG_FILTER, filters[i]->key); |
108 |
|
|
109 |
apply_action(mesgs, &(filters[i]->action.type), |
apply_action(mesgs, &(filters[i]->action.type), |
110 |
filters[i]->action.destmbox, filters[i]->action.args); |
filters[i]->action.destmbox, filters[i]->action.args); |
340 |
if (!*mesgs) |
if (!*mesgs) |
341 |
return 0; |
return 0; |
342 |
|
|
343 |
log_info(3, type); |
log_info(LOG_ACTION, type); |
344 |
log_info(4, destmbox); |
log_info(LOG_DESTINATION_MAILBOX, destmbox); |
345 |
|
|
346 |
cnt = convert_messages(mesgs); |
cnt = convert_messages(mesgs); |
347 |
|
|
365 |
} |
} |
366 |
|
|
367 |
if(!*args) |
if(!*args) |
368 |
log_info(0, NULL); |
log_info(LOG_WRITE, NULL); |
369 |
|
|
370 |
return 0; |
return 0; |
371 |
} |
} |