Closed HandyGuySoftware closed 5 years ago
This appears to be an issue with the way POP3 is managed on the server. POP3 will mark emails as read once it is downloaded. The next time you try to download those messages will not be re-downloaded.
To fix, you must use the "Leave email on server" option in your email client. This will leave the emails on the server and make them available for future use.
Also, if using Gmail, you must alter the email server username to recent:username@gmail.com
. This tells Gmail to download the most recent 30 days of email. Otherwise, it will start from the oldest email in your inbox.
I can confirm that the "extractHeaders" issue is fixed with Issue_105 release. But still, the emails produced are empty, although slightly different. It now has the line below: "No new activity. Last activity on 01/01/1970 at 02:00:00 (17917 days ago)"
“Leave messages on the server” is already checked to my Outlook. I've even tried to mark as unread the mails from the webmail.
Probably, it has something to do with this:
Next Message: Date=[Mon, 21 Jan 2019 13:06:36 +0200] Subject=[Duplicati Backup report for] Message-Id=[<UCHLA02SJ6U4.1T0UJU1MBUET@COMPUTERNAME>]
srcregex=[\w*\-] destRegex=[\-\w*]
SrcDestDelimeter [-] not found in subject line. Skipping message.
dremail.processNextMessage()
I don't know if it's a misconfiguration from me or a thing with the POP3.
I've attached the latest log file (verbose=3) dupReport.log.zip
1/1/1970 is the earliest date that can be recorded on a system. This message means that dR has never recorded a backup for a particular backup job before.
The log shows that dR is not finding the proper pattern in the subject. This is shown by
Subject=[Duplicati Backup report for Outlook]
and
subject=[Duplicati Backup report for]
How do you have your Duplicati backup jobs named? For dR to work properly, you backup jobs must be named in the form:
<source><delimiter><destination>
for example:
Outlook-BackupServer
where \<source> is "Outlook", \<delimiter> is "-", and \<destination> is "BackupServer"
See the section on Source/Destination pairs in the docs for a better explanation of how this works. dR is skipping these mesages because the subject lines don't match the standard pattern. As a result, it doesn't see these as valid backup emails.
Sorry for that. I knew i forgot something!
I changed "send-mail-subject" to:
Duplicati %OPERATIONNAME% report for %backup-name%-Test
and now it seems to find the new e-mails and the dupReport.db has a new entry in "backupsets" table!
But now a new error occurs:
C:\dupReport>python dupReport.py -v3
Traceback (most recent call last):
File "dupReport.py", line 234, in <module>
nxtMsg = globs.inServer.processNextMessage()
File "C:\dupReport\dremail.py", line 414, in processNextMessage
globs.log.write(3, 'Message Body=[{}]'.format(msgBody))
File "C:\dupReport\log.py", line 88, in write
logTarget.write(msg)
File "C:\Users\%USERNAME%\AppData\Local\Programs\Python\Python37\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position 538-539: character maps to <undefined>
I've attached the latest log file (verbose=3) dupReport.log
I uploaded a small patch to the Issue_105 code. Not sure if this is a final fix, but let's see if it works.
Sorry...
C:\dupReport3>python dupReport.py -v3
Traceback (most recent call last):
File "dupReport.py", line 234, in <module>
nxtMsg = globs.inServer.processNextMessage()
File "C:\dupReport3\dremail.py", line 431, in processNextMessage
dateParts['endTimestamp'] = self.parenOrRaw(statusParts['endTimeStr'], df = dt, tf = tm, tz = msgParts['timezone'])
File "C:\dupReport3\dremail.py", line 229, in parenOrRaw
globs.log.write(1,'dremail.parenOrRaw({}, {}, {}, {})'.format(val, df, tf, tz))
File "C:\dupReport3\log.py", line 88, in write
logTarget.write(msg)
File "C:\Users\%USERNAME%\AppData\Local\Programs\Python\Python37\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position 37-38: character maps to <undefined>
I've attached the latest log file (verbose=3) dupReport.log
I think I know what the issue is, just trying to find the best place to fix it. Just made another patch & uploaded to Issue_105 branch. Have a try and see if it works. Fingers crossed!
And now it works! Thank you so much.
Good to hear it's working. I'll move this over to pre_prod and let it test out for a while until I fully release it. Watch the Duplicati forum page for announcements on when that happens.
Fixed in 2.2.5
From @peoman, related to Issue #105
Emails are being read & properly parsed, but extraction from database returning empty results, final report is empty.
dupReport.log