-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve handling of 8bit message content and message/global
#4926
Commits on Jul 25, 2024
-
charset: refactor write_mime_param to append_mime_param
Turns out that most uses of this function force a newline before the parameter anyway, so don't require the caller to provide the header prefix length. Signed-off-by: Robert Stepanek <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d2ead56 - Browse repository at this point
Copy the full SHA d2ead56View commit details -
jmap_mail: remove unused jpart field from struct emailpart
Signed-off-by: Robert Stepanek <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 87fec32 - Browse repository at this point
Copy the full SHA 87fec32View commit details -
JMAPEmail: fix email_set_bodystructure test
It passed a non-ascii blob as text/plain content.
Configuration menu - View commit details
-
Copy full SHA for 6705d51 - Browse repository at this point
Copy the full SHA 6705d51View commit details -
JMAPEmail: update email_set_encode_plain_text_attachment test
Email/set now sanitizes bare LF in inlined text bodies, rather than keeping it as-is and using quoted-printable encoding.
Configuration menu - View commit details
-
Copy full SHA for 7419a7a - Browse repository at this point
Copy the full SHA 7419a7aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6e6cf1a - Browse repository at this point
Copy the full SHA 6e6cf1aView commit details -
JMAPEmail: fix tests creating attachments without type
A couple of tests created email attachments using binary data without specifying the MIME type of the body part. The new safeguards catch this as inappropriate values for the default text/plain MIME type.
Configuration menu - View commit details
-
Copy full SHA for 9c46bf8 - Browse repository at this point
Copy the full SHA 9c46bf8View commit details -
Configuration menu - View commit details
-
Copy full SHA for cb14101 - Browse repository at this point
Copy the full SHA cb14101View commit details -
jmap_mail: rewrite JMAP Email to MIME conversion
This updates how Email/set{create} creates MIME message from JMAP Email objects. - Inline plain text is rewritten before conversion regardless if its content is sourced from an EmailBodyValue or Blob. Non-plain text content now never is rewritten, even if it is defined with in a EmailBodyValue. - If the charset property for inline plain text declares the content to be ASCII or UTF-8, then the EmailBodyPart is rejected for invalid characters. - The content transfer encoding for "message" media types is chosen by the media subtype, e.g. "message/rfc822" and "message/global" are handled differently. - Bare carriage returns in inline plain text now get expanded to CRLF, rather than omitted from the body part contents. - Transfer encoding names are written in lowercase, e.g. "8bit" rather than "8BIT".
Configuration menu - View commit details
-
Copy full SHA for e33f79a - Browse repository at this point
Copy the full SHA e33f79aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 173c8d4 - Browse repository at this point
Copy the full SHA 173c8d4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3514953 - Browse repository at this point
Copy the full SHA 3514953View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1501287 - Browse repository at this point
Copy the full SHA 1501287View commit details -
message.c: support encoded message/rfc822 attachments
Up until now the Content-Transfer-Encoding header for message/rfc822 attachments was ignored. That is fine for rfc822 but we want to treat message/rfc822 and message/global equally, and the global subtype does allow its content to be encoded. This patch changes the parse code to not throw away the encoding identifier of a message/rfc822 body part before storing it in cache. It bumps the mailbox minor cache version to indicate this and handles previous versions on read.
Configuration menu - View commit details
-
Copy full SHA for 6236320 - Browse repository at this point
Copy the full SHA 6236320View commit details -
Configuration menu - View commit details
-
Copy full SHA for a2684ec - Browse repository at this point
Copy the full SHA a2684ecView commit details -
Configuration menu - View commit details
-
Copy full SHA for ad972ea - Browse repository at this point
Copy the full SHA ad972eaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 81f24f8 - Browse repository at this point
Copy the full SHA 81f24f8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6ffa713 - Browse repository at this point
Copy the full SHA 6ffa713View commit details -
Configuration menu - View commit details
-
Copy full SHA for d710353 - Browse repository at this point
Copy the full SHA d710353View commit details -
Configuration menu - View commit details
-
Copy full SHA for b319721 - Browse repository at this point
Copy the full SHA b319721View commit details -
jmap_mail.c: do not set "User-Agent" header in Email/set{create}
The User-Agent header is not defined for MIME messages, it only is defined for NetNews and HTTP. Use "X-Mailer" instead which at least is mentioned in RFC 2076.
Configuration menu - View commit details
-
Copy full SHA for 0548d12 - Browse repository at this point
Copy the full SHA 0548d12View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3523888 - Browse repository at this point
Copy the full SHA 3523888View commit details -
xapian_wrap.cc: normalize text using libicu's NFKC with CaseFolding
This changes the Xapian backend to normalize any text using NFKC with CaseFolding before indexing and querying. It bumps the Xapian index version to 17. The default stemmer keeps using lowercase Cyrus Search Form. If any of the existing indexes contains version 16 or less, then queries search for any terms that either match the NFKC-normalized term or the unnormalized term.
Configuration menu - View commit details
-
Copy full SHA for 1f2c238 - Browse repository at this point
Copy the full SHA 1f2c238View commit details -
Configuration menu - View commit details
-
Copy full SHA for 907841c - Browse repository at this point
Copy the full SHA 907841cView commit details -
Configuration menu - View commit details
-
Copy full SHA for a07a655 - Browse repository at this point
Copy the full SHA a07a655View commit details -
Configuration menu - View commit details
-
Copy full SHA for 86b00ca - Browse repository at this point
Copy the full SHA 86b00caView commit details -
message.h: refactor find_msgid from global.h to message_iter_msgid
It really didn't belong to global.h in the first place.
Configuration menu - View commit details
-
Copy full SHA for a66cd01 - Browse repository at this point
Copy the full SHA a66cd01View commit details -
index.c: convert all search part text before indexing
Up until now, Cyrus did not convert the contents of header fields and a couple of iCalendar properties to search form. This required us to convert those part contents to lower case in the Xapian wrapper, but we rather want this all proper NFKC-casefolded. Calling charset_convert on these values before sending them to the indexer makes sure all indexed text is in proper form.
Configuration menu - View commit details
-
Copy full SHA for 32d6515 - Browse repository at this point
Copy the full SHA 32d6515View commit details -
Configuration menu - View commit details
-
Copy full SHA for 49101b4 - Browse repository at this point
Copy the full SHA 49101b4View commit details -
jmap_mail.c: calculate query costs after search, not before
The query runner might rewrite the search query before running it, so report the query costs after that.
Configuration menu - View commit details
-
Copy full SHA for def1e20 - Browse repository at this point
Copy the full SHA def1e20View commit details -
Configuration menu - View commit details
-
Copy full SHA for a9c0298 - Browse repository at this point
Copy the full SHA a9c0298View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3197e42 - Browse repository at this point
Copy the full SHA 3197e42View commit details -
Configuration menu - View commit details
-
Copy full SHA for 23014b3 - Browse repository at this point
Copy the full SHA 23014b3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 264f3fc - Browse repository at this point
Copy the full SHA 264f3fcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 65e9338 - Browse repository at this point
Copy the full SHA 65e9338View commit details