Re: [exim] MIME errors and MIME ACL

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Tom Kistner
Dátum:  
Címzett: Dickenson, Steven
CC: Exim-users
Tárgy: Re: [exim] MIME errors and MIME ACL
Dickenson, Steven wrote:

> However, a quick examination of the source shows only two MIME anomaly
> errors in mime.h:
>
> #define MIME_ANOMALY_BROKEN_BASE64    2, "Broken BASE64 encoding
> detected"
> #define MIME_ANOMALY_BROKEN_QP        1, "Broken Quoted-Printable
> encoding detected"


Thats for starters :) I didn't even document it yet.

> Is there some way of recreating these sanity checks using ACL statement,
> or are we going to need to wait until Tom adds more sanity checks to the
> source?


The former. You can implement most of the old error conditions through
the logic of the MIME ACL itself. These are:

MIME_ERRORLEVEL_TOO_MANY_PARTS (check $mime_part_count)

MIME_ERRORLEVEL_LONG_LINE (using 'regex' with "^.{1024}$", for example).

MIME_ERRORLEVEL_MESSAGE_PARTIAL (check $mime_content_type)

MIME_ERRORLEVEL_FILENAME_LENGTH
MIME_ERRORLEVEL_BOUNDARY_LENGTH (using ${strlen:<string>})

These include all the previous level 3 errors.

UUDECODING is not supported any more but you can use an external
unpacker using ${run, likewise for tnef.

The MIME ACL is much more flexible than the black-box-like demime code
but that advantage comes with the price of larger ACLs :)

/tom