You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by J Rollo --Admin <ad...@warthong.org> on 2004/03/13 17:09:51 UTC

Problem with AttachmentFileNameIs matcher

This is my second go at using matcher and mailet.  My first time went well, but now I am trying to drop messages that have possible viral attachments. Here is the line from my config.xml:

<mailet match="AttachmentFileNameIs=*.bat,*.pif,*.scr" class="Null" /> 

when I start James with my new addition, it pukes horribly.  If I comment this out, James runs fine.

Any ideas?
---------------------------------------
Support Open Source,
Demand Quality Software

Re: Problem with AttachmentFileNameIs matcher

Posted by Serge Knystautas <se...@lokitech.com>.
J Rollo --Admin wrote:
> thanks for clearing that up.
> the docs lead one to believe AttachmentFileNameIs is available to 2.1.3
> 
> I'll grab the latest test build.

I'm looking to update the documentation for the mailets and matchers 
when we go to merge (we're missing a lot of bundled ones, there are 
undocumented settings, etc...).  I'll try to add a "available since" 
text next each one.

-- 
Serge Knystautas
President
Lokitech >>> software . strategy . design >> http://www.lokitech.com
p. 301.656.5501
e. sergek@lokitech.com

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: Problem with AttachmentFileNameIs matcher

Posted by Jason Lea <ja...@kumachan.net.nz>.
It needs to go into the james.sar file (which is a jar/zip file 
anyway).  But I just put it in the SAR-INF/lib directory next to james.jar
And then you just add as many matchers as you like to config.xml inside 
the <spoolmanager>:

      <matcherpackages>
         
<matcherpackage>org.apache.james.transport.matchers</matcherpackage>
         <matcherpackage>...</matcherpackage>
         <matcherpackage>...</matcherpackage>
         <matcherpackage>...</matcherpackage>
      </matcherpackages>


J Rollo --Admin wrote:

>I was thinking of doing the same thing.  I grabbed the source and made a
>jar. But I was not sure where to put the jar.  Where did you place the jar
>when you "included that jar in the config"?
>
>thanks.
>----- Original Message -----
>From: "Jason Lea" <ja...@kumachan.net.nz>
>To: "James Users List" <se...@james.apache.org>
>Sent: Sunday, March 14, 2004 1:43 AM
>Subject: Re: Problem with AttachmentFileNameIs matcher
>
>
>  
>
>>It does work with the current build.  I downloaded the source for it
>>from CVS and whipped up a quick project in Eclipse.  Built it, made a
>>jar and included that jar in config.  Works fine, while I wait for the
>>next release.
>>
>>J Rollo --Admin wrote:
>>
>>    
>>
>>>thanks for clearing that up.
>>>the docs lead one to believe AttachmentFileNameIs is available to 2.1.3
>>>
>>>I'll grab the latest test build.
>>>----- Original Message -----
>>>From: "Noel J. Bergman" <no...@devtech.com>
>>>To: "James Users List" <se...@james.apache.org>
>>>Sent: Saturday, March 13, 2004 12:26 PM
>>>Subject: RE: Problem with AttachmentFileNameIs matcher
>>>
>>>
>>>
>>>
>>>      
>>>
>>>>>I'm running 2.1.3
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>That would be the problem, as illustrated by:
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>>>org.apache.mailet.MailetException: Could not load matcher
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>(AttachmentFileNameIs);
>>>>
>>>>AttachmentFileNameIs is a new matcher present only in the test builds.
>>>>
>>>>--- Noel
>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>>For additional commands, e-mail: server-user-help@james.apache.org
>>>>
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>---------------------------------------
>>>Support Open Source,
>>>Demand Quality Software
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>For additional commands, e-mail: server-user-help@james.apache.org
>>>
>>>
>>>
>>>
>>>      
>>>
>>--
>>Jason Lea
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>For additional commands, e-mail: server-user-help@james.apache.org
>>
>>
>>    
>>
>---------------------------------------
>Support Open Source,
>Demand Quality Software
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>For additional commands, e-mail: server-user-help@james.apache.org
>
>
>  
>


-- 
Jason Lea



---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: Problem with AttachmentFileNameIs matcher

Posted by J Rollo --Admin <ad...@warthong.org>.
I was thinking of doing the same thing.  I grabbed the source and made a
jar. But I was not sure where to put the jar.  Where did you place the jar
when you "included that jar in the config"?

thanks.
----- Original Message -----
From: "Jason Lea" <ja...@kumachan.net.nz>
To: "James Users List" <se...@james.apache.org>
Sent: Sunday, March 14, 2004 1:43 AM
Subject: Re: Problem with AttachmentFileNameIs matcher


> It does work with the current build.  I downloaded the source for it
> from CVS and whipped up a quick project in Eclipse.  Built it, made a
> jar and included that jar in config.  Works fine, while I wait for the
> next release.
>
> J Rollo --Admin wrote:
>
> >thanks for clearing that up.
> >the docs lead one to believe AttachmentFileNameIs is available to 2.1.3
> >
> >I'll grab the latest test build.
> >----- Original Message -----
> >From: "Noel J. Bergman" <no...@devtech.com>
> >To: "James Users List" <se...@james.apache.org>
> >Sent: Saturday, March 13, 2004 12:26 PM
> >Subject: RE: Problem with AttachmentFileNameIs matcher
> >
> >
> >
> >
> >>>I'm running 2.1.3
> >>>
> >>>
> >>That would be the problem, as illustrated by:
> >>
> >>
> >>
> >>>org.apache.mailet.MailetException: Could not load matcher
> >>>
> >>>
> >>(AttachmentFileNameIs);
> >>
> >>AttachmentFileNameIs is a new matcher present only in the test builds.
> >>
> >>--- Noel
> >>
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> >>For additional commands, e-mail: server-user-help@james.apache.org
> >>
> >>
> >>
> >>
> >---------------------------------------
> >Support Open Source,
> >Demand Quality Software
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> >For additional commands, e-mail: server-user-help@james.apache.org
> >
> >
> >
> >
>
>
> --
> Jason Lea
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>
---------------------------------------
Support Open Source,
Demand Quality Software

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: Problem with AttachmentFileNameIs matcher

