You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Ray Tran <ra...@westhawk.co.uk> on 2003/12/02 12:22:14 UTC

How to use sendmail's spool file with James POP server?

Hi,
I have a customer with a very complicated sendmail setup which I _really_
don't want to duplicate in James. However, I _do_ want to replace the POP3
and POP3S servers with James.

I figured out how to set up two POP3 servers, but I can't see how to make
the servers look at the sendmail spool files (/var/spool/mail/$USER).
Can anybody advise me on how to do this, or tell me it isn't possible so
I can stop fretting at it ;-)

Regards,
-- 
Ray Tran
Java Software Engineer
ray@westhawk.co.uk
www.westhawk.co.uk
+44 (0)161 237 0660


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


Re: How to use sendmail's spool file with James POP server?

Posted by Ray Tran <ra...@westhawk.co.uk>.
Yes, that was it. Thanks to everyone who helped.

Noel J. Bergman wrote:

>>   java.lang.NullPointerException
>>        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:262)
>>        at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
>>        at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
>>        at
> 
> org.apache.james.core.AvalonMailStore.select(AvalonMailStore.java:336)
> 
>>  org.apache.excalibur.containerkit.lifecycle.LifecycleException:
> 
> Component named "James" failed to pass through the Initialization stage.
> (Reason: org.apache.avalon.framework.component.ComponentException: Cannot
> find or init repository).
> 
> 
>>Any ideas where I can go from here? By the way I also tried three slashes
> 
> after the mbox:, but
> 
>>the result was similar.  Do I need to add anything to enable mbox support,
> 
> as it isn't mentioned
> 
>>anywhere else in the config.xml?
> 
> 
> At a guess?  Install a v2.2 test build because you are probably using
> v2.1.3, which does not have mbox support.
> 
> 	--- Noel
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
> 

Regards,
-- 
Ray Tran
Java Software Engineer
ray@westhawk.co.uk
www.westhawk.co.uk
+44 (0)161 237 0660


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


RE: How to use sendmail's spool file with James POP server?

Posted by "Noel J. Bergman" <no...@devtech.com>.
>    java.lang.NullPointerException
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:262)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
>         at
org.apache.james.core.AvalonMailStore.select(AvalonMailStore.java:336)
>   org.apache.excalibur.containerkit.lifecycle.LifecycleException:
Component named "James" failed to pass through the Initialization stage.
(Reason: org.apache.avalon.framework.component.ComponentException: Cannot
find or init repository).

> Any ideas where I can go from here? By the way I also tried three slashes
after the mbox:, but
> the result was similar.  Do I need to add anything to enable mbox support,
as it isn't mentioned
> anywhere else in the config.xml?

At a guess?  Install a v2.2 test build because you are probably using
v2.1.3, which does not have mbox support.

	--- Noel


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


Re: How to use sendmail's spool file with James POP server?

Posted by Ray Tran <ra...@westhawk.co.uk>.
Hi,
thanks for the answer, I've tried it but can't get it to work - I get a
null-pointer exception. I'd really like to do it this way because the
Sendmail config is so bad (customer has weird requirements) I don't
want to even touch it. It took me three days to get it to work
in the first place - if I have to change Sendmail at all I would
rather replace it.

