SMTP with NTLM AUTH

2011-07-23 Thread Steve Holme
Hi all, I've just joined the mailing lists as I would like to contribute some changes I've been making to the v7.21.7 source back to the community for inclusion in future versions. I recently started using libcurl for communicating with my mail server and whilst I was able to successfully talk

Re: SMTP with NTLM AUTH

2011-07-26 Thread Steve Holme
On Tue, 26 Jul 2011, Daniel Stenberg wrote: Oh yes, they sound like they certainly would be appreciated! Cheers Daniel, Personally, I've found that I like doing it like this: Thanks for the tips, I will hopefully be able make my changes in a branch tomorrow and all being well post some

[PATCH] Added AUTH NTLM for SMTP (Part 2)

2011-08-02 Thread Steve Holme
Dear all, Following on from my email on Friday, I have now updated http_ntlm to use the new NTLM module that I added. This code does not touch the new Single Sign On functionality as only Curl_input_ntlm() and Curl_output_ntlm() have been modified and not the SSO functions. All other NTLM

RE: [PATCH] Added AUTH NTLM for SMTP (Part 2)

2011-08-05 Thread Steve Holme
Hi Yang, On Thu, 4 Aug 2011, Yang Tse wrote: Could you provide a single consolidated patch rebased at tonight's git ? Taking in account that ... No problem. I have updated my branch with your suggestions and am able to provide a consolidated patch as requested. However, I am still getting

RE: [PATCH] Added AUTH NTLM for SMTP (Part 2)

2011-08-05 Thread Steve Holme
On Fri, 5 Aug 2011, Michael Wood wrote: I've not used TortoiseGit, so I'm not sure exactly what you're doing. Basically, you should be doing a git fetch (or git fetch origin master) to update the origin/master remote branch to the latest version. Then you should rebase your current branch

RE: [PATCH] Added AUTH NTLM for SMTP (Part 2)

2011-08-05 Thread Steve Holme
On Fri, 5 Aug 2011, Michael Wood wrote: Yes, merging the commits... I'm not sure what the best way is to do that. I finally got there but unfortunately I had just finished the rebase before I received your email about the squash ;-) I then ran in issues of trying to produce a single patch

RE: [PATCH] Added AUTH NTLM for SMTP

2011-08-08 Thread Steve Holme
Hi, On Mon, 8 Aug 2011, Yang Tse wrote: In order to properly integrate all this with existing code I would appreciate if we did all this actually in three different steps. First one, patch existing code with changes that you deem necessary. I guess this would involve the changes to curl.h,

RE: [PATCH] Added AUTH NTLM for SMTP

2011-08-08 Thread Steve Holme
Hi Yang, On Mon, 8 Aug 2011, Yang Tse wrote: No. With this I meant changes to http_ntlm.c and http_ntlm.h that your patch seems to introduce, that I suppose you deem necessary for NTLM correctness or convinience and that can be performed on existing code without the need to moving it out of

RE: [PATCH] Added AUTH NTLM for SMTP

2011-08-08 Thread Steve Holme
On Mon, 8 Aug 2011, Yang Tse wrote: i.e... In http_ntlm.c [..] All of the above can merrily be done in a first patch of the first step, which won't disturb existing functionality. You know my code better than I do - But then it is a good three weeks or so since I wrote most of this ;-)

RE: [PATCH] Added AUTH NTLM for SMTP

2011-08-08 Thread Steve Holme
Hi all, On Mon, 8 Aug 2011, Daniel Stenberg wrote: Not really, most changes people contribute with are much smaller. I do want to stress that none of us ask you this to be annoying or hard to work with. We do this in the interest of getting the changes into the project in the best possible

RE: [PATCH] Added AUTH NTLM for SMTP

2011-08-09 Thread Steve Holme
Hi Yang, On Mon, 8 Aug 2011, Yang Tse wrote: i.e... In http_ntlm.c I have attached my first patch, which implements most of what you outlined (and a few other format issues that I found) tiding up the existing code in the http_ntlm module. Kind Regards Steve

RE: [PATCH] Added AUTH NTLM for SMTP

2011-08-09 Thread Steve Holme
Hiya, On Tues, 9 Aug 2011, Yang Tse wrote: I have attached my first patch, which implements most of what you outlined (and a few other format issues that I found) tiding up the existing code in the http_ntlm module. Pushed right now by followed by another one to fix some nits. TAB

[PATCH] Curl_gethostname() may or may not return the hostname as a FQDN

