Comments (4)
Hmm, it works for me, although I had to fiddle with the version numbers of some of the dependent libraries to get it to build. I've pushed those changes, along with a tweak to examples/gmail.hs
to set sslMaxLineLength. Could you try getting the latest and running it in a cabal sandbox?
If it still happens for you in a sandbox with the latest .cabal file we can probably rule out it being a problem with one of the dependencies...
from haskellnet-ssl.
I got the latest HaskellNet and HaskellNet-SSL, and I upgraded tls from 1.1.5 to 1.2.2, connection from 0.1.3.1 to 0.2.0 (although not in a sandbox) but same result. I upgraded network 2.4.1.2 to 2.4.2.2 as well, but was unable to use it as PortNumber insisted on coming from 2.4.1.2 causing a version mismatch.
The error messages changed after this. While gmail stays the same, Office365 now reports *** Exception: user error (authentication failed.) on known good credentials. So definitely, something is up with the different versions here.
But I also tested with a third email provider pair.com, which works perfectly both before and after upgrade. I forgot to mention earlier that IMAP works perfectly with all three providers (gmail, office365, pair).
While testing I also found the default connection timeout to be extremely long (2 minutes?).
Edit: the reason i did not try sandbox is that my windows install is still on cabal 1.16 and fails on cabal install cabal-install (even when running as administrator).
from haskellnet-ssl.
I tried running on Windows in case that was the issue (I've been testing on Linux until now), but gmail still connected. When I tried sending with mailgun, however, I got an authentication failure, which is when I realised that the smtpTest
example doesn't actually check the response of the AUTH
command and just tries to send the email regardless. I've updated the example to check the response and print it out on failure.
I am still not entirely sure why I was getting the authentication failure. I took a quick glance at the Network.HaskellNet.Auth.plain
function and it looks reasonable to me, and connecting manually through openssl s_client -starttls smtp -crlf -connect smtp.mailgun.org:587
authenticates fine. At any rate, I think this is at the authentication level, not the SSL level, and so the problem likely lies closer to HaskellNet
than HaskellNet-SSL
.
I've updated the example to use AUTH LOGIN
rather than AUTH PLAIN
. Could you try with the latest and see if it still fails for both mailservers? That way we'll know if it is an authentication problem (even the one reporting differently), or if there are other problems as well.
Thanks!
from haskellnet-ssl.
Strangely enough, all of the providers now work fine!
Except that Office365 takes a very long time, almost 30 secs, on the initial sendCommand.
∷ Finn Espen Gundersen
From: Daniel P. Wright [mailto:[email protected]]
Sent: 4. februar 2014 00:58
To: dpwright/HaskellNet-SSL
Cc: Finn Espen Gundersen
Subject: Re: [HaskellNet-SSL] smtp-example gives exception (#2)
I tried running on Windows in case that was the issue (I've been testing on Linux until now), but gmail still connected. When I tried sending with mailgun, however, I got an authentication failure, which is when I realised that the smtpTest example doesn't actually check the response of the AUTH command and just tries to send the email regardless. I've updated the example to check the response and print it out on failure.
I am still not entirely sure why I was getting the authentication failure. I took a quick glance at the Network.HaskellNet.Auth.plain function and it looks reasonable to me, and connecting manually through openssl s_client -starttls smtp -crlf -connect smtp.mailgun.org:587 authenticates fine. At any rate, I think this is at the authentication level, not the SSL level, and so the problem likely lies closer to HaskellNet than HaskellNet-SSL.
I've updated the example to use AUTH LOGIN rather than AUTH PLAIN, and to print out the response when authentication fails. Could you try with the latest and see if it still fails for both mailservers? That way we'll know if it is an authentication problem (even the one reporting differently), or if there are other problems as well.
Thanks!
—
Reply to this email directly or #2 (comment) view it on GitHub. https://github.com/notifications/beacon/1837982__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcwNzAwNDY4OCwiZGF0YSI6eyJpZCI6MjQ1NDUyNTl9fQ==--bcaa748e333bf1c99958b9416d51b0c15485ea98.gif
from haskellnet-ssl.
Related Issues (15)
- maxLineLength too small HOT 1
- Why not to re-export HaskellNet modules? HOT 2
- stack build tools support HOT 3
- IMAP's `fetch` results with extreme memory usage and computer freezing. HOT 1
- missing `bsWaitForInput' in connectionToStream HOT 1
- gmail login example not working HOT 6
- 503 error when using SMTP.doSMTPSTARTTLS HOT 3
- Not in lts-13.0 HOT 1
- Module ‘Network.Socket.Internal’ does not export ‘PortNumber’ HOT 7
- Add package to Stackage LTS 16 HOT 4
- Example broken HOT 1
- Cabal dependencies HOT 2
- TLS fails to authorise if the server stopped supporting HELO command
- Could not install from hackage HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from haskellnet-ssl.