2021-10-11 10:00:37 +00:00
|
|
|
"""Email headers"""
|
|
|
|
MESSAGE_ID = "Message-ID"
|
|
|
|
IN_REPLY_TO = "In-Reply-To"
|
|
|
|
REFERENCES = "References"
|
2022-03-07 14:57:29 +00:00
|
|
|
DATE = "Date"
|
2021-10-11 10:10:18 +00:00
|
|
|
SUBJECT = "Subject"
|
|
|
|
FROM = "From"
|
|
|
|
TO = "To"
|
|
|
|
CONTENT_TYPE = "Content-Type"
|
2021-10-11 10:19:21 +00:00
|
|
|
CONTENT_DISPOSITION = "Content-Disposition"
|
|
|
|
CONTENT_TRANSFER_ENCODING = "Content-Transfer-Encoding"
|
2021-10-11 10:10:18 +00:00
|
|
|
MIME_VERSION = "Mime-Version"
|
|
|
|
REPLY_TO = "Reply-To"
|
|
|
|
RECEIVED = "Received"
|
|
|
|
CC = "Cc"
|
|
|
|
DKIM_SIGNATURE = "DKIM-Signature"
|
|
|
|
X_SPAM_STATUS = "X-Spam-Status"
|
2021-11-02 13:36:37 +00:00
|
|
|
LIST_UNSUBSCRIBE = "List-Unsubscribe"
|
|
|
|
LIST_UNSUBSCRIBE_POST = "List-Unsubscribe-Post"
|
2021-10-11 10:10:18 +00:00
|
|
|
|
|
|
|
# headers used to DKIM sign in order of preference
|
|
|
|
DKIM_HEADERS = [
|
|
|
|
[MESSAGE_ID.encode(), DATE.encode(), SUBJECT.encode(), FROM.encode(), TO.encode()],
|
|
|
|
[FROM.encode(), TO.encode()],
|
|
|
|
[MESSAGE_ID.encode(), DATE.encode()],
|
|
|
|
[FROM.encode()],
|
|
|
|
]
|
2021-10-11 10:19:21 +00:00
|
|
|
|
|
|
|
SL_DIRECTION = "X-SimpleLogin-Type"
|
|
|
|
SL_EMAIL_LOG_ID = "X-SimpleLogin-EmailLog-ID"
|
|
|
|
SL_ENVELOPE_FROM = "X-SimpleLogin-Envelope-From"
|
|
|
|
SL_ENVELOPE_TO = "X-SimpleLogin-Envelope-To"
|
2022-03-16 09:24:59 +00:00
|
|
|
SL_CLIENT_IP = "X-SimpleLogin-Client-IP"
|
2021-10-11 10:19:21 +00:00
|
|
|
|
2021-11-25 09:34:42 +00:00
|
|
|
# to let Rspamd know that the message should be signed
|
|
|
|
SL_WANT_SIGNING = "X-SimpleLogin-Want-Signing"
|
|
|
|
|
2021-10-11 10:19:21 +00:00
|
|
|
MIME_HEADERS = [
|
|
|
|
MIME_VERSION,
|
|
|
|
CONTENT_TYPE,
|
|
|
|
CONTENT_DISPOSITION,
|
|
|
|
CONTENT_TRANSFER_ENCODING,
|
|
|
|
]
|
|
|
|
# convert to lowercase to facilitate header look up
|
|
|
|
MIME_HEADERS = [h.lower() for h in MIME_HEADERS]
|
2022-01-04 17:06:08 +00:00
|
|
|
|
2022-01-05 14:21:54 +00:00
|
|
|
|
|
|
|
# according to https://datatracker.ietf.org/doc/html/rfc3834#section-3.1.7, this header should be set to "auto-replied"
|
|
|
|
# however on hotmail, this is set to "auto-generated"
|
|
|
|
AUTO_SUBMITTED = "Auto-Submitted"
|