Posted by Jason Lea <ja...@kumachan.net.nz>.
It does work with the current build.  I downloaded the source for it 
from CVS and whipped up a quick project in Eclipse.  Built it, made a 
jar and included that jar in config.  Works fine, while I wait for the 
next release.

J Rollo --Admin wrote:

>thanks for clearing that up.
>the docs lead one to believe AttachmentFileNameIs is available to 2.1.3
>
>I'll grab the latest test build.
>----- Original Message ----- 
>From: "Noel J. Bergman" <no...@devtech.com>
>To: "James Users List" <se...@james.apache.org>
>Sent: Saturday, March 13, 2004 12:26 PM
>Subject: RE: Problem with AttachmentFileNameIs matcher
>
>
>  
>
>>>I'm running 2.1.3
>>>      
>>>
>>That would be the problem, as illustrated by:
>>
>>    
>>
>>>org.apache.mailet.MailetException: Could not load matcher
>>>      
>>>
>>(AttachmentFileNameIs);
>>
>>AttachmentFileNameIs is a new matcher present only in the test builds.
>>
>>--- Noel
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>For additional commands, e-mail: server-user-help@james.apache.org
>>
>>
>>    
>>
>---------------------------------------
>Support Open Source,
>Demand Quality Software
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>For additional commands, e-mail: server-user-help@james.apache.org
>
>
>  
>


-- 
Jason Lea



---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: Problem with AttachmentFileNameIs matcher

Posted by J Rollo --Admin <ad...@warthong.org>.
thanks for clearing that up.
the docs lead one to believe AttachmentFileNameIs is available to 2.1.3

I'll grab the latest test build.
----- Original Message ----- 
From: "Noel J. Bergman" <no...@devtech.com>
To: "James Users List" <se...@james.apache.org>
Sent: Saturday, March 13, 2004 12:26 PM
Subject: RE: Problem with AttachmentFileNameIs matcher


> > I'm running 2.1.3
> 
> That would be the problem, as illustrated by:
> 
> > org.apache.mailet.MailetException: Could not load matcher
> (AttachmentFileNameIs);
> 
> AttachmentFileNameIs is a new matcher present only in the test builds.
> 
> --- Noel
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
> 
> 
---------------------------------------
Support Open Source,
Demand Quality Software

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


RE: Problem with AttachmentFileNameIs matcher

Posted by "Noel J. Bergman" <no...@devtech.com>.
> I'm running 2.1.3

That would be the problem, as illustrated by:

> org.apache.mailet.MailetException: Could not load matcher
(AttachmentFileNameIs);

AttachmentFileNameIs is a new matcher present only in the test builds.

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: Problem with AttachmentFileNameIs matcher

Posted by J Rollo --Admin <ad...@warthong.org>.
pardon the lack of info.
I'm running 2.1.3
I dropped your mailet entry in, still not happy.

This line in the log looks to be the reason why it's puking:
ERROR 2004-03-13 11:50:53.321 [Phoenix.] (): Component named "spoolmanager"
failed to pass through the Initialization stage. (Reason:
org.apache.mailet.MailetException: Could not load matcher
(AttachmentFileNameIs);

nested exception is:

java.lang.ClassNotFoundException: Requested matcher not found:
AttachmentFileNameIs. looked in [, org.apache.james.transport.matchers.]).

Do you need more of the log file?

----- Original Message -----
From: "Noel J. Bergman" <no...@devtech.com>
To: "James Users List" <se...@james.apache.org>
Sent: Saturday, March 13, 2004 11:42 AM
Subject: RE: Problem with AttachmentFileNameIs matcher


> > <mailet match="AttachmentFileNameIs=*.bat,*.pif,*.scr" class="Null" />
> > when I start James with my new addition, it pukes horribly.
>
> Version?  Nature of "pukes horribly"?
>
> I use this:
>
>   <mailet
>
match="AttachmentFileNameIs=*.bat,*.com,*.dll,*.exe,*.lnk,*.pif,*.scr,*.vbe,
> *.vbs,*.wsh"
>           onMatchException="noMatch"
>           class="Bounce">
>     <notice>550 Rejected - Banned type of attachment.  Please contact
> intended recipient.</notice>
>     <attachment>none</attachment>
>     <passThrough>false</passThrough>
>   </mailet>
>
> in my system, and it works fine.
>
> --- Noel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>
---------------------------------------
Support Open Source,
Demand Quality Software

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


RE: Problem with AttachmentFileNameIs matcher

Posted by "Noel J. Bergman" <no...@devtech.com>.
> <mailet match="AttachmentFileNameIs=*.bat,*.pif,*.scr" class="Null" />
> when I start James with my new addition, it pukes horribly.

Version?  Nature of "pukes horribly"?

I use this:

  <mailet
match="AttachmentFileNameIs=*.bat,*.com,*.dll,*.exe,*.lnk,*.pif,*.scr,*.vbe,
*.vbs,*.wsh"
          onMatchException="noMatch"
          class="Bounce">
    <notice>550 Rejected - Banned type of attachment.  Please contact
intended recipient.</notice>
    <attachment>none</attachment>
    <passThrough>false</passThrough>
  </mailet>

in my system, and it works fine.

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org