aboutsummaryrefslogtreecommitdiff
path: root/lib/smtp.c
AgeCommit message (Collapse)Author
2013-04-29smtp: Fixed unknown percentage complete in progress barSteve Holme
The curl command line utility would display the the completed progress bar with a percentage of zero as the progress routines didn't know the size of the transfer.
2013-04-28email: Tidy up of *_perform_authenticate()Steve Holme
Removed the hard returns from imap and pop3 by using the same style for sending the authentication string as smtp. Moved the "Other mechanisms not supported" check in smtp to match that of imap and pop3 to provide consistency between the three email protocols.
2013-04-28smtp: Updated limit check to be more readable like the check in pop3Steve Holme
2013-04-27smtp: Added support for disabling the SASL initial responseSteve Holme
Updated the default behaviour of sending the client's initial response in the AUTH command to not send it and added support for CURLOPT_SASL_IR to allow the user to specify including the response. Related Bug: http://curl.haxx.se/mail/lib-2012-03/0114.html Reported-by: Gokhan Sengun
2013-04-16smtp: Re-factored all perform based functionsSteve Holme
Standardised the naming of all perform based functions to be in the form smtp_perform_something().
2013-04-16smtp: Added description comments to all perform based functionsSteve Holme
2013-04-16smtp: Moved smtp_quit() to be with the other perform functionsSteve Holme
2013-04-16smtp: Moved smtp_rcpt_to() to be with the other perform functionsSteve Holme
2013-04-16smtp: Moved smtp_mail() to be with the other perform functionsSteve Holme
2013-04-15smtp: Updated the coding style of smtp_state_servergreet_resp()Steve Holme
Updated the coding style, in this function, to be consistant with other response functions rather then performing a hard return on failure.
2013-04-13smtp: Added support for ;auth=<mech> in the URLSteve Holme
Added support for specifying the preferred authentication mechanism in the URL as per Internet-Draft 'draft-earhart-url-smtp-00'.
2013-04-13smtp: Fix compiler warningSteve Holme
warning: unused variable 'smtp' introduced in commit 73cbd21b5ee6.
2013-04-12smtp: Moved parsing of url path into separate functionSteve Holme
2013-03-09email: Removed hard returns from init functionsSteve Holme
2013-03-09email: Updated the function descriptions for the logout / quit functionsSteve Holme
Updated the function description comments following commit 4838d196fdbf.
2013-03-09email: Simplified the logout / quit functionsSteve Holme
Moved the blocking state machine to the disconnect functions so that the logout / quit functions are only responsible for sending the actual command needed to logout or quit. Additionally removed the hard return on failure.
2013-03-08email: Tidied up the *_regular_transfer() functionsSteve Holme
Added comments and simplified convoluted dophase_done comparison.
2013-03-08email: Simplified nesting of if statements in *_doing() functionsSteve Holme
2013-03-07email: Minor code tidy up following recent changesSteve Holme
Removed unwanted braces and added variable initialisation.
2013-03-07email: Optimised block_statemach() functionsSteve Holme
Optimised the result test in each of the block_statemach() functions.
2013-03-03smtp: Updated the coding style for state changes after a send operationSteve Holme
Some state changes would be performed after a failure test that performed a hard return, whilst others would be performed within a test for success. Updated the code, for consistency, so all instances are performed within a success test.
2013-02-28pop3 / smtp: Small comment tidy upSteve Holme
Small tidy up to keep some comments consistant across each of the email protocols.
2013-02-28smtp: Corrected debug message for POP3_AUTH_FINAL constantSteve Holme
Following commit ad3177da24b8 corrected the debug message in state() from AUTH to AUTH_FINAL.
2013-02-27smtp: Re-factored the final SMTP_AUTH constantSteve Holme
Changed the final SMTP_AUTH constant to SMTP_AUTH_FINAL for consistency with the response function.
2013-02-26Remove unused variable in smtp_state_data_resp()Linus Nielsen Feltzing
2013-02-25email: Small tidy up following recent changesSteve Holme
2013-02-25smtp: Removed bytecountp from the per-request structureSteve Holme
Removed this pointer to a downloaded bytes counter because it was set in smtp_init() to point to the same variable the transfer functions keep the count in (k->bytecount), effectively making the code in transfer.c "*k->bytecountp = k->bytecount" a no-op.
2013-02-23email: Additional tidy up of comments following recent changesSteve Holme
2013-02-23smtp: Removed some FTP heritage leftoversSteve Holme
Removed user and passwd from the SMTP struct as these cannot be set on a per-request basis and are leftover from legacy FTP code. Changed some comments still using FTP terminology.
2013-02-23smtp: Moved the per-request variables to the per-request data structureSteve Holme
Moved the rcpt variable from the per-connection struct smtp_conn to the new per-request struct and fixed references accordingly.
2013-02-23pop3: Introduced a custom SMTP structure for per-request dataSteve Holme
Created a new SMTP structure and changed the type of the smtp proto variable in connectdata from FTP* to SMTP*.
2013-02-23email: Minor tidy up following IMAP changesSteve Holme
2013-02-19smtp.c: fix enumerated type mixed with another typeYang Tse
2013-02-16email: Tidied up result code variablesSteve Holme
Tidied up result variables to be consistent in name, declaration order and default values.
2013-02-16email: Removed unnecessary forward declarationSteve Holme
Due to the reordering of functions in commit 586f5d361474 the forward declaration to state_upgrade_tls() are no longer required.
2013-02-15rename "easy" statemachines: call them block insteadDaniel Stenberg
... since they're not used by the easy interface really, I wanted to remove the association. Also, I unified the pingpong statemachine driver into a single function with a 'wait' argument: Curl_pp_statemach.
2013-02-14smtp.c: Fixed a trailing whitespaceSteve Holme
Remove tailing whitespace introduced in commit 7ed689d24a4e.
2013-02-14smtp: Refactored the smtp_state_auth_resp() functionSteve Holme
Renamed smtp_state_auth_resp() function to match the implementations in IMAP and POP3.
2013-02-13email: Tidy up before additional IMAP workSteve Holme
Replaced two explicit comparisons of CURLE_OK with boolean alternatives. General tidy up of comments.
2013-02-13smtp: Removed duplicate pingpong structure initialisationSteve Holme
The smtp_connect() function was setting the member variables of the pingpong structure twice, once before calling Curl_pp_init() and once after!
2013-02-12email: Post optimisation of endofresp() tidy upSteve Holme
Removed unnecessary end of line check and return.
2013-02-12pingpong: Optimised the endofresp() functionSteve Holme
Reworked the pp->endofresp() function so that the conndata, line and line length are passed down to it just as with Curl_client_write() rather than each implementation of the function having to query these values. Additionally changed the int return type to bool as this is more representative of the function's usage.
2013-02-11email: Post STARTLS capability code tidy up (Part Three)Steve Holme
Corrected the order of the upgrade_tls() functions and moved the handler upgrade and getsock() functions out from the middle of the state related functions.
2013-02-10smtp: Added support for the STARTTLS capability (Part Two)Steve Holme
Added honoring of the tls_supported flag when starting a TLS upgrade rather than unconditionally attempting it. If the use_ssl flag is set to CURLUSESSL_TRY and the server doesn't support TLS upgrades then the connection will continue to authenticate. If this flag is set to CURLUSESSL_ALL then the connection will complete with a failure as it did previously.
2013-02-10smtp: Added support for the STLS capability (Part One)Steve Holme
Introduced detection of the STARTTLS capability, in order to add support for TLS upgrades without unconditionally sending the STARTTLS command.
2013-02-09smtp: Fixed an issue when processing EHLO failure responses (Part 3)Steve Holme
Follow up fix to commit 62bd21746443 to cater for servers that don't respond with a 250 in their EHLO responses. Additionally updated the SMTP tests to respond with a 250 response code as per RFC5321.
2013-02-09smtp: Fixed an issue when processing EHLO failure responses (Part 2)Steve Holme
Follow up fix to commit 23d17190ee32 as EHLO capabilities can exist within a positive response line.
2013-02-09smtp: Fixed an issue with missing capabilities after the AUTH lineSteve Holme
Follow up to commit 40f9bb787f05 to fix missing capabilities after an AUTH line.
2013-02-09smtp: Fixed an issue when processing EHLO failure responsesSteve Holme
Fixed a small issue where smtp_endofresp() would look for capabilities in the description part of a failure response. In theory a server shouldn't respond with SIZE or AUTH in an EHLO command's failure response but if it did then capabilities would be unnecessarily set before eventually failing.
2013-02-08smtp: Reworked smtp_endofresp() to allow for extra capability detectionSteve Holme