2011-08-10 Thread Steve Holme
Dear all, During my work of adding AUTH NTLM to the SMTP module I noticed that the FQDN of the local machine is not necessarily being sent in the HELO and EHLO commands as it should. After debugging I realised that Curl_gethostname() was simply returning the local machine's name and not it's

RE: [PATCH] Added AUTH NTLM for SMTP

2011-08-10 Thread Steve Holme
Hi again, On Wed, 10 Aug 2011, Yang Tse wrote: I'll skim over this patch to see if I have further comments. But I would really prefer that the stuff related to the yet required tiding up that you are mentioning is provided before the actual refactoring. It was just the odd space and stuff

RE: [PATCH] Added AUTH NTLM for SMTP

2011-08-10 Thread Steve Holme
Hi Yang, On Wed, 10 Aug 2011, Steve Holme wrote: I'll have a go at this this evening - as this should be do-able by introducing a new variable but I must admit I wasn't too sure what your preference would be here. Please find attached another patch file which contains the following

RE: [PATCH] Curl_gethostname() may or may not return the hostname as a FQDN

2011-08-11 Thread Steve Holme
Hi Daniel, On Thu, 11 Aug 2011, Steve Holme wrote: Ok, yes I can see how this is necessary for some uses of this function. I would however suggest that we add an option to the function so that we don't spend time to lookup the full name, possibly using a slow DNS server, only to have

RE: [PATCH] Added AUTH NTLM for SMTP

2011-08-11 Thread Steve Holme
Hi Yang, Sorry I didn't see your email before my patch today - but for some reason Outlook put you in my junk folder :( Pushed your last patch with a couple of edits. Sync with github repo. Cheers . Current interface of Curl_base64_encode and Curl_base64_decode have a slight glitch in a

RE: [PATCH] Added AUTH NTLM for SMTP

2011-08-21 Thread Steve Holme
Hi Yang, There's no real need for you to generate an additional patch, I can manage from this point without it. But of course you can provide it if you wish so ;-) Many thanks - it is much appreciated. I spent just over 2 days (about 20 hours) writing the original modification to Libcurl and

RE: [PATCH] Curl_gethostname() may or may not return the hostname as a FQDN

2011-08-21 Thread Steve Holme
Hiya Daniel, (sorry for the major delay) No problem - I assumed you were busy with more important Curl matters / have a personal life ;-) Argh, that's correct. We don't have anything in libcurl before this that needs that feature. I wonder how large percentage of use cases this will work

RE: [PATCH] Added AUTH NTLM for SMTP

2011-08-22 Thread Steve Holme
Hi Yang, We really appreciate your efforts and time in the same way we You're welcome :) do with ours, with the added responsibility, efforts and time, on our side of trying not to break existing code and functionality when new features, or important changes, are introduced in order to

[PATCH] SMTP Modifications

2011-08-22 Thread Steve Holme
Dear all, In preparation of adding NTLM support and other features to SMTP I have enclosed a preliminary patch to performs the following: * Modify the order of the preferred authentication method to: AUTH CRAM-MD5, AUTH LOGIN then AUTH PLAIN. AUTH PLAIN should be the last as it is less secure

RE: [PATCH] SMTP Modifications

2011-08-24 Thread Steve Holme
Hiya, Fix for SMTP proper ordering of authentication method pushed now to master. Cool (Thank you) - I'll crack on the AUTH initial response next ;-) S. --- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette:

RE: [PATCH] SMTP Modifications

2011-08-24 Thread Steve Holme
Dear all, Please find attached my next modification for the SMTP protocol - which adds the ability to specify whether authenticated connections (AUTH PLAIN and AUTH LOGIN) send the initial response in the AUTH command or in the next command. This can be set via the CURLOPT_MAIL_SINGLE_AUTH option

RE: Linker errors when statically compiled linking libcurl+openssl to my project

2011-08-25 Thread Steve Holme
Hi, I am trying to statically link libcurl (with SSL) into my project but I am encountering lots of linker errors: ../lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0xa9c): undefined reference to `CreateDCA@16' ../lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0xaa9): undefined reference to

RE: RE: Linker errors when statically compiled linking libcurl+openssl to my project

2011-08-25 Thread Steve Holme
Hiya, ws2_32.lib was already linked, I added  gdi32.lib. Errors decreased. The following remain ../lib/librtmp.a(rtmp.o):rtmp.c:(.text+0x1b3b): undefined reference to `inet_addr@4' ../lib/librtmp.a(rtmp.o):rtmp.c:(.text+0x732c): undefined reference to `htonl@4'

RE: [PATCH] SMTP Modifications

2011-08-25 Thread Steve Holme
Hi, It seems to me that you want to provide the capability of _not_ sending the 'client initial response' in the AUTH command in order to allow interoperability with servers that support the AUTH extension but that don't tolerate the optional client initial response argument. Exactly that.

RE: [PATCH] SMTP Modifications

2011-08-25 Thread Steve Holme
Hi Dan, As I brought up in March when this first came up, since SMTP uses SASL for authentication, I suggest renaming these to something like CURL_SASL_AUTH_x so that they can be used for other SASL-using protocols in the future. I totally agree but can the optional initial response flag be

RE: [PATCH] SMTP Modifications

2011-08-25 Thread Steve Holme
Hi all, Patch requested today should show that there's little left. But functionality this patch would provide already existed in first patches provided Jul-29 and Aug-02 by Steve. Given that this, potentially, is part of much larger work would it be best to leave this until v7.22.1, along

RE: RE: RE: RE: Linker errors when statically compiled linking libcurl+openssl to my project

2011-08-25 Thread Steve Holme
Hiya, Can you add -winmm and see if that decreases the number of errors by 1? If    not, then there is something else going wrong (as the unresolved externals   for ws2_32 have got me baffled at the minute)! Looks like this changes nothing :( Mmmm very strange. I must admit I don't include

RE: [PATCH] SMTP Modifications

2011-08-25 Thread Steve Holme
Ha, ha left out ther references in previous message, I thought I was going mad for a minute as I couldn't see them in your previous message ;-) S. --- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette:

RE: [PATCH] SMTP Modifications

2011-08-25 Thread Steve Holme
Hi Yang, In order to consider that work complete, it would be convenient to better integrate samba's winbind daemon auth helper implementation when used. Steve now that you are more familiar with git these changes/fixes might disturb your work less. No worries. I have enclosed a patch

RE: [PATCH] SMTP Modifications

2011-08-26 Thread Steve Holme
Hi Yang, Actually smtp_auth_ntlm() in this patch should not have the outlen parameter. The outlen parameter is used in smtp_authenticate() when calculating if the buffer is within length. This is how all the smtp_auth* functions work. It would be more clear if 'msg-typeX' or something were

RE: [PATCH] Curl_gethostname() may or may not return the hostname as a FQDN

2011-08-29 Thread Steve Holme
Hi Daniel, Argh, that's correct. We don't have anything in libcurl before this If we decide not to modify Curl_resolv()'s underlying functions then I would still recommend we modify the output of Curl_gethostname() so it returns a defined value I don't know if you had any more thoughts

RE: High Performance Libcurl Tips

2011-08-29 Thread Steve Holme
Hi Daniel, I know I'm still relatively new to libcurl but I thought I would read the article to see if I could give any useful input and see if there was anything Windows specific that I could help with. Issue 4 sounds like a c-ares bug, although I've not had it reported and on Linux I cannot

RE: [PATCH] SMTP Modifications

2011-08-31 Thread Steve Holme
Hi Yang, How would you like me to proceed with this, [...] You will surely have noticed that the NTLM code has been reorganized into something which will better resist future expansion and reuse. I did see all your refactoring efforts over the weekend - you were certainly busy ;-) I

RE: [PATCH] Curl_gethostname() may or may not return the hostname as a FQDN

2011-09-13 Thread Steve Holme
you want me to re-submit it against the latest codebase? Many thanks in advance Regards Steve -Original Message- From: curl-library-boun...@cool.haxx.se [mailto:curl-library-boun...@cool.haxx.se] On Behalf Of Steve Holme Sent: 29 August 2011 6:29 PM To: 'libcurl development' Subject: RE

RE: [PATCH] Curl_gethostname() may or may not return the hostname as a FQDN

2011-09-13 Thread Steve Holme
Hi Daniel, First, thanks for bringing it back. I had pushed it a bit too far away in my brain to bring it back on my own! No problem ;-) I think making it behave consistently makes sense so please rebase the patch and resubmit it and let's get it merged. No worries - Just downloading

RE: [PATCH] Curl_gethostname() may or may not return the hostname as a FQDN

2011-09-13 Thread Steve Holme
Hi again, smtp://server address:port number/hostname Yes please! =) (and yes, that's the syntax as I recall it) I've just tested it against my Exchange Server and looking in the log files I got the EHLO as I expected so the format is as we both believe ;-) Kind Regards Steve

RE: [PATCH] Curl_gethostname() may or may not return the hostname as a FQDN

2011-09-13 Thread Steve Holme
Hi Daniel, I think making it behave consistently makes sense so please rebase the patch and resubmit it and let's get it merged. No worries - Just downloading v7.22.0 source from GIT as we speak. Please find attached an up to date patch based on tonight's source (v7.22.1 dev tree). Kind

RE: [PATCH] Curl_gethostname() may or may not return the hostname as a FQDN

2011-09-17 Thread Steve Holme
Hi Daniel, Possibly a new section to add to libcurl.3 ? Indeed - Is this something you would like me to do? Yes please! =) (and yes, that's the syntax as I recall it) I've been looking at the documentation and have been wondering where would be the best place to place information

RE: [PATCH] Curl_gethostname() may or may not return the hostname as a FQDN

2011-09-18 Thread Steve Holme
Hi Guys, The man pages are done in the nroff format, and that's a mighty weird format. I edit those in my favourite text editor, but the syntax is weird and I suggest you just copy and paste from other pages/sections. See also: http://www.quut.com/berlin/ms/troff.html

RE: [PATCH] Curl_gethostname() may or may not return the hostname as a FQDN

2011-09-18 Thread Steve Holme
Hi Daniel, I've had an interesting couple of hours writing content for the man pages and as such have attached the appropriate patch :) Thanks a lot! You're welcome... I've committed it even if I changed some minor things (mostly removing the references to the internal function names

RE: [PATCH] Curl_gethostname() may or may not return the hostname as a FQDN

2011-09-19 Thread Steve Holme
Hi Daniel, I want to provide a follow up patch that will: * Move HOSTNAME_MAX into Curl_gethostname.h as there are definitions for this in Curl_gethostname.c and Curl_ntlm_msg.c * Modify smtp.c to use HOSTNAME_MAX rather than hardcoding it to 1024 (which happens to be the same length as

RE: examples compiler warnings

2011-09-22 Thread Steve Holme
Hi Guenter, the other *_err_long warnings with MinGW64 might be because surprisingly sizeog(long) is 4 instead of 8 ... I'm not sure if I've missed something but isn't the sizeof a long on Windows 4 bytes even under 64-bit? I know this is different to some Linux environments but (and I don't

RE: [PATCH] Curl_gethostname() may or may not return the hostname as a FQDN

2011-09-22 Thread Steve Holme
Hi Daniel, I've committed it even if I changed some minor things (mostly removing the references to the internal function names for the name resolving as I don't think it matters to users what exact internal function calls we use for it). ... I can update the document again if need

RE: [PATCH] Curl_gethostname() may or may not return the hostname as a FQDN

2011-09-26 Thread Steve Holme
Hi Daniel, * The first one adds support of HOSTNAME_MAX to smtp.c * The second moves HOSTNAME_MAX into curl_gethostname.h * The first tidies up the use of Curl_gethostname() into ntlm_msgs.c Thanks, they've all been pushed now. Cool - thank you. Let me also just point out that for the

[PATCH] smtp_mail: Added support to MAIL FROM for the optional SIZE parameter

2011-09-26 Thread Steve Holme
Dear all, I have modified smtp_mail() to support the optional SIZE parameter that may be included in a MAIL FROM command. This was performed against this morning's baseline and tested against my Exchange server. To include the SIZE parameter in the MAIL FROM simply set the size via

RE: [PATCH] smtp_mail: Added support to MAIL FROM for the optional SIZE parameter

2011-09-30 Thread Steve Holme
Morning Daniel, I have modified smtp_mail() to support the optional SIZE parameter that may be included in a MAIL FROM command. the size via CURLOPT_INFILESIZE. Looks fine and simple enough. I'll push it. Thank you. I also noticed that you fixed a memory leak I had introduced. Sorry

RE: [PATCH] Added support for NTLM authentication to SMTP

2011-10-03 Thread Steve Holme
Hi Daniel, Please find attached three patches which ultimately add NTLM authorisation support to SMTP. This carries on the work I was involved with during July and August but unfortunately ran out of time on to complete for the v7.22.0 release. Thanks a lot! I've pushed your

[PATCH] smtp_mail: Added support to MAIL FROM for the optional AUTH parameter

2011-10-05 Thread Steve Holme
Dear all, Please find attached a patch that adds support for the optional AUTH parameter to the SMTP MAIL FROM command. In order to support this functionality I have had to add a new CURLOPT_MAIL_AUTH option in curl.h as well as the associated string in urldata.h and url.c. I have modified the

RE: Please advise on how to improve libcurl HTTP GET performance

2011-10-10 Thread Steve Holme
Hi Alex, 2) I didn't try telnet, but both Opera and console CURL tool download the very same page at ~300 KB/s, which is much closer to my actual net speed. Just a reminder: libcurl gives me 25-40 KB/s. It is worth noting that CURL uses libcurl internally so I would expect the same

