aboutsummaryrefslogtreecommitdiff
path: root/lib/smtp.c
AgeCommit message (Collapse)Author
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
2013-05-04smtp: Fix compilation warningSteve Holme
comparison between signed and unsigned integer expressions
2013-05-04smtp: Updated RFC-2821 references to RFC-5321Steve Holme
2013-05-04smtp: Fixed sending of double CRLF caused by first in EOBSteve Holme
If the mail sent during the transfer contains a terminating <CRLF> then we should not send the first <CRLF> of the EOB as specified in RFC-5321. Additionally don't send the <CRLF> if there is "no mail data" as the DATA command already includes it.
2013-04-30smtp: Tidy up to move the eob counter to the per-request structureSteve Holme
Move the eob counter from the smtp_conn structure to the SMTP structure as it is associated with a SMTP payload on a per-request basis.
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.