mirror of
https://github.com/OfflineIMAP/offlineimap.git
synced 2024-06-23 07:16:38 +02:00
First (local) working version
This commit is contained in:
parent
67d35dbbcb
commit
505bb7a164
|
@ -1054,6 +1054,24 @@ remoteuser = username
|
||||||
#reference = Mail
|
#reference = Mail
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# This option stands in the [Repository RemoteExapmle] section.
|
||||||
|
#
|
||||||
|
# Some mail provider like https://www.fastmail.com/ display in their web interface
|
||||||
|
# the internaldate of their emails. Therefore it is sometimes desirable, to set the
|
||||||
|
# internaldate to the value of the Date header.
|
||||||
|
#
|
||||||
|
# Available options are:
|
||||||
|
# - timestamp (the timestamp of the local file)
|
||||||
|
# - header (the Date header of the email)
|
||||||
|
# - imap (let the IMAP server set the internaldate)
|
||||||
|
#
|
||||||
|
# Default is timestamp
|
||||||
|
#
|
||||||
|
#internal_date_for_append_method = header
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# DEPRECATED: This option stands in the [Repository RemoteExample] section.
|
# DEPRECATED: This option stands in the [Repository RemoteExample] section.
|
||||||
#
|
#
|
||||||
# IMAP defines an encoding for non-ASCII ("international") characters. Enable
|
# IMAP defines an encoding for non-ASCII ("international") characters. Enable
|
||||||
|
|
|
@ -534,11 +534,16 @@ class IMAPFolder(BaseFolder):
|
||||||
:returns: string in the form of "DD-Mmm-YYYY HH:MM:SS +HHMM"
|
:returns: string in the form of "DD-Mmm-YYYY HH:MM:SS +HHMM"
|
||||||
(including double quotes) or `None` in case of failure
|
(including double quotes) or `None` in case of failure
|
||||||
(which is fine as value for append)."""
|
(which is fine as value for append)."""
|
||||||
|
|
||||||
if rtime is None:
|
# if config parameter is set respect this setting:
|
||||||
|
# for the default value we don't need to change anything
|
||||||
|
internal_date_for_append_method = self.repository.getconf('internal_date_for_append_method', 'timestamp')
|
||||||
|
|
||||||
|
if internal_date_for_append_method == 'imap':
|
||||||
|
return None
|
||||||
|
elif internal_date_for_append_method == 'header':
|
||||||
rtime = emailutil.get_message_date(content)
|
rtime = emailutil.get_message_date(content)
|
||||||
if rtime == None:
|
|
||||||
return None
|
|
||||||
datetuple = time.localtime(rtime)
|
datetuple = time.localtime(rtime)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user