Check-in [a0bfc52b64]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Updated TODO.md.
Timelines: family | ancestors | descendants | both | dotnet
Files: files | file ages | folders
SHA1: a0bfc52b64f1be5c3feb90aeb406b277464a7484
User & Date: tinus 2019-09-10 19:08:53
Wiki:dotnet
Context
2019-09-10
19:32
Added repository for MessageReferences. check-in: e1327afe6c user: tinus tags: dotnet
19:09
Merge dotnet into dotnet/timers. check-in: e0c73936fc user: tinus tags: dotnet/timers
19:08
Updated TODO.md. check-in: a0bfc52b64 user: tinus tags: dotnet
19:00
Bugfix: PopulateReferences should now be able to cope with duplicate RfcMessageIDs. check-in: 0f00f13c99 user: tinus tags: dotnet
Changes

Changes to TODO.md.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# TO DO

## Fix bugs

* ✔ ~~Correct the folder filter, so that it _actually_ skips the trash, spam, and all mail folders.~~
* ✔ ~~Try fixing the message with unparseable headers:~~

      System.FormatException: Failed to parse message headers.
         at MimeKit.MimeParser.ParseMessageAsync(CancellationToken cancellationToken)
         at MailKit.Net.Imap.ImapEngine.ParseMessageAsync(Stream stream, Boolean persistent, Boolean doAsync, CancellationToken cancellationToken)
         at MailKit.Net.Imap.ImapFolder.ParseMessageAsync(Stream stream, Boolean doAsync, CancellationToken cancellationToken)
         at MailKit.Net.Imap.ImapFolder.GetMessageAsync(UniqueId uid, Boolean doAsync, CancellationToken cancellationToken, ITransferProgress progress)
         at MailJanitor.MailSynchronizer.SynchronizeMessage(IMessageSummary summary, IMailFolder mailFolder, Int64 folderID, Nullable`1 folderMsgID, Nullable`1 messageID) in /home/tinus/code/mailjanitor/MailSynchronizer.cs:line 312

  - ~~Download the message's stream, save that to file, then load it as string, and while the first line starts with a spacing character, remove that first line.~~
  - ~~Then, try parsing the message again. If successful, continue processing as normal.~~

* ✔ ~~Better handling of impossible dates for Zip entry:~~

      System.ArgumentOutOfRangeException: The DateTimeOffset specified cannot be converted into a Zip file timestamp.
      Parameter name: value
         at System.IO.Compression.ZipArchiveEntry.set_LastWriteTime(DateTimeOffset value)
         at MailJanitor.MailSynchronizer.PopulateMessageAsync(UnitOfWork work, Message targetMsg, MimeMessage sourceMsg, IEnumerable`1 keywords, IEnumerable`1 labels) in /home/tinus/code/mailjanitor/MailSynchronizer.cs:line 422
         at MailJanitor.MailSynchronizer.SynchronizeMessage(IMessageSummary summary, IMailFolder mailFolder, Int64 folderID, Nullable`1 folderMsgID, Nullable`1 messageID) in /home/tinus/code/mailjanitor/MailSynchronizer.cs:line 340

* Better handling of duplicate RfcMessageIDs:

      System.ArgumentException: An item with the same key has already been added. Key: 1949688653-1463792126-1170105986@boing.topica.com
         at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
         at System.Linq.AsyncEnumerable.<>c__DisplayClass452_0`3.<ToDictionary>b__0(Dictionary`2 d, TSource x) in D:\a\1\s\Ix.NET\Source\System.Interactive.Async\ToCollection.cs:line 143
         at System.Linq.AsyncEnumerable.Aggregate_[TSource,TAccumulate,TResult](IAsyncEnumerable`1 source, TAccumulate seed, Func`3 accumulator, Func`2 resultSelector, CancellationToken cancellationToken) in D:\a\1\s\Ix.NET\Source\System.Interactive.Async\Aggregate.cs:line 123
         at MailJanitor.MailSynchronizer.PopulateReferencesAsync(UnitOfWork work, Message targetMsg, MimeMessage sourceMsg) in /home/tinus/code/mailjanitor/MailSynchronizer.cs:line 682
         at MailJanitor.MailSynchronizer.PopulateMessageAsync(UnitOfWork work, Message targetMsg, MimeMessage sourceMsg, IEnumerable`1 keywords, IEnumerable`1 labels) in /home/tinus/code/mailjanitor/MailSynchronizer.cs:line 439
         at MailJanitor.MailSynchronizer.SynchronizeMessage(IMessageSummary summary, IMailFolder mailFolder, Int64 folderID, Nullable`1 folderMsgID, Nullable`1 messageID) in /home/tinus/code/mailjanitor/MailSynchronizer.cs:line 340

## Feature: improve robustness

* When a message cannot be downloaded or processed, we should record this, and try again next time (even if the folder's UIDNext is unchanged).
  - Add a nullable `error` text field to `FolderMessage`, where we store the full exception text.
  - When selecting the UIDs to download, make sure we pick up the ones with a non-null `error` field.
  - When the folder would be skipped based on UIDNext, check if there are no errored messages; if so, process the folder anyway.



<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







1
2

































3
4
5
6
7
8
9
# TO DO


































## Feature: improve robustness

* When a message cannot be downloaded or processed, we should record this, and try again next time (even if the folder's UIDNext is unchanged).
  - Add a nullable `error` text field to `FolderMessage`, where we store the full exception text.
  - When selecting the UIDs to download, make sure we pick up the ones with a non-null `error` field.
  - When the folder would be skipped based on UIDNext, check if there are no errored messages; if so, process the folder anyway.