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

read: connection reset by peer #25

Open
shackra opened this issue Aug 23, 2017 · 0 comments
Open

read: connection reset by peer #25

shackra opened this issue Aug 23, 2017 · 0 comments

Comments

@shackra
Copy link

shackra commented Aug 23, 2017

I'm having issues connecting to mail.privateemail.com, I'm using the same configuration that mbsync and others use to retrieve email from the server and mbsync works without issues.

The relevant code starts here, hosted on Gitlab

The configuration file looks like this:

{
  "host": "mail.privateemail.com",
  "port": 993,
  "tls": true,
  "tlsOptions": { "rejectUnauthorized": true },
  "username": "[email protected]",
  "password": "mysecretpassword",
  "onNewMail": "/home/jorge/.local/bin/getmail.sh",
  "onNewMailPost": "emacsclient  -e '(mu4e-update-index)'",
  "boxes": ["INBOX"],
  "__comment": "touch"
}

Please note: My code ignores tlsOptions at the moment.

This is the output my application shows:

[imap] 21:29:49 Connected to 198.54.122.60:993 (Tag=KFRUH)
[imap] 21:30:00 S:  (read tcp 192.168.0.10:59164->198.54.122.60:993: read: connection reset by peer)
[imap] 21:30:00 Close reason: protocol error
[imap] 21:30:00 Connection closing (flush=false)
[imap] 21:30:00 Greeting error: read tcp 192.168.0.10:59164->198.54.122.60:993: read: connection reset by peer
2017/08/22 21:30:00 [ERR] Cannot connect to mail.privateemail.com:993: read tcp 192.168.0.10:59164->198.54.122.60:993: read: connection reset by peer

This is the output if I use a non-encrypted port, basically it works fine:

[imap] 21:31:44 Connected to 198.54.122.60:143 (Tag=KTLIV)
[imap] 21:31:45 S: * OK [CAPABILITY STARTTLS IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
[imap] 21:31:45 Server greeting: Dovecot ready.
Server says hello: Dovecot ready.
[imap] 21:31:45 C: KTLIV1 STARTTLS
[imap] 21:31:45 S: KTLIV1 OK Begin TLS negotiation now
[imap] 21:31:45 TLS encryption enabled (cipher=0xC030)
[imap] 21:31:45 C: KTLIV2 CAPABILITY
[imap] 21:31:45 S: * CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE AUTH=PLAIN AUTH=LOGIN
[imap] 21:31:45 S: KTLIV2 OK Pre-login capabilities listed, post-login capabilities have more.
[imap] 21:31:45 C: KTLIV3 LOGIN "[email protected]" "mysecretpassword"
[imap] 21:31:46 S: * CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=O
RDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARC
HRES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY MOVE NOTIFY METADATA QUOTA                                                                         
[imap] 21:31:46 S: KTLIV3 OK Logged in
[imap] 21:31:46 C: KTLIV4 CAPABILITY
[imap] 21:31:46 S: * CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=O
RDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARC
HRES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY MOVE NOTIFY METADATA QUOTA                                                                         
[imap] 21:31:46 S: KTLIV4 OK Capability completed (0.001 + 0.000 secs).
[imap] 21:31:46 C: KTLIV5 EXAMINE "INBOX"
[imap] 21:31:46 S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
[imap] 21:31:46 S: * OK [PERMANENTFLAGS ()] Read-only mailbox.
[imap] 21:31:46 S: * 2 EXISTS
[imap] 21:31:46 S: * 0 RECENT
[imap] 21:31:46 S: * OK [UNSEEN 2] First unseen.
[imap] 21:31:46 S: * OK [UIDVALIDITY 1500785846] UIDs valid
[imap] 21:31:46 S: * OK [UIDNEXT 364] Predicted next UID
[imap] 21:31:46 S: * OK [HIGHESTMODSEQ 1026] Highest
[imap] 21:31:46 S: KTLIV5 OK [READ-ONLY] Examine completed (0.006 + 0.000 + 0.005 secs).
[imap] 21:31:46 C: KTLIV6 IDLE
[imap] 21:31:46 S: + idling

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

1 participant