RE: [PATCH] smtp_mail: Added support to MAIL FROM for the optional AUTH parameter

2011-10-15 Thread Steve Holme
Hi Daniel, Coming back to an old thread I have in my backlog. Sorry for the massive delay. No problem - I understand you've been on holiday for the last week so I can imagine you've got a tonne of email waiting for you. Hope you had a good week btw. Daniel: Do you want me to update the

RE: SMTP Performance of cUrl

2011-10-18 Thread Steve Holme
Hi Nazim, The problem is when I send email from the module, it takes around 4-5 seconds to receive 354 Start mail input; end with CRLF.CRLF and state goes from RCTP to DATA. My question is if this is a normal time flow? I've not noticed this with Exchange server myself. As I have checked

RE: SMTP, data corruption and dot stuffing

2011-10-19 Thread Steve Holme
Hi Catherine, I'm using libcurl for sending mail via SMTP. And until now I have encountered very little problems. But during testing I've discovered a strange and very difficult to reproduce bug. Some attachments get corrupted when sent via libcurl and yet it's very hard to find a repeatable

RE: SMTP, data corruption and dot stuffing

2011-10-19 Thread Steve Holme
Hi again, A typical message will look like this : Yep - all looked good there. You'll see in the thread that I've just posted a small test program that will always reproduce the error. The error was hard to reproduce in real life conditions cause you need CRLF at the end of the

RE: [Bulk] RE: SMTP, data corruption and dot stuffing

2011-10-19 Thread Steve Holme
Hiya, I'm using a CURLOPT_READFUNCTION, I'll try to pass FILE* to see if it changes something. Cool - let us know how you get on. I see no difference when using a file. Okay - that rules that out ;-) I've been able to step into debugger to analyze Curl_smtp_escape_eob (smtp.c) but

RE: [Bulk] RE: SMTP, data corruption and dot stuffing

2011-10-19 Thread Steve Holme
Hiya, Saying that, are we are sure that it is a dot character and not an unprintable character I've just seen your post confirming my suspicion... are you able to debug your code to see what the actual value of the character is. I would also recommend that you use fputc() rather than fprintf()

RE: Question on POP3 usage in libcurl

2011-10-21 Thread Steve Holme
Hi Guys, I notice that when you call the function the first time it negotiates the login then sends LIST and returns the list of messages by their ids then sends QUIT. But obviously I am interested in not just the message list but the messages themselves. How do I re-start the

RE: [PATCH] smtp_mail: Added support to MAIL FROM for the optional AUTH parameter

2011-10-22 Thread Steve Holme
Hi Daniel, Given that we are close (if not just passing) the dead line for v7.22.1 features how would you like to play this one? (It's going to be named 7.23.0! :-) Not sure how I missed that ;-) No worries, I think this is a small and isolated enough change to be allowed even if we go

RE: [PATCH] smtp_mail: Added support to MAIL FROM for the optional AUTH parameter

2011-10-23 Thread Steve Holme
Hi Daniel, Curl seems to want to connect to my mail server as the rl user - is this normal behaviour when not specifying the --user or -U parameter? No, that's not normal. It sounds like perhaps you've used -url somehere instead of --url ? Spot on - I can't believe I did that ;-) I also

POP3 not using same connection for multiple requests when using starttls

2011-11-02 Thread Steve Holme
Dear all, I am currently having an issue when trying to retrieve multiple POP3 messages over the same connection when the connection starts off as a normal pop3 connection and then changes to an SSL connection via starttls. A simplified version of my code is as follows: // Initialise

RE: POP3 not using same connection for multiple requests when using starttls

2011-11-03 Thread Steve Holme
Hi Daniel, if((needle-handler-flagsPROTOPT_SSL) != (check-handler-flagsPROTOPT_SSL)) /* don't do mixed SSL and non-SSL connections */ continue; Yes, this is indeed the culprit of this problem you see. The problem for libcurl here is that the raw pop3 protocol has no

RE: POP3 not using same connection for multiple requests when using starttls

2011-11-03 Thread Steve Holme
Hi Daniel, I have tried commenting out the contents of pop3_to_pop3s() which only gets called during the upgrade process (and thus not changing the handler). This appears to work, although I am not too sure if this will cause any other problems. That will just cause the reversed

RE: POP3 not using same connection for multiple requests when using starttls

2011-11-04 Thread Steve Holme
Morning Daniel, That will just cause the reversed problem: if you have a POP3 connection without SSL and one _with_ SSL you don't want them to match. Surely a POP3 connection upgraded to TLS is not the same as a POP3S connection, so I don't believe you would want these to match.

RE: POP3 not using same connection for multiple requests when using starttls

2011-11-10 Thread Steve Holme
Hi Daniel, I have two fixes depending on what functionality you want to provide: 1) Remove the pop_to_pop3s(), smtp_to_smtps() and imap_to_imaps() functions thus leaving the original handlers in place for pop3 / smtp / imap TLS upgraded connections. If we do this, how do we

