Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trouble with fetching mail #34

Open
dsp1986 opened this issue Feb 27, 2018 · 8 comments
Open

trouble with fetching mail #34

dsp1986 opened this issue Feb 27, 2018 · 8 comments

Comments

@dsp1986
Copy link

dsp1986 commented Feb 27, 2018

Thank you very much for your great work!

jaro peek works fine on both a googlemail and a debian server running dovecot
jaro fetch times out, not finding any folders on the debian server and finding 9 folders on googlemail.

Also, if I peek into the debian server and download a message by typing R a file for the email gets created, but filesize is 0.

logfiles (systemd status) on debian server says
dovecot[13126]: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=x.x.x.x, lip=x.x.x.x, TLS handshaking: Disconnected, session=<OcSsni1m9gBU0jOB>
for an attempt to fetch,
and
dovecot[13126]: imap-login: Login: user=<USER>, method=PLAIN, rip=x.x.x.x, lip=x.x.x.x, mpid=13152, TLS, session=<a5ccny1m+ABU0jOB>
if I peek.

my guess is fetchmail is not properly configured, but I really don't know how to continue from here. Can you (or someone ;) point me towards a solution? that would be highly appreciated.
Thank you!

@jaromil
Copy link
Member

jaromil commented Feb 27, 2018

hi there, strange! I am not using gmail so don't know about that, but fetch is working on my dovecot server.
What version of fetchmail are you running?
Also the output of jaro imap listfolders shows how many imap folders are detected.
I suspect gmail has deviated so much away from any IMAP related RFC that it may need some fiddling.

@dsp1986
Copy link
Author

dsp1986 commented Feb 27, 2018

running on a Gentoo:

$ fetchmail --version
This is fetchmail release 6.3.26+RPA+NTLM+SDPS+SSL+NLS.`

running a fetch or jaro -D imap listfolders works until

[D] running ssl imap query via openssl, encrypted

@jaromil
Copy link
Member

jaromil commented Feb 27, 2018

ok, fetchmail is more or less what I have

This is fetchmail release 6.3.26+GSS+NTLM+SDPS+SSL-SSLv3+NLS+KRB5.

but the imap listfolders blocking is odd. IS that on dovecot or gmail? I am confused since there are two cases, perhaps first concentrate on one and specify the user account with -a. Look into the code of listfolders you'll find the specific openssl command used to debug further.

@dsp1986
Copy link
Author

dsp1986 commented Feb 27, 2018

I just noticed, that things seem to work fine on my old debian8 machine, and that it chooses a different method of running openssl:

[D] running tls imap query via openssl, encrypted

(tls instead of ssl)

I am tempted to copy the "tls" command to the "ssl" case in the zsh script. Feels a bit hackish and I don't understand too much of what is going on here though :)

@dsp1986
Copy link
Author

dsp1986 commented Feb 27, 2018

in zlibs/imap I copied l.35 to l.38, essentially forcing the tls behaviour this way.

it works for jaro imap listfolders but wont accept the password when I jaro fetch

It seems I need to tell either my system, or jaromail to use TLS instead of SSL.
where would one do this?

@dsp1986
Copy link
Author

dsp1986 commented Feb 27, 2018

IS that on dovecot or gmail?

all my debugging is now going on with the dovecot server.


I found the TLS setting in the account configuration, which I had actually seen before.
I am also getting some errors about my selfsigned certificate and "commonname mismatch" which leads me to think I should revise the server configuration.

Thank you very much for your time. I will keep trying.

@dsp1986
Copy link
Author

dsp1986 commented Feb 27, 2018

for future reference, this is how far I've gotten for now:
jaro fetch -a dovecot.txt
After errors about certificate a list of mail folders appears mentioning how many emails are in folders and then:

fetchmail: mailbox selection failed
fetchmail: client/server synchronisation error while fetching from LOGIN@SERVER

fetchmail: Query status=7 (ERROR)

fetch:unset:145: poll SERVER with proto IMAP user "LOGIN" there with password "PW_IN_PLAINTEXT": invalid parameter name

where SERVER, LOGIN and PW_IN_PLAINTEXT are real values

@jaromil
Copy link
Member

jaromil commented Feb 27, 2018

OK. Its hard to troubleshoot, I know since at dyne we do run our own mailserver... my hope is that this software is at least transparent enough to help this troubleshooting. Copying lines of script is still a viable option as most variables you can guess or read and it all boils down to a telnet sort of session over openssl. If you come to any more hints for future reference, you are very welcome to post them, besides that I hope you solve your problem. If its a bug in jaro mail i'll certainly be fixing it. I'm struggling myself with interfacing to gmail these days, to help an old friend download emails and get out of there...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants