james-server-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jaysheel bhavsar <jbhav...@mindbridge.com>
Subject Re: mailet calls
Date Tue, 15 Jun 2004 18:16:32 GMT
Hi I am using James 2.2.0.RC5

   I did the following in my config.xml file

<?xml version="1.0"?>
<!DOCTYPE config [
<!ENTITY listserverConfig SYSTEM "../conf/james-listmanager.xml">
<!ENTITY listserverStores SYSTEM "../conf/james-liststores.xml">
<!ENTITY fetchmailConfig SYSTEM "../conf/james-fetchmail.xml">
<!ENTITY fetchSpamRules SYSTEM "../conf/james-spamrules.xml"> 
]>

I added the last line in the above block of code. and later on after 
"&fetchmailConfig;" I added "&fetchSpamRules;"

the reason is because I want to run a java class when james starts up at the 
very first time. 

by doing the above i get an error as follows

---------------------------------------------------------------
There was an uncaught exception:
---------------------------------------------------------
--- Message ---
There is no coresponding Block or Listener for configuration data in element 
"mailetpackages".
--- Stack Trace ---
org.apache.avalon.phoenix.interfaces.DeploymentException: There is no 
coresponding Block or Listener for configuration data in element 
"mailetpackages".
        at 
org.apache.avalon.phoenix.components.deployer.DefaultDeployer.setupConfiguration(DefaultDeployer.java:527)
------------------------------------------------------------------------

now in the "james-spamrules.xml" file I have the following

----------------------------------------------------------------------------
<mailetpackages>
  <mailetpackage>com.mindbridge.james.mailets</mailetpackage>
</mailetpackages>

<matcherpackages>
  <matcherpackage>com.mindbridge.james.matchers</matcherpackage>
</matcherpackages>

<mailet match="All" class="SpamRules">
    <homeDir>/etc/mail/spamassassin</homeDir>
</mailet>
-------------------------------------------------------------------------------------------------

I am not sure why I am getting an error. Should I not put <mailetpackages> in 
this file? If not how can I tell this file that my classes are in  
"com.mindbridge.james.mailets" package.?

--------------------------------------------------------------------------------------------------
later on what I want to do is from the telnet interface that is provided for 
adding users I want to added another command that will call this class.

thanks 
jay.

On Tuesday 08 June 2004 17:57, Brian J. Sayatovic wrote:
> jaysheel bhavsar wrote:
> >Hi,
> >	If I want to make call a mailet, only when james first starts up, where
> > would I put my mailet script in the config.xml file?
> >
> >thanks
> >jay.
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> >For additional commands, e-mail: server-user-help@james.apache.org
>
> XML has this ability built in.  Check out the JAmes config.xml itself.
> It can start out with a DOCTYPE declaration that declares a new entity
> to be the content of another file.  For example:
>
>     <!DOCTYPE config [
>         <!ENTITY fetchmailConfig SYSTEM
> "file:../apps/james/conf/james-fetchmail.xml">
>     ]>
>
> Then, later in the same XML file, you reference the "entity" like this:
>
>     &fetchmailConfig;
>
> So now you have some rudimentary control.  If you wanted to control it
> via a script, you could echo some variables form a batch to teh file
> you're entity declaration references before the XML file is read.
>
> Regards,
> Brian.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org


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


Mime
View raw message