aboutsummaryrefslogtreecommitdiff
path: root/lib/smtp.c
AgeCommit message (Collapse)Author
2014-04-05sasl: Combined DIGEST-MD5 message decoding and generationSteve Holme
2014-04-01smtp: Fixed login denied with a RFC-821 based serverSteve Holme
In addition to commit fe260b75e7 fixed the same issue for RFC-821 based SMTP servers and allow the credientials to be given to curl even though they are not used with the server.
2014-03-28smtp: Fixed login denied when server doesn't support AUTH capabilitySteve Holme
Specifying user credentials when the SMTP server doesn't support authentication would cause curl to display "No known authentication mechanisms supported!" and return CURLE_LOGIN_DENIED. Reported-by: Tom Sparrow Bug: http://curl.haxx.se/mail/lib-2014-03/0173.html
2013-12-31mprintf: Replaced internal usage of FORMAT_OFF_T and FORMAT_OFF_TUSteve Holme
Following commit 0aafd77fa4c6f2, replaced the internal usage of FORMAT_OFF_T and FORMAT_OFF_TU with the external versions that we expect API programmers to use. This negates the need for separate definitions which were subtly different under different platforms/compilers.
2013-12-22email: Fixed segfault introduced in commit 195b63f99c2fe3Steve Holme
2013-12-22code police: fix indent level to silence checksrc complaintsDaniel Stenberg
2013-12-21email: Extended the login options to support multiple auth mechanismsSteve Holme
2013-12-20vtls: renamed sslgen.[ch] to vtls.[ch]Daniel Stenberg
2013-12-20vtls: created subdir, moved sslgen.[ch] there, updated all include linesDaniel Stenberg
2013-12-18imap/pop3/smtp: Added support for SASL authentication downgradesSteve Holme
Added support for downgrading the SASL authentication mechanism when the decoding of CRAM-MD5, DIGEST-MD5 and NTLM messages fails. This enhances the previously added support for graceful cancellation by allowing the client to retry a lesser SASL mechanism such as LOGIN or PLAIN, or even APOP / clear text (in the case of POP3 and IMAP) when supported by the server.
2013-12-18smtp: fix compiler warningDaniel Stenberg
smtp.c:478:21: error: unused variable 'smtpc' [-Werror=unused-variable]
2013-12-18smtp: Moved the calculation of SASL login details into a separate functionSteve Holme
2013-12-18smtp: Moved the sending of the AUTH command into a separate functionSteve Holme
2013-12-17email: Renamed *_perform_authenticate() functionsSteve Holme
In preparation for the upcoming SASL downgrade feature renamed the imap__perform_authenticate(), pop3__perform_authenticate() and smtp__perform_authenticate() functions.
2013-11-23smtp: Post SMTP command expansion tidy upSteve Holme
Removed unnecessary SMTP_STOP state changes on failure. Removed hard return on failure in smtp_state_data_resp().
2013-11-17smtp: Fixed space being sent in non --mail-rcpt based requestsSteve Holme
Commands such as NOOP, RSET and HELP would be sent with a space at the end of the command, for example: "NOOP ".
2013-11-17smtp: Changed the default command to HELP when no options are specifiedSteve Holme
Otherwise a NOOP operation would be performed which a) only returns a single line response and not a multiline response where -I needs to be used, and b) provides an inconsistent user experience compared to that of the POP3 and IMAP protocols.
2013-11-17smtp:Fixed memory leak from commit dac01ff6d788b2Steve Holme
The buffer allocated by smtp_parse_custom_request() was not freed.
2013-11-15smtp: Fixed broken RCPT TO from commit 0ea4a80bb23666Steve Holme
2013-11-15smtp_state_mail_resp: removed unused variable 'smtp'Daniel Stenberg
2013-11-15smtp: Simplified the next RCPT TO logicSteve Holme
2013-11-15smtp.c: Fixed trailing whitespaceSteve Holme
2013-11-15smtp: Added support for VRFY and EXPN commandsSteve Holme
2013-11-15smtp: Added support for NOOP and RSET commandsSteve Holme
2013-11-15smtp: Fixed handling of multiline server greeting responsesSteve Holme
Incorrectly processed multiline server greeting responses as "wanted" continue responses in smtp_endofresp(), from commit f16c0de4e9bbe3, which in turn broke the SMTP server detection in the test suite, because the EHLO command would not be sent.
2013-11-15smtp.c: Fixed compilation error from commit f16c0de4e9bbe3Steve Holme
warning: unused variable 'smtpc'
2013-11-15smtp: Fixed processing of more than one response when sent in same packetSteve Holme
Added a loop to smtp_statemach_act() in which Curl_pp_readresp() is called until the cache is drained. Without this multiple responses received in a single packet could result in a hang or delay.
2013-11-15smtp: Moved EHLO response handling to smtp_state_ehlo_resp()Steve Holme
Similar to the processing of untagged CAPABILITY responses in IMAP moved the processing of multiline EHLO responses to smtp_state_ehlo_resp() and introduced an internal response code of one to differentiate a multiline continuation from the end of command. This also allows for the separate processing of multiline responses from commands such as VRFY and EXPN.
2013-10-30email: Corrected a couple of typos from commit aa0eaef4838ccdSteve Holme
2013-10-30email: Post graceful SASL authentication cancellation tidy upSteve Holme
2013-10-27email: Added support for cancelling NTLM authenticationSteve Holme
2013-10-27email: Added support for cancelling DIGEST-MD5 authenticationSteve Holme
2013-10-27email: Corrected a couple of typos from 1e39b95682781fSteve Holme
2013-10-27email: Added support for canceling CRAM-MD5 authenticationSteve Holme
2013-10-27email: Added initial support for cancelling authenticationSteve Holme
Should a client application fail to decode an authentication message received from a server, or not support any of the parameters given by the server in the message, then the authentication phrase should be cancelled gracefully by the client rather than simply terminating the connection. The authentication phrase should be cancelled by simply sending a '*' to the server, in response to erroneous data being received, as per RFC-3501, RFC-4954 and RFC-5034. This patch adds the necessary state machine constants and appropriate response handlers in order to add this functionality for the CRAM-MD5, DIGEST-MD5 and NTLM authentication mechanisms.
2013-10-27email: Moved authentication message parsing into a separate functionSteve Holme
...in preparation for upcoming modifications.
2013-10-26email: Added references to SASL LOGIN authentication draft proposalSteve Holme
2013-10-26smtp: Fixed response code parsing for bad AUTH continuation responsesSteve Holme
This workaround had been previously been implemented for IMAP and POP3 but not SMTP. Some of the recent test case additions implemented this behaviour to emulate a bad server and the SMTP code didn't cope with it.
2013-10-18email: Fixed QUIT / LOGOUT being sent when SSL connect failsSteve Holme
2013-09-24sasl: Centralised the authentication mechanism stringsSteve Holme
Moved the standard SASL mechanism strings into curl_sasl.h rather than hard coding the same values over and over again in the protocols that use SASL authentication. For more information about the mechanism strings see: http://www.iana.org/assignments/sasl-mechanisms
2013-09-10imap/pop3/smtp: Speed up SSL connection initializationJiri Hruska
Don't wait for the next callback call (usually 1 second) before continuing with protocol specific connection initialization.
2013-09-04SASL: fix compiler warningsDaniel Stenberg
comparison between signed and unsigned integer expressions suggest parentheses around '&&' within '||' (twice)
2013-09-04imap/smtp: Fixed incorrect SASL mechanism selection with XOAUTH2 serversSteve Holme
XOAUTH2 would be selected in preference to LOGIN and PLAIN if the IMAP or SMTP server advertised support for it even though a user's password was supplied but bearer token wasn't. Modified the selection logic so that XOAUTH2 will only be selected if the server supports it and A) The curl user/libcurl programmer has specifically asked for XOAUTH via the ;AUTH=XOAUTH login option or 2) The bearer token is specified. Obviously if XOAUTH is asked for via the login option but no token is specified the user will receive a authentication failure which makes more sense than no known authentication mechanisms supported!
2013-08-26smtp: added basic SASL XOAUTH2 supportKyle L. Huff
Added the ability to use an XOAUTH2 bearer token [RFC6750] with SMTP for authentication using RFC6749 "OAuth 2.0 Authorization Framework". The bearer token is expected to be valid for the user specified in conn->user. If CURLOPT_XOAUTH2_BEARER is defined and the connection has an advertised auth mechanism of "XOAUTH2", the user and access token are formatted as a base64 encoded string and sent to the server as "AUTH XOAUTH2 <bearer token>".
2013-08-12SessionHandle: the protocol specific pointer is now a void *Daniel Stenberg
All protocol handler structs are now opaque (void *) in the SessionHandle struct and moved in the request-specific sub-struct 'SingleRequest'. The intension is to keep the protocol specific knowledge in their own dedicated source files [protocol].c etc. There's some "leakage" where this policy is violated, to be addressed at a later point in time.
2013-08-12urldata: clean up the use of the protocol specific structsDaniel Stenberg
1 - always allocate the struct in protocol->setup_connection. Some protocol handlers had to get this function added. 2 - always free at the end of a request. This is also an attempt to keep less memory in the handle after it is completed.
2013-08-09comments: remove old and wrong multi/easy interface statementsDaniel Stenberg
2013-07-24string formatting: fix zero-length printf format stringYang Tse
2013-07-24string formatting: fix 25+ printf-style format stringsYang Tse
2013-05-04smtp: Fix trailing whitespace warningSteve Holme