socket error ([Errno 111] Connection refused)

Saša Janiška <[email protected]>
Newsgroups gmane.mail.getmail.user
Message-ID <[email protected]>
Hello,

while waiting for an definite answer from my ISP in regard to my mail-related
problem when using SSL (with getmail), I am testing my setup with another
(Hetzner provider) and have problem accessing my account which is accessible
when using e.g. their webmail.

Moreover, I was able to configure test account with Evolution which set all the params automatically based on the server's settings and it shows:

* "STARTTLS after connecting" as encryption method and

* "password" as authentication mechanism

Attempt to access same account with e.g. Claws-mail shows:

09:02:33] IMAP< Error logging in to mail.your-server.de
[09:02:51] IMAP> Logging  [email protected] to mail.your-server.de using plaintext
[09:03:00] IMAP< failed: Re-Authentication Failure
** IMAP error on mail.your-server.de: LOGIN error

while getmail gives:

[...]
__init__() [baseclasses.py:285] trace
__init__() [baseclasses.py:297] setting username to "[email protected]" (<type 'str'>)
__init__() [baseclasses.py:297] setting getmaildir to "~/.getmail/" (<type 'str'>)
__init__() [baseclasses.py:297] setting mailboxes to "ALL" (<type 'str'>)
__init__() [baseclasses.py:297] setting server to "mail.your-domain.de" (<type 'str'>)
__init__() [baseclasses.py:297] setting port to "143" (<type 'str'>)
__init__() [baseclasses.py:297] setting configparser to "<ConfigParser.RawConfigParser instance at 0x7fc24e28f518>" (<type 'instance'>)
checkconf() [baseclasses.py:303] trace
checkconf() [baseclasses.py:308] checking configparser
checkconf() [baseclasses.py:308] checking getmaildir
checkconf() [baseclasses.py:308] checking timeout
checkconf() [baseclasses.py:308] checking server
checkconf() [baseclasses.py:308] checking port
converting port (143) to type <type 'int'>
checkconf() [baseclasses.py:308] checking username
checkconf() [baseclasses.py:308] checking password
checkconf() [baseclasses.py:308] checking password_command
checkconf() [baseclasses.py:308] checking mailboxes
checkconf() [baseclasses.py:308] checking use_peek
checkconf() [baseclasses.py:308] checking move_on_delete
checkconf() [baseclasses.py:308] checking record_mailbox
checkconf() [baseclasses.py:308] checking keyfile
checkconf() [baseclasses.py:308] checking certfile
checkconf() [baseclasses.py:308] checking ca_certs
checkconf() [baseclasses.py:308] checking ssl_fingerprints
checkconf() [baseclasses.py:308] checking ssl_version
checkconf() [baseclasses.py:308] checking ssl_ciphers
checkconf() [baseclasses.py:308] checking use_cram_md5
checkconf() [baseclasses.py:308] checking use_kerberos
checkconf() [baseclasses.py:308] checking use_xoauth2
checkconf() [baseclasses.py:308] checking ssl_cert_hostname
checkconf() [baseclasses.py:317] done
__init__() [_retrieverbases.py:1256] trace
__str__() [retrievers.py:449] trace
    checking retriever configuration for SimpleIMAPSSLRetriever:[email protected]@mail.your-domain.de:143
checkconf() [baseclasses.py:303] trace
  getting destination
    type="MDA_external"
    parameter arguments="("-f", "%(sender)", "~/.getmail/gour.filter")"
    parameter path="/usr/bin/maildrop"
    instantiating destination MDA_external with args arguments="("-f", "%(sender)", "~/.getmail/gour.filter")",configparser="<ConfigParser.RawConfigParser instance at 0x7fc24e28f518>",path="/usr/bin/maildrop"
__init__() [baseclasses.py:285] trace
__init__() [baseclasses.py:297] setting path to "/usr/bin/maildrop" (<type 'str'>)
__init__() [baseclasses.py:297] setting arguments to "("-f", "%(sender)", "~/.getmail/gour.filter")" (<type 'str'>)
__init__() [baseclasses.py:297] setting configparser to "<ConfigParser.RawConfigParser instance at 0x7fc24e28f518>" (<type 'instance'>)
checkconf() [baseclasses.py:303] trace
checkconf() [baseclasses.py:308] checking configparser
checkconf() [baseclasses.py:308] checking path
checkconf() [baseclasses.py:308] checking arguments
checkconf() [baseclasses.py:308] checking user
checkconf() [baseclasses.py:308] checking group
checkconf() [baseclasses.py:308] checking allow_root_commands
checkconf() [baseclasses.py:308] checking unixfrom
checkconf() [baseclasses.py:308] checking ignore_stderr
checkconf() [baseclasses.py:317] done
initialize() [destinations.py:655] trace
__init__() [destinations.py:85] done
  getting filters
    processing filter section filter
      type="Filter_classifier"
    parameter path="/usr/bin/clamdscan"
    parameter exitcodes_keep="(0,1)"
    parameter arguments="("--stdout", "--no-summary", "--infected", "-")"
      instantiating filter Filter_classifier with args arguments="("--stdout", "--no-summary", "--infected", "-")",configparser="<ConfigParser.RawConfigParser instance at 0x7fc24e28f518>",exitcodes_keep="(0,1)",path="/usr/bin/clamdscan"
__init__() [baseclasses.py:285] trace
__init__() [baseclasses.py:297] setting path to "/usr/bin/clamdscan" (<type 'str'>)
__init__() [baseclasses.py:297] setting exitcodes_keep to "(0,1)" (<type 'str'>)
__init__() [baseclasses.py:297] setting arguments to "("--stdout", "--no-summary", "--infected", "-")" (<type 'str'>)
__init__() [baseclasses.py:297] setting configparser to "<ConfigParser.RawConfigParser instance at 0x7fc24e28f518>" (<type 'instance'>)
checkconf() [baseclasses.py:303] trace
checkconf() [baseclasses.py:308] checking path
checkconf() [baseclasses.py:308] checking unixfrom
checkconf() [baseclasses.py:308] checking arguments
checkconf() [baseclasses.py:308] checking exitcodes_keep
checkconf() [baseclasses.py:308] checking exitcodes_drop
checkconf() [baseclasses.py:308] checking user
checkconf() [baseclasses.py:308] checking group
checkconf() [baseclasses.py:308] checking allow_root_commands
checkconf() [baseclasses.py:308] checking ignore_header_shrinkage
checkconf() [baseclasses.py:308] checking ignore_stderr
checkconf() [baseclasses.py:308] checking configparser
checkconf() [baseclasses.py:317] done
initialize() [filters.py:184] trace
__init__() [filters.py:70] done
    processing filter section filter-2
      type="Filter_external"
    parameter arguments="("-R", "X-getmail-filter-classifier:",
"X-ClamAV-filter:")"
    parameter path="/usr/bin/reformail"
      instantiating filter Filter_external with args arguments="("-R", "X-getmail-filter-classifier:",
"X-ClamAV-filter:")",configparser="<ConfigParser.RawConfigParser instance at 0x7fc24e28f518>",path="/usr/bin/reformail"
__init__() [baseclasses.py:285] trace
__init__() [baseclasses.py:297] setting path to "/usr/bin/reformail" (<type 'str'>)
__init__() [baseclasses.py:297] setting arguments to "("-R", "X-getmail-filter-classifier:",
"X-ClamAV-filter:")" (<type 'str'>)
__init__() [baseclasses.py:297] setting configparser to "<ConfigParser.RawConfigParser instance at 0x7fc24e28f518>" (<type 'instance'>)
checkconf() [baseclasses.py:303] trace
checkconf() [baseclasses.py:308] checking path
checkconf() [baseclasses.py:308] checking unixfrom
checkconf() [baseclasses.py:308] checking arguments
checkconf() [baseclasses.py:308] checking exitcodes_keep
checkconf() [baseclasses.py:308] checking exitcodes_drop
checkconf() [baseclasses.py:308] checking user
checkconf() [baseclasses.py:308] checking group
checkconf() [baseclasses.py:308] checking allow_root_commands
checkconf() [baseclasses.py:308] checking ignore_header_shrinkage
checkconf() [baseclasses.py:308] checking ignore_stderr
checkconf() [baseclasses.py:308] checking configparser
checkconf() [baseclasses.py:317] done
initialize() [filters.py:184] trace
__init__() [filters.py:70] done
    processing filter section filter-3
      type="Filter_classifier"
    parameter arguments="( '-p', '-e' )"
    parameter path="/usr/bin/bogofilter"
      instantiating filter Filter_classifier with args arguments="( '-p', '-e' )",configparser="<ConfigParser.RawConfigParser instance at 0x7fc24e28f518>",path="/usr/bin/bogofilter"
__init__() [baseclasses.py:285] trace
__init__() [baseclasses.py:297] setting path to "/usr/bin/bogofilter" (<type 'str'>)
__init__() [baseclasses.py:297] setting arguments to "( '-p', '-e' )" (<type 'str'>)
__init__() [baseclasses.py:297] setting configparser to "<ConfigParser.RawConfigParser instance at 0x7fc24e28f518>" (<type 'instance'>)
checkconf() [baseclasses.py:303] trace
checkconf() [baseclasses.py:308] checking path
checkconf() [baseclasses.py:308] checking unixfrom
checkconf() [baseclasses.py:308] checking arguments
checkconf() [baseclasses.py:308] checking exitcodes_keep
checkconf() [baseclasses.py:308] checking exitcodes_drop
checkconf() [baseclasses.py:308] checking user
checkconf() [baseclasses.py:308] checking group
checkconf() [baseclasses.py:308] checking allow_root_commands
checkconf() [baseclasses.py:308] checking ignore_header_shrinkage
checkconf() [baseclasses.py:308] checking ignore_stderr
checkconf() [baseclasses.py:308] checking configparser
checkconf() [baseclasses.py:317] done
initialize() [filters.py:184] trace
__init__() [filters.py:70] done
overriding option verbose from commandline 2
getmail version 5.6
Copyright (C) 1998-2012 Charles Cazabon.  Licensed under the GNU GPL version 2.
__str__() [retrievers.py:449] trace
SimpleIMAPSSLRetriever:[email protected]@mail.your-domain.de:143:
__str__() [retrievers.py:449] trace
initialize() [_retrieverbases.py:1657] trace
gnome-keyring does not know password for [email protected] mail.your-domain.de IMAP4-SSL__str__() [retrievers.py:449] trace
Enter password for SimpleIMAPSSLRetriever:[email protected]@mail.your-domain.de:143:  
initialize() [_retrieverbases.py:919] trace
checkconf() [baseclasses.py:303] trace
initialize() [_retrieverbases.py:1687] trying self._connect()
_connect() [_retrieverbases.py:567] trace
_connect() [_retrieverbases.py:619] establishing IMAP SSL connection to mail.your-domain.de:143
abort() [_retrieverbases.py:1754] trace
hetzner.rc: socket error ([Errno 111] Connection refused)
  0 messages (0 bytes) retrieved, 0 skipped
__str__() [retrievers.py:449] trace
retriever SimpleIMAPSSLRetriever:[email protected]@mail.your-domain.de:143 finished
quit() [_retrieverbases.py:1831] trace


The main snippet (excluding filtering parts) of my rc file is:

[retriever]
type = SimpleIMAPSSLRetriever
server = mail.your-domain.de
mailboxes = ALL
username = [email protected]
port = 143

Here is the log when testing IMAP server:

$ openssl s_client -connect mail.your-server.de:143 -starttls imap
CONNECTED(00000005)
depth=2 C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert Global Root G2
verify return:1
depth=1 C = US, O = DigiCert Inc, OU = www.digicert.com, CN = Thawte TLS RSA CA G1
verify return:1
depth=0 CN = *.your-server.de
verify return:1
---
Certificate chain
 0 s:CN = *.your-server.de
   i:C = US, O = DigiCert Inc, OU = www.digicert.com, CN = Thawte TLS RSA CA G1
 1 s:C = US, O = DigiCert Inc, OU = www.digicert.com, CN = Thawte TLS RSA CA G1
   i:C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert Global Root G2
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIGLzCCBRegAwIBAgIQCl3nJnaezpqLd0S5+pbGTDANBgkqhkiG9w0BAQsFADBe
MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
d3cu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NlcnRzLnRoYXd0ZS5jb20vVGhhd3RlVExTUlNBQ0FHMS5j
cnQwCQYDVR0TBAIwADCCAX4GCisGAQQB1nkCBAIEggFuBIIBagFoAHcApLkJkLQY
WBSHuxOizGdwCjw1mAT5G9+443fNDsgN3BAAAAFl0lHUiQAABAMASDBGAiEA2n12
WlZcz4TDdjJSxI3EdX+TwYJEwgnvp04T/ywPiDoCIQDS4+EuRTkTdeXQvx/P4mXX
2CZngHGu8ZB745Vz1/MJBwB2AId1v+dZfPiMQ5lfvfNu/1aNR1Y2/0q1YMG06v9e
oIMPAAABZdJR1XIAAAQDAEcwRQIhAL5Qhr6byK45AiM+4gTrNLgeBgThSEbVkNBx
/QhvD7zkAiBIYa1qGV/SmWc4syfauSvpOjsrTIT4Es7E72VYcICqNgB1ALvZ37wf
inG1k5Qjl6qSe0c4V5UKq1LoGpCWZDaOHtGFAAABZdJR1K8AAAQDAEYwRAIgDoGs
mf1hIC+C2TrgabceyDECTr6KWU8Z8d2IOobDpBQCIEw5QcEXiyPbudPeDPaCv2Vo
FY6fdd4IdwmOcBxV48B1MA0GCSqGSIb3DQEBCwUAA4IBAQADBup5ldCZ0EqvX3cu
m7Iupg8e/97HZ/iIcwNM4y+YJCjzGMPFc6taKdOs0R0WwE+GSGWKH8XEqCeB8FI8
YYiF2vKL23Ushq2MlbVoEZXWh2rmCZTcREb6UM+4qtUPsoOjAv+TLtVcpL1TWKoW
+dHLiuwo+GFQvQdhNlnLzvM4niuYxR/iFyJzM605BN4EuBB1+z+l+PaUPUTN2L4d
oypkUKGEU4YdST766UrsFcTFtA+DYKuoIeMy9c97BRjvfZFgYelItv8+rAGLZqRm
gEvpJEfmqNywO9Vh50jEFyyXDMH1KO9mBjdENQ1xG9VSNlt1dHBQweJXtpyNMknA
7boL
-----END CERTIFICATE-----
subject=CN = *.your-server.de

issuer=C = US, O = DigiCert Inc, OU = www.digicert.com, CN = Thawte TLS RSA CA G1

