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 Robert Burrell Donkin <ro...@gmail.com> on 2008/05/04 09:02:55 UTC

[mailets] Low hanging fruit [WAS Re: Mailets and dependencies (Was: [PLANNING] Road map)]

On Sat, Feb 2, 2008 at 5:51 PM, Stefano Bagnara <ap...@bago.org> wrote:
> Robert Burrell Donkin ha scritto:

<snip>

>  > i think that it would be a good plan to pull out those mailets which
>  > are conceptually independent into separate a subproject (standard
>  > mailets, say)
>
>  I did some homework...
>  here is a list of matcher/mailets that (I think) do not depends on james or
> avalon:

<snip>

>  -----
>
>  Then we have some mailets with dependencies on utility classes that could
> be separated from James:
>
>  mailets/ReplaceContent
>  - import org.apache.james.util.mailet.StringUtils;
>
>  mailets/ReplaceContent
>  - depends on org.apache.james.util.mailet.MailetUtil
>
>  mailets/UnwrapText
>  mailets/WrapText
>  - depend on org.apache.james.util.mailet.FlowedMessageUtils

<snip>

we should move org.james.util.mailet.* into mailet-base

>  mailets/ClamAVScan
>  - import org.apache.james.util.io.IOUtil;

i'd be happen to clone any methods used

>  mailets/SpamAssassin
>  - import org.apache.james.util.SpamAssassinInvoker;

hmmm...  where else is this used?

>  mailets/LogMessage
>  - import org.apache.james.core.MailImpl but I think this might be a mistake
> and we could replace MailImpl with Mail.

done

- robert

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


Re: [mailets] Low hanging fruit

Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Wed, May 7, 2008 at 8:33 PM, Robert Burrell Donkin
<ro...@gmail.com> wrote:
> On Mon, May 5, 2008 at 10:51 AM, Stefano Bagnara <ap...@bago.org> wrote:
>  > Robert Burrell Donkin ha scritto:

<snip>

>  > > >  mailets/ClamAVScan
>  > > >  - import org.apache.james.util.io.IOUtil;
>  > > >
>  > >
>  > > i'd be happen to clone any methods used
>  > >
>  >
>  >  or maybe moving them to mailet-base: JAMES-Server will anyway depends on
>  > mailet-base, if I understood it correctly, right?
>
>  yes but IOUtil is not really related to mailets
>
>  ClamAVScan's use of IOUtil is not substantial so i'll inlined the methods

done and moved into standard mailets

- robert

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


Re: [mailets] Low hanging fruit

Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Mon, May 5, 2008 at 10:51 AM, Stefano Bagnara <ap...@bago.org> wrote:
> Robert Burrell Donkin ha scritto:
>
> > On Sat, Feb 2, 2008 at 5:51 PM, Stefano Bagnara <ap...@bago.org> wrote:
> >
> > >  Then we have some mailets with dependencies on utility classes that
> could
> > > be separated from James:
> > >
> > >  mailets/ReplaceContent
> > >  - import org.apache.james.util.mailet.StringUtils;
> > >
> > >  mailets/ReplaceContent
> > >  - depends on org.apache.james.util.mailet.MailetUtil
> > >
> > >  mailets/UnwrapText
> > >  mailets/WrapText
> > >  - depend on org.apache.james.util.mailet.FlowedMessageUtils

moved

> > <snip>
> >
> > we should move org.james.util.mailet.* into mailet-base
> >
>
>  +1

done

> > >  mailets/ClamAVScan
> > >  - import org.apache.james.util.io.IOUtil;
> > >
> >
> > i'd be happen to clone any methods used
> >
>
>  or maybe moving them to mailet-base: JAMES-Server will anyway depends on
> mailet-base, if I understood it correctly, right?

yes but IOUtil is not really related to mailets

ClamAVScan's use of IOUtil is not substantial so i'll inlined the methods

- robert

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


Re: [mailets] Low hanging fruit

Posted by Stefano Bagnara <ap...@bago.org>.
Robert Burrell Donkin ha scritto:
> On Sat, Feb 2, 2008 at 5:51 PM, Stefano Bagnara <ap...@bago.org> wrote:
>>  Then we have some mailets with dependencies on utility classes that could
>> be separated from James:
>>
>>  mailets/ReplaceContent
>>  - import org.apache.james.util.mailet.StringUtils;
>>
>>  mailets/ReplaceContent
>>  - depends on org.apache.james.util.mailet.MailetUtil
>>
>>  mailets/UnwrapText
>>  mailets/WrapText
>>  - depend on org.apache.james.util.mailet.FlowedMessageUtils
> 
> <snip>
> 
> we should move org.james.util.mailet.* into mailet-base

+1

>>  mailets/ClamAVScan
>>  - import org.apache.james.util.io.IOUtil;
> 
> i'd be happen to clone any methods used

or maybe moving them to mailet-base: JAMES-Server will anyway depends on 
mailet-base, if I understood it correctly, right?

>>  mailets/SpamAssassin
>>  - import org.apache.james.util.SpamAssassinInvoker;
> 
> hmmm...  where else is this used?

I guess SMTP fast fail (didn't check the code).
The fact is that with SMTP fastfail/in-protocol handlers we have to use 
most of the features we have in mailets but we can't use the mailets 
api, so the solution was to create small utility classes (e.g: 
SpamAssassinInvoker) or JAMES Services (e.g: VirtualUserTable service in 
trunk) to be used both from mailets and smtp handlers.
An alternative solution would have been to identify the additional 
interfaces needed to use mailets in-protocol, but we already tried this 
many times, I'm not ready to reiterate this issue.

>>  mailets/LogMessage
>>  - import org.apache.james.core.MailImpl but I think this might be a mistake
>> and we could replace MailImpl with Mail.
> 
> done

Thank you :-),

Stefano



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