I understood why it seems to not load the desired class,
I didn't know that I have to change also the referenced class into the
mailet block into the config.xml, so it was:
--------------------------------------------------------------------------------------------
<#> <mailet match="[EMAIL PROTECTED]"
class="*AvalonListservManager*">
<> <repositoryName>list-newsletter</repositoryName>
</mailet>
<#> <mailet match="[EMAIL PROTECTED]"
class="*AvalonListserv*">
<membersonly>true</membersonly>
<attachmentsallowed>true</attachmentsallowed>
<replytolist>false</replytolist>
<repositoryName>list-newsletter</repositoryName>
<specifiedpostersonly>true</specifiedpostersonly>
<#> <allowedposters>
<address>[EMAIL PROTECTED]</address>
<> </allowedposters>
</mailet>
--------------------------------------------------------------------------------------------
Now I changed into:
<mailet match="[EMAIL PROTECTED]"
class="*AvalonListservManager*">
<repositoryName>list-james</repositoryName>
</mailet>
<mailet match="[EMAIL PROTECTED]"
class="*CommandListservProcessor*">
<membersonly>true</membersonly>
<attachmentsallowed>true</attachmentsallowed>
<replytolist>false</replytolist>
<repositoryName>list-james</repositoryName>
<subjectprefix>Prefisso</subjectprefix>
<specifiedpostersonly>true</specifiedpostersonly>
<autobracket>true</autobracket>
<listOwner>[EMAIL PROTECTED]</listOwner>
<listName>Newsletter</listName>
<allowedposters>
<address>[EMAIL PROTECTED]</address>
<address>[EMAIL PROTECTED]</address>
</allowedposters>
</mailet>
<#>
--------------------------------------------------------------------------------------------
But, I got the following Excection:
08/06/05 10:25:08 ERROR spoolmanager: Unable to init mailet
CommandListservProcessor: javax.mail.MessagingException: Unable to find
command list manager named: Newsletter;
nested exception is:
java.lang.IllegalStateException: Unable to find command list manager
named: Newsletter
javax.mail.MessagingException: Unable to find command list manager
named: Newsletter;
nested exception is:
java.lang.IllegalStateException: Unable to find command list manager
named: Newsletter
at
org.apache.james.transport.mailets.CommandListservProcessor.init(CommandListservProcessor.java:287)
at org.apache.mailet.GenericMailet.init(GenericMailet.java:129)
So, I think I miss someting else into the config.xml,
may someone suggest me what blocks have I to insert into the config.xml
file?
Regards
Pietro
Daniel Perry wrote:
Well, I'm not sure exactly how the sar loader works, so I don't really know
why that didn't work. I would recommend downloading the source for the
version of james you have, then replace the java file, and build. You will
then have a new SAR file. This is what I do, and it works fine.
Daniel.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 31 May 2005 13:57
To: James Users List
Subject: Re: Mailet, matcher and distribution list
I did all you explained, replacing the old .class with the new ones.
It seems to do not have effect, new fields aren't readed.
Even I tried to delete the class and the newsletter works again
following th original rules, thats is very strange.
Obviously I stoped and started the James each time.
It seems James have its own classes that have priority on the ones in
the james.sar inside the apps/james.sar
Last I want to try to put some logging inside the class, to check if the
class is loaded, how can I log from inside there?
Any other suggestion, please?
Regards
Daniel Perry wrote:
Hah, that's a tricky one. (I normally just rebuild the whole of
james), then
replace james.sar
It is in: apps/james.sar
a sar file is a jar file, which is a zip file.
Inside james.sar, the james class files are in a jar file:
SAR-INF/lib/james.jar
Hope that makes sense,
Daniel.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 26 May 2005 16:45
To: James Users List
Subject: Re: Mailet, matcher and distribution list
Thanks for your reply, one last question;
where have I to place the .class ?
Have I to substitute with old one in the jar archive or there is a
lib/classes folder where I can store it?
Regards
Daniel Perry wrote:
I added this to the command mail list a while ago, and it was
commited to
the subversion repository.
http://svn.apache.org/viewcvs.cgi/*checkout*/james/server/branche
s/branch_2_
1_fcs/src/java/org/apache/james/transport/mailets/CommandListserv
Processor.j
ava
(for v2.1/2 branch)
You'll need to recompile to use it :) It adds the config
options below:
<specifiedpostersonly>true</specifiedpostersonly>
<allowedposters>
<address>[EMAIL PROTECTED]</address>
<address>[EMAIL PROTECTED]</address>
<address>[EMAIL PROTECTED]</address>
</allowedposters>
Also, see http://issues.apache.org/jira/browse/JAMES-367 for a
patch which
makes footers optional, and also allows you to modify the to
address for the
list, so that it appears that the email was sent to a different
address than
it actually was. I have used this to make a list reply to an
admin, and also
when moving lists from one server to another - put the list
temporarily on a
new domain, while the domain records are propergating, and then
set the new
list to appear as if it was the old domain.
Daniel.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 26 May 2005 13:44
To: James Users List
Subject: Mailet, matcher and distribution list
Hi, I activated a mailing list following the Apache James
user guide and
FAQ.
All work well, but I prefer to have only one, or at least some users
that can write to the distribution list,
while for the other the message should going back.
Is it possibledoing using the provided mailet, matchers ?
Have I to write my own mailet?
May someone help me to have the rigth directions to start this job.
Thanks
---------------------------------------------------------------------
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]
---------------------------------------------------------------------
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]