RE: POP3 not using same connection for multiple requests when using starttls

2011-11-12 Thread Steve Holme
Hiya Daniel, You don't want to distinguish between them. The server and libcurl have automatically upgraded the connection to TLS and as such the application programmer doesn't need to know (or even cares) if the connection has been upgraded. In fact, unless I'm mistaken, there is

RE: POP3 not using same connection for multiple requests when using starttls

2011-11-13 Thread Steve Holme
Hi Again, I'm not sure if I am missing something here... but are you saying that if the programmer specifies SSL and they attempt to do the following: I'm saying this: If USE_SSL is NONE then pop3:// connections can only re-use other connections that didn't use SSL. If USE_SSL !=

RE: POP3 not using same connection for multiple requests when using starttls

2011-11-17 Thread Steve Holme
Hi Daniel, Sorry if I'm being a bit slow here but I'm sure you'll appreciate it is quite difficult to grasp what others are saying via email sometimes. Oh, I'm sorry if I gave an impression of being impatient. I'm just a bit short on time at times, and sometimes I'm just trying to be

RE: query part for non-HTTP(S) URLs

2011-11-21 Thread Steve Holme
Hi Guys, I have a much better feeling when the cut off is only on the file proto. Why? What about FTP(S), IMAP(S), POP3(S), TELNET and SMTP(S)? I think we're pretty sure that they don't use the query part. I would think RTMP also don't, but we can let the ones we're unsure of remain

Problem with Curl_pop3_write() when data is received over multiple packets

2011-11-24 Thread Steve Holme
Dear all, I think I have found a problem with Curl_pop3_write() when receiving an email and was wondered if anyone had any advice on how to fix the issue. The problem has occurred by chance as I happen to have an email that is 15929 characters long and either my email server (Microsoft

RE: Problem with Curl_pop3_write() when data is received over multiple packets

2011-11-24 Thread Steve Holme
Hi Dan, I took a stab at fixing it some months ago and came up with the attached patch as . first attempt. It's pretty ugly, but it at least allows this test case to pass. Ta for that Dan - that at least gets be going and I will take a more detail look at it in the morning. Agreed. It

RE: POP3 not using same connection for multiple requests when using starttls

2011-11-25 Thread Steve Holme
Hi Daniel Note that this says TRY. That's a bit devious, as it means the user is actually fine with either way, it just wants to try SSL and go with it if it works. That option can however get set to CURLFTPSSL_CONTROL or CURLFTPSSL_ALL which mean: MUST use SSL. Does that mean if a

RE: Problem with Curl_pop3_write() when data is received over multiple packets

2011-11-28 Thread Steve Holme
Hi Daniel, Test 811 checks that LIST that doesn't return any messages works (which is why it is disabled by default because the pop3 code for this doesn't work properly). Does your patch adress that problem? Ah okay - No I've not addressed that issue yet. Anyway, I added SLOWDOWN to test

RE: Problem with Curl_pop3_write() when data is received over multiple packets

