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: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > 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: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]