You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Norman Maurer <no...@apache.org> on 2010/03/22 20:14:15 UTC

Re: user mailet-- how do I determine if it is loaded

Any Exception when you add it to the spoolmanager.xml file ?

Bye
Norman

2010/3/22, Robert Gurule' <rg...@lanl.gov>:
> Hi Norman,
>   Yes, I am using trunk.. I still can't get my mailet to work...
>
>   my mailetpackages.xml looks like:
>
> <mailetpackages>
>     <mailetpackage>org.apache.james.transport.mailets</mailetpackage>
>     <!-- Cryptography Mailets -->
>     <mailetpackage>org.apache.james.mailet.crypto.mailet</mailetpackage>
>     <!-- Sieve Mail Scripting -->
>     <mailetpackage>org.apache.james.imapserver.sieve</mailetpackage>
>     <mailetpackage>org.apache.gateway.mailets</mailetpackage>
> </mailetpackages
>
> The classpath is:
>
> set
> CLASSPATH_PREFIX=C:\James-svnapacheorg\trunk\mailets\target\james-server-mailets-3.0-M1.jar
>
> the package definition is:
>
> package org.apache.gateway.mailets;
>
>
> /*
>  * Licensed under the Apache License, Version 2.0 (the "License");
>  * you may not use this file except in compliance with the License.
>  * You may obtain a copy of the License at
>  *
>  *      http://www.apache.org/licenses/LICENSE-2.0
>  *
>  * Unless required by applicable law or agreed to in writing, software
>  * distributed under the License is distributed on an "AS IS" BASIS,
>  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
>  * See the License for the specific language governing permissions and
>  * limitations under the License.
>  */
>
> import javax.mail.MessagingException;
>
> import org.apache.mailet.Mail;
> import org.apache.mailet.Mailet;
> import org.apache.mailet.MailetConfig;
> import org.apache.mailet.MailetContext;
>
> /**
>
>
>
>
>
>> You should see something like this in the james-server.log (You use
>> trunk version right ?):
>
>>
>> INFO  14:38:29,781 | james.spoolmanager | Mailet YOURMAILETNAME
>> instantiated.
>>
>>
>> Bye,
>> Norman
>>
>> 2010/3/22 Robert L. Gurule <rg...@lanl.gov>:
>>> Hi Norman,
>>>  How can I determine if my home-grown mailet is being used by
>>> James-Server?
>>>
>>> Robert
>>>
>>>
>>>
>>>> Hi Robert it depends ..
>>>>
>>>> if you use james 2.3.x copy the jar to:
>>>>
>>>> /path/to/james/apps/james/SAR-INF/lib/
>>>>
>>>> You need to create the lib folder by your own..
>>>>
>>>>
>>>> If you use james trunk:
>>>>
>>>> adjust the /path/to/james/bin/setenv.sh (unix) or
>>>> /path/to/james/bin/setenv.bat (windows) to include your jar in the
>>>> classpath.
>>>>
>>>>
>>>> For both you will need to add the package name of your mailet to
>>>> mailetpackages configuration.
>>>>
>>>> Hope it helps,
>>>> Norman
>>>>
>>>>
>>>> 2010/3/17 Robert Gurule <rg...@lanl.gov>:
>>>>> Hi Norman,
>>>>>  If I write a mailet and create a jar file for the mailet where in the
>>>>> James/Server/Trunk would I place the jar file....
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Robert
>>>>>
>>>>>
>>>>> Norman Maurer wrote:
>>>>>>
>>>>>> Yeah when you want to write a mailet then it fit for you too...
>>>>>>
>>>>>> Btw Im not 100% sure what you want todo with the mailet, so maybe you
>>>>>> can give me some more details?
>>>>>>
>>>>>> Bye
>>>>>> Norman
>>>>>>
>>>>>> 2010/3/16, Robert Gurule <rg...@lanl.gov>:
>>>>>>
>>>>>>>
>>>>>>> Hi Norman,
>>>>>>>  I too am working on creating a mailet using IMAP on the
>>>>>>> http://svn.apache.org/repos/asf/james/server/trunk/ branch....
>>>>>>>
>>>>>>> do you recomment the below suggestion for me as well.
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Robert
>>>>>>>
>>>>>>>
>>>>>>> Norman Maurer wrote:
>>>>>>>
>>>>>>>>
>>>>>>>> Hi Andre,
>>>>>>>>
>>>>>>>> I think a good start would be to look at the source code of our
>>>>>>>> unit
>>>>>>>> tests for mailets:
>>>>>>>>
>>>>>>>>
>>>>>>>> http://svn.apache.org/viewvc/james/mailet/standard/trunk/src/test/java/org/apache/james/transport/mailets/
>>>>>>>>
>>>>>>>> Bye,
>>>>>>>> Norman
>>>>>>>>
>>>>>>>> 2010/3/15 Florent André <fl...@4sengines.com>:
>>>>>>>>
>>>>>>>>
>>>>>>>>>
>>>>>>>>> Hi James addicts :) ,
>>>>>>>>>
>>>>>>>>> I would like to begin to code my first mailet, and I ask myself a
>>>>>>>>> question
>>>>>>>>> : How I can test if my mailet react (output) what I want when a
>>>>>>>>> mail
>>>>>>>>> is
>>>>>>>>> treated ?
>>>>>>>>>
>>>>>>>>> I imagine different solutions :
>>>>>>>>> 1) send a mail via telnet : not very easy and rapid
>>>>>>>>> 2) send a mail via my day to day webmail : I'm not totally crazy
>>>>>>>>> for
>>>>>>>>> now
>>>>>>>>> and I don't want to expose my "no-configuration" to all web. So I
>>>>>>>>> just
>>>>>>>>> have
>>>>>>>>> a local access to james
>>>>>>>>> 3) Use a local, predictable, reusable and configurable java jar
>>>>>>>>> for
>>>>>>>>> send
>>>>>>>>> mail to James.
>>>>>>>>>
>>>>>>>>> The 3) seem to me the more "clean" and usable.
>>>>>>>>>
>>>>>>>>> In order to create this test lib, I found some examples code on
>>>>>>>>> this
>>>>>>>>> :
>>>>>>>>> http://www.ibm.com/developerworks/java/library/j-james1.html
>>>>>>>>>
>>>>>>>>> What do you think about this way of doing ? There is a better
>>>>>>>>> practice
>>>>>>>>> in
>>>>>>>>> James or a very useful code in svn for this usecase ?
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>> Have a gooooooood day
>>>>>>>>> ++
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>> 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
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Robert L. Gurule'
>>>>>>> High Performance Computing
>>>>>>> Scientific Software Engineering  (HPC-1)
>>>>>>> Los Alamos National Laboratory, MS B295
>>>>>>> Los Alamos, New Mexico 87545
>>>>>>> 505-665-3538 (office)
>>>>>>> 505-690-1011 (cell)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Robert L. Gurule'
>>>>> High Performance Computing
>>>>> Scientific Software Engineering  (HPC-1)
>>>>> Los Alamos National Laboratory, MS B295
>>>>> Los Alamos, New Mexico 87545
>>>>> 505-665-3538 (office)
>>>>> 505-690-1011 (cell)
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>>
>>>
>>
>
>

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