diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2019-11-19 20:26:41 +0100 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2019-11-19 20:26:41 +0100 |
commit | 150c6cb82be94fc9abb0ecaff4615a2e2d6fdf68 (patch) | |
tree | c4cd0d284e631ab632b548ffb58a349372856812 /interimap | |
parent | 3180560255e1d5821ea03570f54aa39e85608d5e (diff) | |
parent | 13337de269b207136e2462c3f1f7fbd842522a7c (diff) |
Merge branch 'master' into debian
Diffstat (limited to 'interimap')
-rwxr-xr-x | interimap | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1154,8 +1154,11 @@ sub callback_new_message($$$$;$$$) { my ($idx, $mailbox, $name, $mail, $UIDs, $buff, $bufflen) = @_; return unless exists $mail->{RFC822}; # not for us - my $length = length ${$mail->{RFC822}}; + my $length = length(${$mail->{RFC822}} // ""); if ($length == 0) { + # the RFC822 attribute can be NIL or empty (it's an nstring), however + # NIL can't be used in APPEND commands, and RFC 3502 sec. 6.3.11 + # explicitly forbids zero-length messages, so we ignore these here msg2($name => $mailbox, "WARNING: Ignoring new 0-length message (UID $mail->{UID})"); return; } |