2011-11-28 Thread Steve Holme
Hi again, I will have another look at my code this afternoon as well and see if I can see. I've been going over my code since my last email but unfortunately I can't see the issue without a debugger :( I have however, included an updated patch that fixes the issue I mentioned earlier, which I

RE: Problem with Curl_pop3_write() when data is received over multiple packets

2011-11-30 Thread Steve Holme
Hi Daniel, I guess a next step (once this has been committed) will be to make the necessary fixes so that test case 811 (LIST with no mails to list) will run as well... Done! As this is a fix in addition to my previous one, I guess I'll just proceed and merge them into the master

[PATCH] POP3: fixed escaped dot not being striped out

2011-11-30 Thread Steve Holme
Dear all, Please find attached a patch that corrects escaped full stop characters (dots) at the beginning of new lines. The patch is based around Daniel's reworking of the eob detection, however, rather than allocate new buffers and memcpy the content around I have extended the detection to be

RE: [PATCH] POP3: fixed escaped dot not being striped out

2011-12-01 Thread Steve Holme
Hi Daniel, Excellent! I had a go at a similar approach but it turned out messy and so complicated I had to ditch it. Your take looks much better than what I ended up with. I'm glad you like it ;-) I've now fixed and extended test case 815 and used that to verify your patch and it performed

RE: Enhancing POP3 to support extra commands

2011-12-01 Thread Steve Holme
Hi Dan, It makes sense, but surely some mailers out there already support a similar POP3 syntax. It would be good to maintain some compatibility with existing practise (assuming there is some) given that there doesn't seem to be an official POP-3 URL syntax for such commands. Good idea.

RE: Enhancing POP3 to support extra commands

2011-12-02 Thread Steve Holme
Hi all, How about this instead: rather than embedding operations into the URL itself, why not use the --quote option, or even the --request option to specify them? That's analagous to how this would be done for HTTP, FTP and SFTP; to delete a file on those, you'd use -X DELETE, -Q

RE: Enhancing POP3 to support extra commands

2011-12-06 Thread Steve Holme
Hi Daniel, -X is used to modify what libcurl would otherwise use. -Q is used to provide a list of commands to execute at some point, and the three different QUOTE lists run at different times - like before and after the actual file transfer. Remember that neither -X nor -Q prevents the

RE: Enhancing POP3 to support extra commands

2011-12-06 Thread Steve Holme
Hi Dan, I would imagine you'd use -Q to do a full series of commands at once while connected. Like issuing a series of deletes or so. Okay - I'll leave that for a follow up patch as surely the URL would need to change for each message to delete ? Commands specified with -Q are

RE: Static winbuild with SSL broken

2011-12-06 Thread Steve Holme
Hi Daniel, SSL_LIBS = libeay32.lib ssleay32.lib gdi32.lib user32.lib advapi32.lib ..to satisfy some questionable dependencies in the fatal error handling in openssl 1.0.0e when linking curl.exe. So openssl 1.0.0e suddenly requires _three_ more libs to be used? I'd appreciate a

RE: Enhancing POP3 to support extra commands

2011-12-06 Thread Steve Holme
Hiya, In this case, you'd probably want to specify '-Q -DELE 5' which would first download the message and only then delete it. Ah... Yes, that makes more sense. I shall get it work on an individual command basis first and then we can look at doing the more complex stuff - just being able to

RE: [PATCH] POP3: Expanded the supported commands

2011-12-11 Thread Steve Holme
Hi Dan, It sounds from the description above that this patch uses -X not to replace one command with another as sent over the wire, but to actually change curl's behaviour by changing the type of transfer performed. It might turn out that this approach is the right one for POP-3, but I think

RE: POP3 not using same connection for multiple requests when using starttls

2011-12-11 Thread Steve Holme
Hi Daniel, Note that this says TRY. That's a bit devious, as it means the user is actually fine with either way, it just wants to try SSL and go with it if it works. That option can however get set to CURLFTPSSL_CONTROL or CURLFTPSSL_ALL which mean: MUST use SSL. Does that

RE: POP3 not using same connection for multiple requests when using starttls

2011-12-12 Thread Steve Holme
Morning Daniel, We've not spoken about this issue for a couple of weeks but in the meantime I have a fix in my local version of libcurl that I am using for the projects I am working on which seems to be working well. Given this, I have created the attached patch for your (and everyone

[PATCH] DOCS: Added SMTP information to CURLOPT_INFILESIZE

2011-12-15 Thread Steve Holme
Dear all, Just a small patch documentation wise, that is based on one that I included in my POP3 patch set at the weekend, however I forgot to include the (Added in 7.23.0) text and thought I would resubmit it whilst we are still deliberating the POP3 changes. Kind Regards Steve

RE: Cancelling Mail Request

2011-12-19 Thread Steve Holme
Hi Nazim, In my Smtp module, I send email requests recursively but randomly I would like to send Cancel mail request so if there is any email request which is being processed by cUrl, that should be cancelled and not delivered to Mail server. I have implemented a solution and I remove the

RE: Support for authentication DIGEST-MD5 for SMTP

2012-01-04 Thread Steve Holme
Hiya, It seems libcurl does not have support for authentication DIGEST-MD5 for SMTP. Is it just lack of time behind leaving this unimplemented or other difficulties that does not worth to struggle? It is on my to do list but I haven't had the time or need for it to add support yet. I am

RE: Support for authentication DIGEST-MD5 for SMTP

2012-01-05 Thread Steve Holme
Hi Guys, That helps a lot Steve, thanks for the detailed info. I will let you know if I hit a rock during development :-) There was some talk on this list recently of adding SASL authentication, either to POP-3 or SMTP (I forget which). You may want to search for that thread before

RE: Sample sending SMTP HTML email

2012-01-09 Thread Steve Holme
Hi Brett, Thanks Steve. I don't intend to include alternative content too; just HTML. I will try the READFUNCTION. You're welcome - let me know how you get on and if you need information on how to do alternative content as well. Also, can I please ask that you don't top post in this list

RE: Support for authentication DIGEST-MD5 for SMTP

2012-01-09 Thread Steve Holme
Hi Gokhan, I will let you know my thoughts on the patch a little later. Generally speaking it looks very good. However, I've only had time this evening to read the smtp code in details rather than the modifications to the md5 code. I will hopefully take a look at that in more detail tomorrow

[PATCH] SMTP: Fixed error when using CURLOPT_CONNECT_ONLY

2012-02-14 Thread Steve Holme
Dear all, Firstly I must apologise for being quiet over the last couple of weeks. but unfortunately I joined the Four Zero club so have been away from my PC drowning my sorrows ;-) I'm now back and if anyone needs my input into anything POP3 / SMTP related please feel free to give me a nudge.

RE: [PATCH] SMTP: Fixed error when using CURLOPT_CONNECT_ONLY

2012-02-14 Thread Steve Holme
Hi Rich, Welcome back from your... uh... mid-life crisis? :-O Thank you... but unfortunately, it didn't involve naked ladies or Lamborghinis much to my disappointment :( I would appreciate your comments on these: Jan 31: State of POP3 in curl? Feb 8: POP3 returns line data and CRLF

RE: [PATCH] SMTP: Fixed error when using CURLOPT_CONNECT_ONLY

2012-02-14 Thread Steve Holme
Hi Daniel, Haha, you youngster you! (unless you count in hex) =) I hear the upside with Hehehe - whilst I feel that old at the moment I was speaking in base 10 ;-) old age is that you need less sleep, which would mean more time for curl hacking! True... I best get cracking then! As such

RE: POP3 returns line data and CRLF separately, drops final CRLF

2012-02-14 Thread Steve Holme
Hi Rich, 1. Libcurl is returning message data line-by-line, with two callbacks per line - one for the line data and the other for the CRLF. This seems like strange behavior. I'd coded as if I were getting the data off a TCP connection - might get one byte, might get the whole message in

RE: [PATCH] SMTP: Fixed error when using CURLOPT_CONNECT_ONLY

2012-02-14 Thread Steve Holme
Hi Daniel, Whilst I'm here, did you have any thoughts about my patches from 07th Jan regarding the optional AUTH parameter in SMTP's MAIL FROM? Oh, look at that. Now I remember what that git branch I had lying around was made for! =) I rebased it, edited the conflict and now I've

RE: [PATCH] SMTP: Fixed error when using CURLOPT_CONNECT_ONLY

2012-02-15 Thread Steve Holme
Hi Daniel, Looking at the git log I think that was my original patch from October as opposed to the slightly updated version from January. Oh, argh. Sorry. Please check and send us an updated patch for the diff! No problem. I've checked the changes this morning and yes patches 2, 3 and 4

RE: [PATCH] SMTP: Fixed error when using CURLOPT_CONNECT_ONLY

2012-02-16 Thread Steve Holme
Hi Daniel, For your convenience I have renamed and reattached those two patches to this email. Thanks a lot, pushed! Cheers. I've enclosed a slightly reworked version of the patch to add the --mail-auth command line argument to curl itself. I've also enclosed a small SMTP code policing /

RE: Support for authentication DIGEST-MD5 for SMTP

2012-02-16 Thread Steve Holme
Hi Gokhan, I just wanted to drop you a quick email as I'm aware that I hadn't posted in this thread since the 9th Jan and probably should have done :( 3) A few general style issues: I agree with them and will change them later today. I don't know if you've noticed but there have been

  1   2   3   4   5   6   7   >