Skip to content

Support $HasAttachment/$HasNoAttachment keywords for "With attachment" search filter #10053

@jprenken

Description

@jprenken

Dovecot populates $HasAttachment or $HasNoAttachment keywords based on its own, configurable detection of whether a message contains an attachment. Roundcube supports using these IMAP keywords to populate the "has attachment" column in the message list.

In Dovecot 2.4.2, "by default, all MIME parts with Content-Disposition=attachment or inlines with filename parameter are considered attachments," and the application/signature content-type is excluded.

However, this is inconsistent with how Roundcube implements the "With attachment" search filter, which just looks for application/ or multipart/{mixed, signed, report} content-types.

This means that when a Roundcube user turns on the "With attachment" search filter, they may see a message list that a) excludes messages with Content-Disposition=attachment parts with unexpected content-types, and b) includes messages with inline attachments without a filename (like images or signatures). That message list's own "has attachment" column may show some with and some without, even though the user searched for messages "With attachment." The cause of this behaviour isn't obvious to an end user, and can be confusing to see (and troubleshoot).

It would be nice if Roundcube could make this search filter a special case that uses the $HasAttachment and $HasNoAttachment keywords when they're available, instead of adding content-type checks to the IMAP filter string, so that the filter's results match the message list's behaviour.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions