[GH-ISSUE #10] Connection failed (attempt 2): [SSL] record layer failure #10

Open
opened 2026-03-02 03:53:52 +03:00 by kerem · 0 comments
Owner

Originally created by @Marcool04 on GitHub (Jun 11, 2025).
Original GitHub issue: https://github.com/draga79/NotiMail/issues/10

Hi there,
I am trying to use this alongside the protonmail-bridge https://github.com/ProtonMail/proton-bridge to get notifications pushed on incoming email via ntfy.
I had to make some minor adjustments so that I could set the port as well as the host for the IMAP connexion, as the bridge uses a non-standard one (see https://github.com/Marcool04/NotiMail/ if you're interested).
But now I am running into another error which I just can't seem to debug...

# notimail --config /etc/notimail/config.ini                                                                                                           
2025-06-11 20:06:02,090 - MainThread - INFO - Module availability:                                                                                                            
2025-06-11 20:06:02,090 - MainThread - INFO -  - Apprise available: True                                                                                                      
2025-06-11 20:06:02,090 - MainThread - INFO -  - Flask available: True                                                                                                        
2025-06-11 20:06:02,090 - MainThread - INFO -  - Prometheus client available: True                                                                                            
2025-06-11 20:06:02,090 - MainThread - INFO - PrometheusHost or PrometheusPort not specified. Metrics will not be exposed.                                                    
2025-06-11 20:06:02,090 - MainThread - INFO - FlaskHost or FlaskPort not specified. Web interface will not be started.                                                        
2025-06-11 20:06:02,090 - MainThread - INFO - Performing initial tests...                                                                                                     
Warning: no global notification providers configured for the test.
2025-06-11 20:06:02,102 - MainThread - WARNING - Warning: no global notification providers configured for the test.
2025-06-11 20:06:02,102 - MainThread - INFO - Initial tests completed successfully.
2025-06-11 20:06:02,102 - MainThread - INFO - Script started. Press Ctrl+C to stop it at any time.
2025-06-11 20:06:02,102 - MainThread - INFO - FlaskHost or FlaskPort not specified. Web interface will not be started.
2025-06-11 20:06:02,103 - <EMAIL> - INFO - Monitoring <EMAIL> - Folder: inbox
2025-06-11 20:06:02,103 - <EMAIL> - INFO - [<EMAIL> - inbox] Connecting to IMAP server...
2025-06-11 20:06:02,105 - <EMAIL>-inbox - ERROR - [<EMAIL> - inbox] Connection failed (attempt 1): [SSL] record layer failure (_ssl.c:
1028)

I have looked through the documentation of imaplib (and found quite some criticism of the thing online, people recomment this instead: https://pypi.org/project/imap-tools/) but I can't seem to debug this any better than that... On the protonmail-bridge i.e. server side I see there is a connection attempt, but there is nothing logged there of significance.

I do wonder if this might have something to do with the certificate being self-signed, but I'd need a more significant error message to debug that. Attempts to use an SSLContext were unhelpful.

Thanks in advance for any help you could give me on this.
Best regards,

Mark.

Originally created by @Marcool04 on GitHub (Jun 11, 2025). Original GitHub issue: https://github.com/draga79/NotiMail/issues/10 Hi there, I am trying to use this alongside the protonmail-bridge https://github.com/ProtonMail/proton-bridge to get notifications pushed on incoming email via ntfy. I had to make some minor adjustments so that I could set the port as well as the host for the IMAP connexion, as the bridge uses a non-standard one (see https://github.com/Marcool04/NotiMail/ if you're interested). But now I am running into another error which I just can't seem to debug... ```log # notimail --config /etc/notimail/config.ini 2025-06-11 20:06:02,090 - MainThread - INFO - Module availability: 2025-06-11 20:06:02,090 - MainThread - INFO - - Apprise available: True 2025-06-11 20:06:02,090 - MainThread - INFO - - Flask available: True 2025-06-11 20:06:02,090 - MainThread - INFO - - Prometheus client available: True 2025-06-11 20:06:02,090 - MainThread - INFO - PrometheusHost or PrometheusPort not specified. Metrics will not be exposed. 2025-06-11 20:06:02,090 - MainThread - INFO - FlaskHost or FlaskPort not specified. Web interface will not be started. 2025-06-11 20:06:02,090 - MainThread - INFO - Performing initial tests... Warning: no global notification providers configured for the test. 2025-06-11 20:06:02,102 - MainThread - WARNING - Warning: no global notification providers configured for the test. 2025-06-11 20:06:02,102 - MainThread - INFO - Initial tests completed successfully. 2025-06-11 20:06:02,102 - MainThread - INFO - Script started. Press Ctrl+C to stop it at any time. 2025-06-11 20:06:02,102 - MainThread - INFO - FlaskHost or FlaskPort not specified. Web interface will not be started. 2025-06-11 20:06:02,103 - <EMAIL> - INFO - Monitoring <EMAIL> - Folder: inbox 2025-06-11 20:06:02,103 - <EMAIL> - INFO - [<EMAIL> - inbox] Connecting to IMAP server... 2025-06-11 20:06:02,105 - <EMAIL>-inbox - ERROR - [<EMAIL> - inbox] Connection failed (attempt 1): [SSL] record layer failure (_ssl.c: 1028) ``` I have looked through the documentation of imaplib (and found quite some criticism of the thing online, people recomment this instead: https://pypi.org/project/imap-tools/) but I can't seem to debug this any better than that... On the protonmail-bridge i.e. server side I see there is a connection attempt, but there is nothing logged there of significance. I do wonder if this might have something to do with the certificate being self-signed, but I'd need a more significant error message to debug that. Attempts to use an [SSLContext](https://docs.python.org/3/library/ssl.html#ssl.SSLContext) were unhelpful. Thanks in advance for any help you could give me on this. Best regards, Mark.
Sign in to join this conversation.
No labels
enhancement
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/NotiMail#10
No description provided.