I made a new fix to AbstractRedirect (#5 below). As this patch has not yet been 
applied, I added incrementally the fix to the patch.

So the topics are:

1) The sender domain check now is optional, controlled by <fakeDomainCheck>, that 
defaults to true.

2) Some "getX()" values where hardcoded in AbstractNotify; now they are controlled by 
init parameters that default to the previous values. The parameters involved are: 
<prefix>, <inline>, <attachment> and <passThrough>.

3) In AbstractNotify (and subclasses) <message> and <attachError> can be used instead 
of <notice> and <attachStackTrace>.

4) Javadoc changed accordingly plus a few fixes.

5) AbstractRedirect and all the subclasses where causing a "null pointer exception" to 
be thrown deep in AvalonMailRepository, very hard to understand, because 
newName(MailImpl) was building a too long name if a "configuration loop" was happening.

The change #2 above allows to add in config.xml something like:

        <!-- Check attachment extensions for possible viruses -->
         <mailet 
match="AttachmentFileNameIs=*.exe,*.com,*.bat,*.pif,*.scr,*.vbs,*.eml,*.avi,*.mp3,*.mpeg,*.shs"
 class="Bounce">
            <inline>heads</inline>
            <attachment>none</attachment>
            <passThrough>false</passThrough>
            <prefix>[REJECTED]</prefix>
            <message>
The Security Policy of ACME Corp. does not allow to forward messages containing 
attachments having any of the extensions .exe, .com, .bat, .pif, .scr, .vbs, .eml, 
.avi, .mp3, .mpeg, .shs, therefore such messages are rejected. Please don't reply to 
this e-mail as it has been automatically sent by the antivirus system.

Regards, Postmaster acme.com
-----------------------------
            </message>
         </mailet>

The <attachment>none</attachment> was not allowed before in Bounce, and the default 
was "message", and in such a case, if the message had an infected attachment, it would 
have been bounced back to the (possibly fake) sender together with the virus.

I've tested everything and it is hopefully OK.

Bye,

Vincenzo

> -----Original Message-----
> From: Vincenzo Gianferrari Pini
> [mailto:[EMAIL PROTECTED]
> Sent: domenica 8 giugno 2003 20.56
> To: List James-Dev
> Subject: [no virus] [PATCH] New redirect - config options added to
> AbstractNotify
> 
> 
> Noel,
> 
> here attached is a patch to the seven "New Redirect" classes both 
> in head and branch_2_1_fcs.
> 
> The changes are all related:
> 
> 1) The sender domain check now is optional, controlled by 
> <fakeDomainCheck>, that defaults to true.
> 
> 2) Some "getX()" values where hardcoded in AbstractNotify; now 
> they are controlled by init parameters that default to the 
> previous values. The parameters involved are: <prefix>, <inline>, 
> <attachment> and <passThrough>.
> 
> 3) In AbstractNotify (and subclasses) <message> and <attachError> 
> can be used instead of <notice> and <attachStackTrace>.
> 
> 4) Javadoc changed accordingly plus a few fixes.
> 
> The change #2 above allows to add in config.xml something like:
> 
>         <!-- Check attachment extensions for possible viruses -->
>          <mailet 
> match="AttachmentFileNameIs=*.exe,*.com,*.bat,*.pif,*.scr,*.vbs,*.
> eml,*.avi,*.mp3,*.mpeg,*.shs" class="Bounce">
>             <inline>heads</inline>
>             <attachment>none</attachment>
>             <passThrough>false</passThrough>
>             <prefix>[REJECTED]</prefix>
>             <message>
> The Security Policy of ACME Corp. does not allow to forward 
> messages containing attachments having any of the extensions 
> .exe, .com, .bat, .pif, .scr, .vbs, .eml, .avi, .mp3, .mpeg, 
> .shs, therefore such messages are rejected. Please don't reply to 
> this e-mail as it has been automatically sent by the antivirus system.
> 
> Regards, Postmaster acme.com
> -----------------------------
>             </message>
>          </mailet>
> 
> The <attachment>none</attachment> was not allowed before in 
> Bounce, and the default was "message", and in such a case, if the 
> message had an infected attachment, it would have been bounced 
> back to the (possibly fake) sender together with the virus.
> 
> I've tested everything and it is hopefully OK.
> 
> Bye,
> 
> Vincenzo
> 

Attachment: NewRedirect_enhancedConfig.patch.zip
Description: Macintosh archive

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

Reply via email to