-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mod_webmail: Improve attachment handling.
* Fix detection of attachments for FETCH. FETCHLIST was using a different algorithm, so sometimes the list would indicate attachment(s) present, but none were contained in the FETCH response. It turns out the FETCH logic to parse out attachments was inadequate, namely it was looking for a "name" parameter in the Content-Type header, but we should really be looking into the Content-Disposition header instead for "filename" to find the name of the message. This now correctly "finds" attachments that it previously missed. * As part of parsing out attachments, also detect if the attachment was detached previously by a mail client, using X-Mozilla headers. This information would allow a frontend to display more detailed information for attachments that have been detached, just like Mozilla clients do. * The "attachments" array was created twice for non-raw messages. This didn't affect anything, but it is completely superfluous. Move this to the raw branch to ensure it's only created once. * Wrap various MIME debug messages with a macro to disable them.
- Loading branch information
1 parent
8c78afc
commit d31303c
Showing
1 changed file
with
172 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters