thp / urlwatch

Watch (parts of) webpages and get notified when something changes via e-mail, on your phone or via other means. Highly configurable.
https://thp.io/2008/urlwatch/
Other
2.81k stars 352 forks source link

Some mails can't be sent due to header length limitation #702

Closed JulienPalard closed 2 years ago

JulienPalard commented 2 years ago

Since a few days I spotted:

smtplib.SMTPDataError: (550, b'maximum allowed line length is 998 octets, got 1110')

I traced it to the subject line:

Subject: 14 changes: (followerd by 14 urls)

So a quick fix can be to change the subject setting, in the report.email section to:

subject: '{count} changes.'
JulienPalard commented 2 years ago

I bet the issue should be reported cpython side, maybe email.base64mime.header_encode should split the line?

Not even, but there's a parameter to give that defaults to no wrapping :(

thp commented 2 years ago

Merged, thanks!