The exception I get is:
   [root@hort SAR-INF]# /opt/james/bin/run.sh
   Using PHOENIX_HOME:   /opt/james
   Using PHOENIX_TMPDIR: /opt/james/temp
   Using JAVA_HOME:      /opt/jdk1.4
   Running Phoenix:

   Phoenix 4.0.1

   java.lang.NullPointerException
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:262)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
         at org.apache.james.core.AvalonMailStore.select(AvalonMailStore.java:336)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.apache.avalon.phoenix.components.application.BlockInvocationHandler.invoke(BlockInvocationHandler.java:92)
         at $Proxy3.select(Unknown Source)
         at org.apache.james.James.initialize(James.java:383)
         at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:235)
         at org.apache.excalibur.containerkit.lifecycle.LifecycleHelper.startup(LifecycleHelper.java:144)
         at org.apache.avalon.phoenix.components.application.DefaultApplication.startup(DefaultApplication.java:480)
         at org.apache.avalon.phoenix.components.application.DefaultApplication.doRunPhase(DefaultApplication.java:428)
         at org.apache.avalon.phoenix.components.application.DefaultApplication.runPhase(DefaultApplication.java:364)
         at org.apache.avalon.phoenix.components.application.DefaultApplication.start(DefaultApplication.java:138)
         at org.apache.avalon.framework.container.ContainerUtil.start(ContainerUtil.java:251)
         at org.apache.avalon.phoenix.components.kernel.DefaultKernel.startup(DefaultKernel.java:178)
         at org.apache.avalon.phoenix.components.kernel.DefaultKernel.addApplication(DefaultKernel.java:254)
         at org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(DefaultDeployer.java:353)
         at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(DefaultEmbeddor.java:498)
         at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(DefaultEmbeddor.java:491)
         at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFiles(DefaultEmbeddor.java:476)
         at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployDefaultApplications(DefaultEmbeddor.java:466)
         at org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.execute(DefaultEmbeddor.java:224)
         at org.apache.avalon.phoenix.frontends.CLIMain.run(CLIMain.java:158)
         at org.apache.avalon.phoenix.frontends.CLIMain.execute(CLIMain.java:144)
         at org.apache.avalon.phoenix.frontends.CLIMain.main(CLIMain.java:102)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.apache.avalon.phoenix.launcher.Main.startup(Main.java:94)
         at org.apache.avalon.phoenix.launcher.Main.main(Main.java:46)
   org.apache.excalibur.containerkit.lifecycle.LifecycleException: Component named "James" failed to pass through the Initialization stage. (Reason: org.apache.avalon.framework.component.ComponentException: Cannot find or init repository).
         at org.apache.excalibur.containerkit.lifecycle.LifecycleHelper.fail(LifecycleHelper.java:289)
         at org.apache.excalibur.containerkit.lifecycle.LifecycleHelper.startup(LifecycleHelper.java:159)

              ***************** SNIP ******************

Any ideas where I can go from here? By the way I also tried three slashes after the mbox:, but
the result was similar. Do I need to add anything to enable mbox support, as it isn't mentioned
anywhere else in the config.xml?

Jason Webb wrote:
> Hi Ray.
> 
> James and Sendmail use completely different spool files for spooling
> incoming/outgoing mail.
> But...
> James can use mbox format mail boxes for storing user mail.
> If your customer's user spools are already in mbox format then it's very
> easy. 
> In the config.xml file just use:
>       <inboxRepository>
>          <repository destinationURL="mbox://var/spool/mail/"
> type="MAIL"/>
>       </inboxRepository>
> Instead of the current inboxRepository setting.
> 
> The James mbox implementation uses dot-locking to protect the stores,
> however I've not tested this under a reasonable load (>5 user) so YMMV. 
> 
> You will have to create each user that requires POP3 in James as well.
> I would STRONGLY advise to test this first, but I'm sure you'd do that
> anyway...
> If the user spools are not mbox format then it won't work, and I'd try
> for plan B.
> 
> Hope this helps...
> 
> -- Jason
> 
> 

Regards,
-- 
Ray Tran
Java Software Engineer
ray@westhawk.co.uk
www.westhawk.co.uk
+44 (0)161 237 0660


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


RE: How to use sendmail's spool file with James POP server?

Posted by Jason Webb <jw...@inovem.com>.
Hi Ray.

James and Sendmail use completely different spool files for spooling
incoming/outgoing mail.
But...
James can use mbox format mail boxes for storing user mail.
If your customer's user spools are already in mbox format then it's very
easy. 
In the config.xml file just use:
      <inboxRepository>
         <repository destinationURL="mbox://var/spool/mail/"
type="MAIL"/>
      </inboxRepository>
Instead of the current inboxRepository setting.

The James mbox implementation uses dot-locking to protect the stores,
however I've not tested this under a reasonable load (>5 user) so YMMV. 

You will have to create each user that requires POP3 in James as well.
I would STRONGLY advise to test this first, but I'm sure you'd do that
anyway...
If the user spools are not mbox format then it won't work, and I'd try
for plan B.

Hope this helps...

-- Jason


> -----Original Message-----
> From: Ray Tran [mailto:ray@westhawk.co.uk] 
> Sent: 02 December 2003 11:22
> To: server-user@james.apache.org
> Subject: How to use sendmail's spool file with James POP server?
> 
> 
> Hi,
> I have a customer with a very complicated sendmail setup 
> which I _really_ don't want to duplicate in James. However, I 
> _do_ want to replace the POP3 and POP3S servers with James.
> 
> I figured out how to set up two POP3 servers, but I can't see 
> how to make the servers look at the sendmail spool files 
> (/var/spool/mail/$USER). Can anybody advise me on how to do 
> this, or tell me it isn't possible so I can stop fretting at it ;-)
> 
> Regards,
> -- 
> Ray Tran
> Java Software Engineer
> ray@westhawk.co.uk
> www.westhawk.co.uk
> +44 (0)161 237 0660
> 
> 
> ---------------------------------------------------------------------
> 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