question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TLS disables authentication

See original GitHub issue

Config:

configs:
  pushover:
    urls:
      - pover://xxxxxxxxxxxxxxxx@yyyyyyyyyyyyyyyyy
tls:
  mode: starttls
  certfile: /etc/ssl/cert.pem
  keyfile: /etc/ssl/key.pem
smtp:
  hostname: nxdomain.info
  auth:
    basic:
      pushover: xxxxxxxxxxxxxxxxxxx

msmtp:

<-- 220 nxdomain.info Mailrise 0.0.post1.dev1+g8928d73
--> EHLO localhost
<-- 250-nxdomain.info
<-- 250-SIZE 33554432
<-- 250-8BITMIME
<-- 250-SMTPUTF8
<-- 250-STARTTLS
<-- 250 HELP
--> QUIT
<-- 221 Bye
msmtp: the server does not support authentication

Observation: 250-AUTH LOGIN PLAIN is missing

Log:

[2022-12-20 16:34:36] ERROR:asyncio:Fatal error: protocol.data_received() call failed.
protocol: <asyncio.sslproto.SSLProtocol object at 0x7f5392c1b710>
transport: <_SelectorSocketTransport fd=10 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 1009, in _read_ready__data_received
    self._protocol.data_received(data)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'SSLProtocol' object has no attribute 'data_received'
[2022-12-20 16:34:36] ERROR:mail.log:('172.18.0.1', 37216) SMTP session exception
Traceback (most recent call last):
  File "/home/mailrise/.local/lib/python3.11/site-packages/aiosmtpd/smtp.py", line 895, in smtp_STARTTLS
    await waiter
  File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 1009, in _read_ready__data_received
    self._protocol.data_received(data)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'SSLProtocol' object has no attribute 'data_received'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/mailrise/.local/lib/python3.11/site-packages/aiosmtpd/smtp.py", line 728, in _handle_client
    await method(arg)
  File "/home/mailrise/.local/lib/python3.11/site-packages/aiosmtpd/smtp.py", line 899, in smtp_STARTTLS
    raise TLSSetupException() from error
aiosmtpd.smtp.TLSSetupException

Steps to reproduce:

I generated a self-signed certifcate, changed the owner to the mailrise container user and mounted it:

openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 3650 -nodes -subj '/CN=nxdomain.info'
sudo chown 999:999 *.pem
  mailrise:
    container_name: mailrise
    image: yoryan/mailrise
    restart: always
    volumes:
      - ./mailrise.conf:/etc/mailrise.conf
      - ./cert.pem:/etc/ssl/cert.pem
      - ./key.pem:/etc/ssl/key.pem

Issue Analytics

  • State:closed
  • Created 9 months ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
bt90commented, Dec 22, 2022

Works 👍

Thanks again for all your help testing these TLS use-cases.

No, I thank you for developing this nice piece of tech 😉

0reactions
YoRyancommented, Dec 22, 2022

Misinterpreted the use of auth_require_tls. In the on-connect mode, aiosmtpd isn’t aware of the TLS wrapper, so that argument should be set to False.

Should be fixed with https://github.com/YoRyan/mailrise/commit/80384738d2e50558fd130d3075ef39ac70a2c9c8. Thanks again for all your help testing these TLS use-cases.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can disable TLS authentication? #536 - GitHub
Hello, As my Client OS mikrotik does not support TLS authentication. I want to disable this in Debian 10. How can disable this...
Read more >
How to enable or disable SSL and TLS versions
For this reason, you should disable SSLv2, SSLv3, TLS 1.0 and TLS 1.1 in your server configuration, leaving only TLS protocols 1.2 and...
Read more >
How to enable or disable strict TLS 1.2 mode in RSA ...
You can enable and disable the strict TLS 1.2 mode in Authentication Manager 8.2. To do so, perform the following procedure on the...
Read more >
Managing SSL/TLS Protocols and Cipher Suites for AD FS
Learn how to disable and enable certain TLS/SSL protocols and cipher suites that are used by AD FS.
Read more >
How to disable specific versions of the TLS protocol ... - Veritas
1. Open the VRTSatlocal.conf file from either of the following locations: · 2. In the VRTSatlocal.conf file, under the [Security\Authentication\ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found