}
/* Function that checks for an ending imap status code at the start of the
- given string but also detects the supported mechanisms from the CAPABILITY
- response. */
+ given string but also detects the supported authentication mechanisms from
+ the CAPABILITY response. */
static int imap_endofresp(struct pingpong *pp, int *resp)
{
char *line = pp->linestart_resp;
line[wordlen] != '\n';)
wordlen++;
- /* Has the server explicitly disabled the LOGIN command? */
+ /* Has the server explicitly disabled clear text authentication? */
if(wordlen == 13 && !memcmp(line, "LOGINDISABLED", 13))
imapc->login_disabled = TRUE;
- /* Do we have an AUTH capability? */
+ /* Do we have a SASL based authentication mechanism? */
else if(wordlen > 5 && !memcmp(line, "AUTH=", 5)) {
line += 5;
len -= 5;
return TRUE;
}
- /* Does the server support clear text? */
+ /* Does the server support clear text authentication? */
if(len >= 4 && !memcmp(line, "USER", 4)) {
pop3c->authtypes |= POP3_TYPE_CLEARTEXT;
return FALSE;
}
- /* Does the server support APOP? */
+ /* Does the server support APOP authentication? */
if(len >= 4 && !memcmp(line, "APOP", 4)) {
pop3c->authtypes |= POP3_TYPE_APOP;
return FALSE;
}
- /* Does the server support SASL? */
+ /* Does the server support SASL based authentication? */
if(len < 4 || memcmp(line, "SASL", 4))
return FALSE;
line += 4;
len -= 4;
- /* Do we have a SIZE capability? */
+ /* Does the server support the SIZE capability? */
if(smtpc->state == SMTP_EHLO && len >= 4 && !memcmp(line, "SIZE", 4)) {
DEBUGF(infof(conn->data, "Server supports SIZE extension.\n"));
smtpc->size_supported = true;
}
- /* Do we have an AUTH capability? */
+ /* Do we have the authentication mechanism list? */
if(smtpc->state == SMTP_EHLO && len >= 5 && !memcmp(line, "AUTH ", 5)) {
line += 5;
len -= 5;