Hi,
Kevin Jackson ha scritto:
> > We have tried the following config :
> >
> > <mailet match="All" class="ToRepository">
> >   <repositoryPath> db://maildb/spams/ </repositoryPath>
> > </mailet>
> >
> > This was successful with james 2.2 previously, however with an updated
> > version of james, this now produces the following errors:
>
> I can't believe it! Are you really sure?
> AFAIK ToRepository code has not changed since 2.2.

Ok, well we weren't experiencing the problems with 2.2, but maybe we
weren't trying to process spam then!

> AFAIK JAMES never supported the feature you are describing. ToRepository
> stores messages in a flat repository and not in a hierarchical structure.
>
> > exception! javax.mail.MessagingException: Exception caught while
> > storing mail Mail1199635598329-146241-!453332;
> >   nested exception is:
> >         java.io.IOException: ERROR: null value in column
> > "repository_name" violates not-null constraint
> > [...]
>
> I think you simply forgot to add a repository name at the end of the
> path: db://maildb/spams/repositoryname

I have a spams table and each user has their own 'repository_name'
So yes
maildb = datasource
spams = tablename
${recipient} = repository_name

At least I thought it would work this way - based on the fact that the
LocalDelivery mailet manages to do this

>
> > 06/01/08 23:14:27 INFO  mailetpackages.ToMultiRepository: Error while
> > storing mail.
> > java.lang.IllegalArgumentException: Mail message to be spooled cannot be 
> > null.
> >         at 
> > org.apache.james.transport.mailets.ToMultiRepository.storeMail(ToMultiRepository.java:214)
> >         at 
> > org.apache.james.transport.mailets.ToMultiRepository.service(ToMultiRepository.java:154)
> >         at 
> > org.apache.james.transport.LinearProcessor.service(LinearProcessor.java:451)
> >         at 
> > org.apache.james.transport.StateAwareProcessorList.service(StateAwareProcessorList.java:167)
> >         at 
> > org.apache.james.transport.JamesSpoolManager.run(JamesSpoolManager.java:206)
> >         at java.lang.Thread.run(Thread.java:619)
> > 06/01/08 23:14:27 INFO  mailetpackages.ToRepository: Storing mail
> > Mail1199622794356-137694 in file://var/mail/error/
> > [...]
>
> Maybe there is a bug in ToMultiRepository. It has only been tested in
> the standard LocalDelivery configuration at the moment.
> Please try adding this configuration to the mailet config:
> <addDeliveryHeader>Delivered-To</addDeliveryHeader>
>
>  From a fast overview of the ToMultiRepository I think it does the wrong
> thing without that configuration.
>
> If this fixes your problem please submit a JIRA issue to our issue
> tracker (https://issues.apache.org/jira/browse/JAMES)

I added the suggested <addDeliveryHeader> and the null message problem
disappeared (whether James is now doing what I want is a different
issue), I'll quickly add a JIRA issue so you can track it

>
> Stefano

Thanks for your help (your email was thought to be spam by gmail - the irony...)
Kev

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to