This is an automated email from the ASF dual-hosted git repository.
dill0wn pushed a commit to branch dw/smtp_line_length
in repository https://gitbox.apache.org/repos/asf/allura.git
The following commit(s) were added to refs/heads/dw/smtp_line_length by this
push:
new 4c8a2b8 fixup! fix email headers being longer than SMTP limit
4c8a2b8 is described below
commit 4c8a2b8fc0dcfda347fb3bd6311dc1eae1c16c82
Author: Dillon Walls <[email protected]>
AuthorDate: Fri Dec 17 19:04:55 2021 +0000
fixup! fix email headers being longer than SMTP limit
---
Allura/allura/lib/mail_util.py | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/Allura/allura/lib/mail_util.py b/Allura/allura/lib/mail_util.py
index 36a3b19..00a6e71 100644
--- a/Allura/allura/lib/mail_util.py
+++ b/Allura/allura/lib/mail_util.py
@@ -17,7 +17,6 @@
from __future__ import unicode_literals
from __future__ import absolute_import
-from __future__ import annotations
import re
import logging
import smtplib
@@ -25,7 +24,7 @@ import email.parser
from six.moves.email_mime_multipart import MIMEMultipart
from six.moves.email_mime_text import MIMEText
from email import header
-import typing
+from email.message import EmailMessage
import six
import tg
@@ -39,9 +38,6 @@ from allura.lib import exceptions as exc
from allura.lib import helpers as h
from six.moves import map
-if typing.TYPE_CHECKING:
- from email.message import EmailMessage
-
log = logging.getLogger(__name__)
RE_MESSAGE_ID = re.compile(r'<(?:[^>]*/)?([^>]*)>')
@@ -53,7 +49,7 @@ config = ConfigProxy(
EMAIL_VALIDATOR = fev.Email(not_empty=True)
# http://www.jebriggs.com/blog/2010/07/smtp-maximum-line-lengths/
-MAX_MAIL_LINE_OCTETS = 998 # RFC 1000 - len(CRLF)
+MAX_MAIL_LINE_OCTETS = 990
def Header(text, *more_text):