diff options
| author | Sam Varshavchik | 2018-12-09 23:11:49 -0500 |
|---|---|---|
| committer | Sam Varshavchik | 2018-12-09 23:11:49 -0500 |
| commit | 8a43c2fe3b84d9825c9f9ca37ebda6678f9cfd82 (patch) | |
| tree | 1729bc47bdcdf722be181a440129bab54efc67f1 | |
| parent | a1d3a864cf488e9bd2c49dc01289e49d857fdeb7 (diff) | |
| download | courier-libs-8a43c2fe3b84d9825c9f9ca37ebda6678f9cfd82.tar.bz2 | |
Send a Unicode alert at most once per message.
| -rw-r--r-- | imap/ChangeLog | 5 | ||||
| -rw-r--r-- | imap/fetch.c | 5 | ||||
| -rw-r--r-- | imap/imapd.c | 2 | ||||
| -rw-r--r-- | imap/imapscanclient.c | 2 | ||||
| -rw-r--r-- | imap/imapscanclient.h | 3 |
5 files changed, 15 insertions, 2 deletions
diff --git a/imap/ChangeLog b/imap/ChangeLog index 339bc7e..d91fd8a 100644 --- a/imap/ChangeLog +++ b/imap/ChangeLog @@ -1,3 +1,8 @@ +2018-12-09 Sam Varshavchik <mrsam@courier-mta.com> + + * fetch.c: Send an alert about a Unicode messages to a non-Unicode + client at most once per IMAP session. + 5.0.4 2018-11-28 Hideki SAKAMOTO <hsakamt@tsnr.com> diff --git a/imap/fetch.c b/imap/fetch.c index d38ca85..5daf150 100644 --- a/imap/fetch.c +++ b/imap/fetch.c @@ -299,8 +299,13 @@ int do_fetch(unsigned long n, int byuid, void *p) return (0); } + if (current_maildir_info.msgs[n-1].err8bitflag) + unicode_err=0; + if (unicode_err) { + current_maildir_info.msgs[n-1].err8bitflag=1; + writes("* OK [ALERT] Message "); writen(n); writes(" appears to be a Unicode message and your" diff --git a/imap/imapd.c b/imap/imapd.c index b71eb57..a38e2aa 100644 --- a/imap/imapd.c +++ b/imap/imapd.c @@ -1334,6 +1334,8 @@ void doNoop(int real_noop) #endif new_maildir_info.msgs[j].copiedflag= current_maildir_info.msgs[i].copiedflag; + new_maildir_info.msgs[j].err8bitflag= + current_maildir_info.msgs[i].err8bitflag; ++j; } diff --git a/imap/imapscanclient.c b/imap/imapscanclient.c index da79c70..515abc2 100644 --- a/imap/imapscanclient.c +++ b/imap/imapscanclient.c @@ -868,7 +868,7 @@ int dowritecache=0; scaninfo->msgs[i].filename=tempinfo_array[i]->filename; scaninfo->msgs[i].keywordMsg=NULL; scaninfo->msgs[i].copiedflag=0; - + scaninfo->msgs[i].err8bitflag=0; #if SMAP if (smapflag) scaninfo->msgs[i].recentflag=0; diff --git a/imap/imapscanclient.h b/imap/imapscanclient.h index 2b01180..373bc83 100644 --- a/imap/imapscanclient.h +++ b/imap/imapscanclient.h @@ -23,6 +23,7 @@ struct imapscanmessageinfo { char storeflag; /* Used by imap_addRemoveKeywords() */ + char err8bitflag; /* Invalid 8 bit header error was reported */ /* When reading keywords, hash messages by filename */ struct imapscanmessageinfo *firstBucket, *nextBucket; @@ -59,7 +60,7 @@ struct uidplus_info { unsigned long uid; /* Initialized by imapscan_maildir2 */ unsigned long old_uid; /* Initialized by do_copy() */ - + time_t mtime; } ; |
