Lines Matching refs:smtpc
214 struct smtp_conn *smtpc = &conn->proto.smtpc; in smtp_endofresp() local
240 (smtpc->state == SMTP_EHLO || smtpc->state == SMTP_COMMAND)) { in smtp_endofresp()
256 char *message = Curl_dyn_ptr(&data->conn->proto.smtpc.pp.recvbuf); in smtp_get_message()
257 size_t len = data->conn->proto.smtpc.pp.nfinal; in smtp_get_message()
290 struct smtp_conn *smtpc = &data->conn->proto.smtpc; in smtp_state() local
310 if(smtpc->state != newstate) in smtp_state()
312 names[smtpc->state], names[newstate]); in smtp_state()
315 smtpc->state = newstate; in smtp_state()
329 struct smtp_conn *smtpc = &conn->proto.smtpc; in smtp_perform_ehlo() local
331 smtpc->sasl.authmechs = SASL_AUTH_NONE; /* No known auth. mechanism yet */ in smtp_perform_ehlo()
332 smtpc->sasl.authused = SASL_AUTH_NONE; /* Clear the authentication mechanism in smtp_perform_ehlo()
334 smtpc->tls_supported = FALSE; /* Clear the TLS capability */ in smtp_perform_ehlo()
335 smtpc->auth_supported = FALSE; /* Clear the AUTH capability */ in smtp_perform_ehlo()
338 result = Curl_pp_sendf(data, &smtpc->pp, "EHLO %s", smtpc->domain); in smtp_perform_ehlo()
356 struct smtp_conn *smtpc = &conn->proto.smtpc; in smtp_perform_helo() local
358 smtpc->sasl.authused = SASL_AUTH_NONE; /* No authentication mechanism used in smtp_perform_helo()
362 result = Curl_pp_sendf(data, &smtpc->pp, "HELO %s", smtpc->domain); in smtp_perform_helo()
380 CURLcode result = Curl_pp_sendf(data, &conn->proto.smtpc.pp, in smtp_perform_starttls()
399 struct smtp_conn *smtpc = &conn->proto.smtpc; in smtp_perform_upgrade_tls() local
411 smtpc->ssldone = ssldone; in smtp_perform_upgrade_tls()
412 if(smtpc->state != SMTP_UPGRADETLS) in smtp_perform_upgrade_tls()
415 if(smtpc->ssldone) { in smtp_perform_upgrade_tls()
436 struct smtp_conn *smtpc = &data->conn->proto.smtpc; in smtp_perform_auth() local
441 result = Curl_pp_sendf(data, &smtpc->pp, "AUTH %s %s", mech, ir); in smtp_perform_auth()
445 result = Curl_pp_sendf(data, &smtpc->pp, "AUTH %s", mech); in smtp_perform_auth()
461 struct smtp_conn *smtpc = &data->conn->proto.smtpc; in smtp_continue_auth() local
465 return Curl_pp_sendf(data, &smtpc->pp, in smtp_continue_auth()
477 struct smtp_conn *smtpc = &data->conn->proto.smtpc; in smtp_cancel_auth() local
481 return Curl_pp_sendf(data, &smtpc->pp, "*"); in smtp_cancel_auth()
495 struct smtp_conn *smtpc = &conn->proto.smtpc; in smtp_perform_authentication() local
500 if(!smtpc->auth_supported || in smtp_perform_authentication()
501 !Curl_sasl_can_authenticate(&smtpc->sasl, data)) { in smtp_perform_authentication()
507 result = Curl_sasl_start(&smtpc->sasl, data, FALSE, &progress); in smtp_perform_authentication()
554 utf8 = (conn->proto.smtpc.utf8_supported) && in smtp_perform_command()
560 result = Curl_pp_sendf(data, &conn->proto.smtpc.pp, "VRFY %s%s%s%s", in smtp_perform_command()
572 utf8 = (conn->proto.smtpc.utf8_supported) && in smtp_perform_command()
576 result = Curl_pp_sendf(data, &conn->proto.smtpc.pp, in smtp_perform_command()
584 result = Curl_pp_sendf(data, &conn->proto.smtpc.pp, "%s", in smtp_perform_command()
628 utf8 = (conn->proto.smtpc.utf8_supported) && in smtp_perform_mail()
654 if(data->set.str[STRING_MAIL_AUTH] && conn->proto.smtpc.sasl.authused) { in smtp_perform_mail()
668 if((!utf8) && (conn->proto.smtpc.utf8_supported) && in smtp_perform_mail()
725 if(conn->proto.smtpc.size_supported && data->state.infilesize > 0) { in smtp_perform_mail()
738 if(conn->proto.smtpc.utf8_supported && !utf8) { in smtp_perform_mail()
757 result = Curl_pp_sendf(data, &conn->proto.smtpc.pp, in smtp_perform_mail()
802 result = Curl_pp_sendf(data, &conn->proto.smtpc.pp, "RCPT TO:<%s@%s>", in smtp_perform_rcpt_to()
807 result = Curl_pp_sendf(data, &conn->proto.smtpc.pp, "RCPT TO:<%s>", in smtp_perform_rcpt_to()
829 CURLcode result = Curl_pp_sendf(data, &conn->proto.smtpc.pp, "%s", "QUIT"); in smtp_perform_quit()
864 if(data->conn->proto.smtpc.pp.overflow) in smtp_state_starttls_resp()
887 struct smtp_conn *smtpc = &conn->proto.smtpc; in smtp_state_ehlo_resp() local
888 const char *line = Curl_dyn_ptr(&smtpc->pp.recvbuf); in smtp_state_ehlo_resp()
889 size_t len = smtpc->pp.nfinal; in smtp_state_ehlo_resp()
908 smtpc->tls_supported = TRUE; in smtp_state_ehlo_resp()
912 smtpc->size_supported = TRUE; in smtp_state_ehlo_resp()
916 smtpc->utf8_supported = TRUE; in smtp_state_ehlo_resp()
920 smtpc->auth_supported = TRUE; in smtp_state_ehlo_resp()
952 smtpc->sasl.authmechs |= mechbit; in smtp_state_ehlo_resp()
962 if(smtpc->tls_supported) in smtp_state_ehlo_resp()
1010 struct smtp_conn *smtpc = &conn->proto.smtpc; in smtp_state_auth_resp() local
1015 result = Curl_sasl_continue(&smtpc->sasl, data, smtpcode, &progress); in smtp_state_auth_resp()
1038 char *line = Curl_dyn_ptr(&data->conn->proto.smtpc.pp.recvbuf); in smtp_state_command_resp()
1039 size_t len = data->conn->proto.smtpc.pp.nfinal; in smtp_state_command_resp()
1139 result = Curl_pp_sendf(data, &conn->proto.smtpc.pp, "%s", "DATA"); in smtp_state_rcpt_resp()
1199 struct smtp_conn *smtpc = &conn->proto.smtpc; in smtp_statemachine() local
1200 struct pingpong *pp = &smtpc->pp; in smtp_statemachine()
1205 if(smtpc->state == SMTP_UPGRADETLS) in smtp_statemachine()
1219 if(smtpc->state != SMTP_QUIT && smtpcode != 1) in smtp_statemachine()
1226 switch(smtpc->state) { in smtp_statemachine()
1228 result = smtp_state_servergreet_resp(data, smtpcode, smtpc->state); in smtp_statemachine()
1232 result = smtp_state_ehlo_resp(data, conn, smtpcode, smtpc->state); in smtp_statemachine()
1236 result = smtp_state_helo_resp(data, smtpcode, smtpc->state); in smtp_statemachine()
1240 result = smtp_state_starttls_resp(data, smtpcode, smtpc->state); in smtp_statemachine()
1243 if(!result && (smtpc->state == SMTP_UPGRADETLS)) in smtp_statemachine()
1248 result = smtp_state_auth_resp(data, smtpcode, smtpc->state); in smtp_statemachine()
1252 result = smtp_state_command_resp(data, smtpcode, smtpc->state); in smtp_statemachine()
1256 result = smtp_state_mail_resp(data, smtpcode, smtpc->state); in smtp_statemachine()
1260 result = smtp_state_rcpt_resp(data, conn, smtpcode, smtpc->state); in smtp_statemachine()
1264 result = smtp_state_data_resp(data, smtpcode, smtpc->state); in smtp_statemachine()
1268 result = smtp_state_postdata_resp(data, smtpcode, smtpc->state); in smtp_statemachine()
1277 } while(!result && smtpc->state != SMTP_STOP && Curl_pp_moredata(pp)); in smtp_statemachine()
1287 struct smtp_conn *smtpc = &conn->proto.smtpc; in smtp_multi_statemach() local
1289 if((conn->handler->flags & PROTOPT_SSL) && !smtpc->ssldone) { in smtp_multi_statemach()
1292 smtpc->ssldone = ssldone; in smtp_multi_statemach()
1293 if(result || !smtpc->ssldone) in smtp_multi_statemach()
1297 result = Curl_pp_statemach(data, &smtpc->pp, FALSE, FALSE); in smtp_multi_statemach()
1298 *done = (smtpc->state == SMTP_STOP); in smtp_multi_statemach()
1308 struct smtp_conn *smtpc = &conn->proto.smtpc; in smtp_block_statemach() local
1310 while(smtpc->state != SMTP_STOP && !result) in smtp_block_statemach()
1311 result = Curl_pp_statemach(data, &smtpc->pp, TRUE, disconnecting); in smtp_block_statemach()
1334 return Curl_pp_getsock(data, &conn->proto.smtpc.pp, socks); in smtp_getsock()
1351 struct smtp_conn *smtpc = &conn->proto.smtpc; in smtp_connect() local
1352 struct pingpong *pp = &smtpc->pp; in smtp_connect()
1362 Curl_sasl_init(&smtpc->sasl, data, &saslsmtp); in smtp_connect()
1525 struct smtp_conn *smtpc = &conn->proto.smtpc; in smtp_disconnect() local
1538 Curl_pp_disconnect(&smtpc->pp); in smtp_disconnect()
1541 Curl_sasl_cleanup(conn, smtpc->sasl.authused); in smtp_disconnect()
1544 Curl_safefree(smtpc->domain); in smtp_disconnect()
1640 struct smtp_conn *smtpc = &conn->proto.smtpc; in smtp_parse_url_options() local
1656 result = Curl_sasl_parse_url_auth_option(&smtpc->sasl, in smtp_parse_url_options()
1678 struct smtp_conn *smtpc = &conn->proto.smtpc; in smtp_parse_url_path() local
1691 return Curl_urldecode(path, 0, &smtpc->domain, NULL, REJECT_CTRL); in smtp_parse_url_path()