Skip to content

Commit

Permalink
MIME: Support RFC2231 for filenames. Bug 466
Browse files Browse the repository at this point in the history
Patch originally from Alexander Shikoff, heavily reworked by JH.
  • Loading branch information
Jeremy Harris committed Apr 25, 2015
1 parent 99c1bb4 commit f846c8f
Show file tree
Hide file tree
Showing 9 changed files with 368 additions and 143 deletions.
3 changes: 2 additions & 1 deletion doc/doc-docbook/spec.xfpt
Original file line number Diff line number Diff line change
Expand Up @@ -31157,7 +31157,8 @@ containing the decoded data.
This is perhaps the most important of the MIME variables. It contains a
proposed filename for an attachment, if one was found in either the
&'Content-Type:'& or &'Content-Disposition:'& headers. The filename will be
RFC2047 decoded, but no additional sanity checks are done. If no filename was
RFC2047 or RFC2231 decoded, but no additional sanity checks are done.
If no filename was
found, this variable contains the empty string.

.vitem &$mime_is_coverletter$&
Expand Down
3 changes: 3 additions & 0 deletions doc/doc-txt/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ JH/24 Verification callouts now attempt to use TLS by default.
HS/01 DNSSEC options (dnssec_require_domains, dnssec_request_domains)
are generic router options now. The defaults didn't change.

JH/25 Bug 466: Add RFC2322 support for MIME attachment filenames.
Original patch from Alexander Shikoff, worked over by JH.


Exim version 4.85
-----------------
Expand Down
9 changes: 6 additions & 3 deletions src/src/macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ a string as a text string. This is sometimes useful for debugging output. */
#define mac_string(s) # s
#define mac_expanded_string(s) mac_string(s)

/* Number of elements of an array */
#define nelem(arr) (sizeof(arr) / sizeof(*arr))


/* When running in the test harness, the load average is fudged. */

Expand Down Expand Up @@ -156,11 +159,11 @@ into big_buffer_size and in some circumstances increased. It should be at least
as long as the maximum path length. */

#if defined PATH_MAX && PATH_MAX > 16384
#define BIG_BUFFER_SIZE PATH_MAX
# define BIG_BUFFER_SIZE PATH_MAX
#elif defined MAXPATHLEN && MAXPATHLEN > 16384
#define BIG_BUFFER_SIZE MAXPATHLEN
# define BIG_BUFFER_SIZE MAXPATHLEN
#else
#define BIG_BUFFER_SIZE 16384
# define BIG_BUFFER_SIZE 16384
#endif

/* header size of pipe content
Expand Down
Loading

0 comments on commit f846c8f

Please sign in to comment.