diff --git a/lib/IMAP/ImapMessageFetcher.php b/lib/IMAP/ImapMessageFetcher.php index 4d38dd2f79..0d476329e8 100644 --- a/lib/IMAP/ImapMessageFetcher.php +++ b/lib/IMAP/ImapMessageFetcher.php @@ -314,8 +314,11 @@ private function getPart(Horde_Mime_Part $p, string $partNo, bool $isFetched): v } } + $isAttachment = ($p->isAttachment() || $p->getType() === 'message/rfc822') && + !in_array($p->getType(), ['application/pgp-signature', 'application/pkcs7-signature', 'application/x-pkcs7-signature']); + // Regular attachments - if ($p->isAttachment() || $p->getType() === 'message/rfc822') { + if ($isAttachment) { $this->attachments[] = [ 'id' => $p->getMimeId(), 'messageId' => $this->uid,