You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to setup the docker container within my home network and have set up the A, AAAA and MX records
But when ever I try to send mails to it ( wether its Thunderbird or smtpmail or even telnet directly ), i'm then always ending with that NoneType error
It looks like it fails completely is a message doesn't have a subject which I feel should be valid
It's setup here at first with pure plaintext and port 25
This is when I try to telnet directly in to the server and send the mail directly to it
tanja@ubuntu:~$ telnet 192.168.83.12 25
Trying 192.168.83.12...
Connected to 192.168.83.12.
Escape character is '^]'.
220 labmail.home.tanja84.dk Python SMTP 1.4.6
HELO labclient.home.tanja84.dk
250 labmail.home.tanja84.dk
mail from: [email protected]
250 OK
rcpt to: [email protected]
250 OK
data
354 End data with <CR><LF>.<CR><LF>
This is a small test mail
Hope this works this time
.
500 Error: (TypeError) expected string or bytes-like object, got 'NoneType'```
And this is the traceback from within the servers container
2025-03-05 03:28:16,992 - __main__ - DEBUG - Receiving message from: ('192.168.88.5', 58872) (Plaintext)
2025-03-05 03:28:16,994 - __main__ - DEBUG - Message addressed from: [email protected]
2025-03-05 03:28:16,994 - __main__ - DEBUG - Message addressed to: ['[email protected]']
('192.168.88.5', 58872) SMTP session exception
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/aiosmtpd/smtp.py", line 756, in _handle_client
await method(arg)
File "/usr/lib/python3.11/site-packages/aiosmtpd/smtp.py", line 1519, in smtp_DATA
status = await self._call_handler_hook('DATA')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/aiosmtpd/smtp.py", line 473, in _call_handler_hook
status = await hook(self, self.session, self.envelope, *args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/www/opentrashmail/python/mailserver3.py", line 56, in handle_DATA
subject = str(make_header(decode_header(message['subject'])))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/email/header.py", line 78, in decode_header
if not ecre.search(header):
^^^^^^^^^^^^^^^^^^^
TypeError: expected string or bytes-like object, got 'NoneType'
The text was updated successfully, but these errors were encountered:
tanja84dk
changed the title
Recieving a NoneType error when sending a mail to its server
Recieving a NoneType error when sending a mail to its server when no subject
Mar 5, 2025
I tried to setup the docker container within my home network and have set up the A, AAAA and MX records
But when ever I try to send mails to it ( wether its Thunderbird or smtpmail or even telnet directly ), i'm then always ending with that NoneType error
It looks like it fails completely is a message doesn't have a subject which I feel should be valid
It's setup here at first with pure plaintext and port 25
This is when I try to telnet directly in to the server and send the mail directly to it
And this is the traceback from within the servers container
The text was updated successfully, but these errors were encountered: