Taimur Awan wrote:

Hi there,

In Your mail u have asked two questions,
1: Does your mail contain any attachments?
   Answer is that the emails which generate these exceptions do not have
any attachments.
2: Are there any attachments for which it should match?
   Answer is that we have defined a few attachments extensions to be
blocked by this   matcher E.g. exe, piff, bat etc.


My question 2 applies only if answer is yes for question 1.

As the purpose is to find matching attachments, the code is written with the following 
logic:

1) If there are attachements
        1.1) If at least one of them matches, the matcher returns a match.
        1.2) If none of them matches
                1.2.1) If there is no exception, the matcher returns a no-match.
                1.2.2) If there is any exception, the matcher throws a 
MessagingException.
2) If there are no attachements
        2.1) If there is no exception, the matcher returns a no-match.
        2.2) If there is any exception, the matcher throws a MessagingException.

The important thing here is that in case 1.1 an exception is never thrown, otherwise *this would be a flaw*, but it is not your case. Instead all the other cases (1.2.1, 1.2.2, 2.1 and 2.2) can all be considered simply as a no-match, and that's why I use (and suggest to use) an onMatchException="noMatch" clause in the invocation if looking for "dangerous" attachments.

In any case, just to avoid any future confusion, I'm going to catch and ignore any exception corresponding to "unsupported" (but irrelevant as not related to attachments) encodings, and let flow up only other types of exceptions, to be handled by an appropriate onMatchException clause.

Vincenzo

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to