---
No client certificate CA names sent
Peer signing digest: SHA512
Peer signature type: RSA
Server Temp Key: DH, 2048 bits
---
SSL handshake has read 4265 bytes and written 655 bytes
Verification: OK
---
New, TLSv1.2, Cipher is DHE-RSA-AES256-GCM-SHA384
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : DHE-RSA-AES256-GCM-SHA384
    Session-ID: D4445048E363DD5BAA4495D0ADCAE729BFD279237EA4C44ABBAC617947A770BE
    Session-ID-ctx: 
    Master-Key: EBB3D6CFBBEABE669FCF9BD3A76C40FA674C7F5E6C5A996FEC37256B373D82FA54B2CA33D52C22FBAF1C2A9D1058EC34
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    TLS session ticket lifetime hint: 7200 (seconds)
    TLS session ticket:
    0000 - 21 18 6a 0d 1c 4f ed 8d-c0 75 28 d8 dd ed 54 b8   !.j..O...u(...T.
    0010 - 0b 78 bd f4 42 46 85 96-23 40 05 60 06 d2 00 17   .x..BF..#@.`....
    0020 - 7b e0 ea 54 d0 bf b2 f7-f5 1a c6 b2 e4 1a 88 81   {..T............
    0030 - a7 75 47 e1 29 d6 9d 98-f4 34 6a 3b d3 0d 18 c6   .uG.)....4j;....
    0040 - 5f 62 dd d8 ca e1 85 73-15 fa e5 d0 14 1b 1f b3   _b.....s........
    0050 - 4c e1 e4 39 fc fd d2 46-b1 70 f2 db aa ab a6 a4   L..9...F.p......
    0060 - 0d 04 09 d6 8d 2d b5 f4-43 73 34 e4 07 44 a4 d8   .....-..Cs4..D..
    0070 - bd 71 62 da ef a2 29 97-e9 3d 4d 9a 8b e6 2b 58   .qb...)..=M...+X
    0080 - a9 cb aa 94 f5 f2 91 ca-44 38 94 ac d5 fe 9f dd   ........D8......
    0090 - 22 49 92 6d d6 19 5d 44-e1 e6 e0 f9 50 3e 6f e1   "I.m..]D....P>o.
    00a0 - ed b4 27 6e 5a 15 42 81-0b e5 18 1b c5 88 d3 95   ..'nZ.B.........
    00b0 - 7c 9e 1c f5 b7 69 f2 2a-63 ab f2 57 c3 e0 4b 22   |....i.*c..W..K"

    Start Time: 1539760953
    Timeout   : 7200 (sec)
    Verify return code: 0 (ok)
    Extended master secret: yes
---
. OK CAPABILITY
a login [email protected] my-password
a OK You are so in

Any hint what might be wrong? (using getmail-5.6-1 on Debian Sid)


Sincerely,
Gour

-- 
The senses are so strong and impetuous, O Arjuna,
that they forcibly carry away the mind even of a man
of discrimination who is endeavoring to control them.
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEWDpE0TZF+khoOctpNyVpzrf8dgUFAlvG5I4ACgkQNyVpzrf8
dgWepg//cyte/YQx+OJCvf5mArgKkH4+38lp5kfH1dv3Hlis50Iwc7RfOpYVKJSb
Ouu0K1XWShMllqXxz5jaMo07g6ZyYV3g3qagJVfU4T56W5a1AJ/IevD02boKNl2Z
ZrLLi5t6R3QPhTGJdt/b8foxLbfTxfidDcWNWgUex0wOH5dcT8UB2bkNz3TgywD6
NDEtE9FezlVeDqPxtEqGLV4/NqGYmXk9D7/HgNvDKOSyaZWol6DgRMyepLonl1Go
bDXUZOKqldlraIBcUpy2bUqO2bBZk8PJ2pbRHnKUkZ/wN6AbEVzsOODqDmCNUCvb
x28bTBQazY2H/PMiaiNYHqxx6Ys36SWoYXDc+kgpDYkKrfQB9CtB0kQ0rkQ6bk/3
n/TEwwl3N3WiqF2y/rDXRAynRQA7dUWd9WKuYtWhOYNG2Pom67jvKhXa3Z2oESUV
gudZ1L9TyyEbwICKLKPJSHUtgRvqayM+WhOo1Ex1sZA0B2hS/grL9Ku6pejOCWKi
JpOV050Y8c4QcxxyHKDrEsSl852WaFuAXskP4+JbJJH1MzUwP713qvQBJqPb5iJj
Q/P0h2oNKQaSdIEtqybkwWnIEB4GQCq1F/5QuLU77/TTLBLutHEZ7O2q519sT5xj
TS/+VAHU5Vb8OS4ncOSGAEIyPE+ES5MMv0ZMwbqmXhf0MgG24no=
=+YVg
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.