aboutsummaryrefslogtreecommitdiff
path: root/lib/smtp.c
AgeCommit message (Collapse)Author
2011-09-21smtp: without a MAIL_FROM, send blank MAIL FROMGisle Vanem
I think curl should ignore this case and smtp.c should test for this. Since RFC-2821 seems to allow a "null reverse-path". Ref. "MAIL FROM:<>" in section 3.7, page 25.
2011-09-05fix bool variables checking and assignmentYang Tse
2011-09-03fix a bunch of MSVC compiler warningsYang Tse
2011-08-24SMTP authentication: fix ordering of preferred authentication methodSteve Holme
Fixed the order of the preferred SMTP authentication method to: AUTH CRAM-MD5, AUTH LOGIN then AUTH PLAIN. AUTH PLAIN should be the last as it slightly more insecure than AUTH LOGIN as the username and password are sent together - there is no handshaking between the client and server like there is with AUTH LOGIN.
2011-08-24base64: fix Curl_base64_encode and Curl_base64_decode interfacesYang Tse
Previous interfaces for these libcurl internal functions did not allow to tell apart a legitimate zero size result from an error condition. These functions now return a CURLcode indicating function success or otherwise specific error. Output size is returned using a pointer argument. All usage of these two functions, and others closely related, has been adapted to the new interfaces. Relative error and OOM handling adapted or added where missing. Unit test 1302 also adapted.
2011-08-19tcpconnect: follow-up commit after b998d95bDaniel Stenberg
As I modified conn->bits.tcpconnect to become an array that holds one bool for each potential connection all uses of that struct field must index it correctly.
2011-07-26stdio.h, stdlib.h, string.h, stdarg.h and ctype.h inclusion done in setup_once.hYang Tse
2011-05-05RTSP: convert protocol-specific checks to genericDaniel Stenberg
Add a 'readwrite' function to the protocol handler struct and use that for the extra readwrite functionality RTSP needs.
2011-05-05SSL: check for SSL, not specific protocolsDaniel Stenberg
Code cleanup to check less for protocols and more for the specific relevant feature. Like if SSL is required.
2011-04-27source cleanup: unify look, style and indent levelsDaniel Stenberg
By the use of a the new lib/checksrc.pl script that checks that our basic source style rules are followed.
2011-04-21Fix a couple of spelling errors in lib/Fabian Keil
Found with codespell.
2011-04-20CURL_DOES_CONVERSIONS: cleanupDaniel Stenberg
Massively reduce #ifdefs all over (23 #ifdef lines less so far) Moved conversion-specific code to non-ascii.c
2011-04-04http-proxy: move proxy code to http_proxy.cDaniel Stenberg
The new http_proxy.* files now host HTTP proxy specific code (500+ lines moved out from http.c), and as a consequence there is a macro introduced for the Curl_proxyCONNECT() function so that code can use it without actually supporting proxy (or HTTP) in builds.
2011-03-15SMTP-multi: non-blocking connectBen Noordhuis
Use Curl_ssl_connect_nonblocking() when upgrading the connection to TLS/SSL while using the multi interface.
2011-03-15SMTP in multi mode: use Curl_ssl_connect_nonblocking() when connecting.Ben Noordhuis
2011-03-15protocol handler cleanup: SSL awarenessDaniel Stenberg
As a follow-up to commit 8831000bc0: don't assume that the SSL powered protocol alternatives are available.
2011-03-14protocols: use CURLPROTO_ internallyDaniel Stenberg
The PROT_* set of internal defines for the protocols is no longer used. We now use the same bits internally as we have defined in the public header using the CURLPROTO_ prefix. This is for simplicity and because the PROT_* prefix was already used duplicated internally for a set of KRB4 values. The PROTOPT_* defines were moved up to just below the struct definition within which they are used.
2011-03-14protocol handler: added flags fieldDaniel Stenberg
The protocol handler struct got a 'flags' field for special information and characteristics of the given protocol. This now enables us to move away central protocol information such as CLOSEACTION and DUALCHANNEL from single defines in a central place, out to each protocol's definition. It also made us stop abusing the protocol field for other info than the protocol, and we could start cleaning up other protocol-specific things by adding flags bits to set in the handler struct. The "protocol" field connectdata struct was removed as well and the code now refers directly to the conn->handler->protocol field instead. To make things work properly, the code now always store a conn->given pointer that points out the original handler struct so that the code can learn details from the original protocol even if conn->handler is modified along the way - for example when switching to go over a HTTP proxy.
2010-12-22SMTP: add brackets for MAIL FROMBrad Hards
Similar to what is done already for RCPT TO, the code now checks for and adds angle brackets (<>) around the email address that is provided for CURLOPT_MAIL_RCPT unless the app has done so itself.
2010-12-06url: provide dead_connection flag in Curl_handler::disconnectKamil Dudka
It helps to prevent a hangup with some FTP servers in case idle session timeout has exceeded. But it may be useful also for other protocols that send any quit message on disconnect. Currently used by FTP, POP3, IMAP and SMTP.
2010-12-03fix compiler warning: assignment within conditional expressionYang Tse
2010-12-01fix compiler warning: conversion may lose significant bitsYang Tse
2010-11-28atoi: remove atoi usageYang Tse
2010-10-11SMTP: debug output for no known auth mechanisms supportedDaniel Stenberg
... and some minor source code whitespace edits
2010-07-30smtp_connect: always provide host name bufferDaniel Stenberg
Previously the host name buffer was only used if gethostname() exists, but since we converted that into a curl private function that function always exists and will be used so the buffer needs to exist for all cases/systems.
2010-07-30NTLM tests: boost coverage by forcing the hostnameKamil Dudka
A shared library tests/libtest/.libs/lihostname.so is preloaded in NTLM test-cases to override the system implementation of gethostname(). It makes it possible to test the NTLM authentication for exact match, and this way test the implementation of MD4 and DES. If LD_PRELOAD doesn't work, a debug build willl also workk as debug builds are now made to prefer a specific environment variable and will then return that content as host name instead of the actual one. Kamil wrote the bulk of this, Daniel Stenberg polished it.
2010-07-29Changed comparison to match size_t var type.Guenter Knauf
2010-06-18smtp: fixed a few uses of size_t that seemed to believe it was signedDaniel Stenberg
Reported-by: Steven M. Schweda
2010-05-31fix compiler warning: enumerated type mixed with another typeYang Tse
2010-05-31smtp_authenticate: avoid compiler warningsPatrick Monnerat
2010-05-20Fix build warnings.Ben Greear
Signed-off-by: Ben Greear <greearb@candelatech.com>
2010-05-18Fixed a memory leak in the SMTP torture testsDan Fandrich
2010-04-19Remove null-effect leftover code.monnerat
2010-04-19Merge branch 'master' of github.com:bagder/curlmonnerat
2010-04-19Implement SMTP authenticationmonnerat
2010-04-16Curl_setup_transfer: no longer returns anythingDaniel Stenberg
This function could only return CURLE_OK and by changing it to a void instead, we can simplify code all over.
2010-04-02fixed compiler warningsBen Greear
2010-03-29use (s)size_t for string lengths to fix compiler warnsDaniel Stenberg
2010-03-29fix smtp compile warningBen Greear
Use ssize_t instead of int for the Curl_smtp_escape_eob nread argument. Signed-off-by: Ben Greear <greearb@candelatech.com>
2010-03-24remove the CVSish $Id$ linesDaniel Stenberg
2010-03-02- Made the pingpong timeout code properly deal with the response timeout ANDDaniel Stenberg
the global timeout if set. Also, as was reported in the bug report #2956437 by Ryan Chan, the time stamp to use as basis for the per command timeout was not set properly in the DONE phase for FTP (and not for SMTP) so I fixed that just now. This was a regression compared to 7.19.7 due to the conversion of FTP code over to the generic pingpong concepts. http://curl.haxx.se/bug/view.cgi?id=2956437
2010-02-25Fixed a couple of out of memory leaks and a segfault in the SMTP code.Dan Fandrich
2010-02-22_ Adjusted RFC821 HELO fallback and enabled test804Patrick Monnerat
2010-02-22- Proper handling of STARTTLS on SMTP, taking CURLUSESSL_TRY into account.Patrick Monnerat
- SMTP falls back to RFC821 HELO when EHLO fails (and SSL is not required). - Use of true local host name (i.e.: via gethostname()) when available, as default argument to SMTP HELO/EHLO. - Test case 804 for HELO fallback.
2010-02-20- Fixed the SMTP compliance by making sure RCPT TO addresses are specifiedDaniel Stenberg
properly in angle brackets. Recipients provided with CURLOPT_MAIL_RCPT now get angle bracket wrapping automatically by libcurl unless the recipient starts with an angle bracket as then the app is assumed to deal with that properly on its own.
2010-02-20- I made the SMTP code expect a 250 response back from the server after theDaniel Stenberg
full DATA has been sent, and I modified the test SMTP server to also send that response. As usual, the DONE operation that is made after a completed transfer is still not doable in a non-blocking way so this waiting for 250 is unfortunately made blockingly.
2010-02-12- Jack Zhang reported a problem with SMTP: we wrongly used multiple addressesDaniel Stenberg
in the same RCPT TO line, when they should be sent in separate single commands. I updated test case 802 to verify this. - I also fixed a bad use of my_setopt_str() of CURLOPT_MAIL_RCPT in the curl tool which made it try to output it as string for the --libcurl feature which could lead to crashes.
2010-01-25make Curl_handler_*_proxy definition staticYang Tse
2009-12-31turned CURLOPT_MAIL_RCPT into a curl_slist list instead to support multipleDaniel Stenberg
receivers, and made the command line tool thus support the option specified many times
2009-12-30modified to get the EHLO domain from the path part of the URL instead of theDaniel Stenberg
user name