Peter,
Very nice. It's always good to see a new face around here. I'll look over your changes and apply them. --Peter > -----Original Message----- > From: Peter L�ffler [mailto:[EMAIL PROTECTED]] > Sent: Sunday, October 13, 2002 10:16 AM > To: [EMAIL PROTECTED] > Subject: Steps to get IMAP starting > > > Hello! > > Other mails already indicated that there are some problems when doing > a clean build of James with IMAP from CVS. > > This description of my solutions to some of the issues I've found so far > may save some time to others. > > See below for diffs of the files I've changed. Someone more involved > should review them before commiting. Some of my changes (6,7) may have > consequences which I didn't foresee. > > Peter > > > > 1) Minor build problem under UNIX: > > | ~/jakarta-james/proposals/imap/dist/james-2.1a1-cvs$ bin/run.sh > | bin/run.sh: ~/jakarta-james/proposals/imap/dist/james-2.1a1- > cvs/bin/phoenix.sh: /bin/sh: bad interpreter: Permission denied > > Cause: > build.xml doesn't make phoenix.sh executable > > 2) james-server.xml is not a valid XML file: > > | Error building configuration from file:~/jakarta- > james/proposals/imap/dist/james-2.1a1-cvs/apps/james/SAR- > INF/environment.xml. > | Caused by: org.xml.sax.SAXParseException: The element type > "categories" must be terminated by the matching end-tag "</categories>". > > Cause: > <category name="imapserver" log-level="DEBUG"/> > <log-target name="imapserver-target"/> > </category> > > This replacement eliminates two errors: > <category name="imapserver" log-level="DEBUG"> > <log-target id-ref="imapserver-target"/> > </category> > > 3) Another build problem: > The (newer) James.java from main doesn't get replaced by the (older) > one > from the IMAP proposal. > > I use <exclude> elements in build.xml. > > 4)james-assembly.xml (the IMAP proposal one) isn't up to date: > > | Unknown dependency named "nntpauth" with role > "org.apache.james.nntpserver.AuthService" declared for Block nntpserver. > > I replaced > <provide name="nntpauth" > role="org.apache.james.nntpserver.AuthService"/> > by > <provide name="users-store" > role="org.apache.james.services.UsersStore"/> > in james-assembly.xml and deleted the "NNTP Authentication Service" > block. > The <nntpauth> element got removed from james-config.xml. > > 5) Now the server starts up and it's possible to log in, but INBOX doesn't > exist and can't be created: > > | $ telnet localhost 143 > | Trying 127.0.0.1... > | Connected to localhost. > | Escape character is '^]'. > | * OK IMAP4rev1 Server peter ready > | 1 LOGIN peter peter > | 1 OK LOGIN completed > | 2 SELECT "INBOX" > | 2 NO SELECT Unknown mailbox > | 3 CREATE "INBOX" > | * BYE Error processing command. > | Connection closed by foreign host. > > I added the following to james-config.xml: > <storage>IMAP</storage> > > 6) At startup there were these warnings: > > | The Block named "imapsystem" (implementation class > "org.apache.james.imapserver.IMAPSystem"), implements a service > "org.apache.james.imapserver.IMAPSystem" which extends a Lifecycle > interface "org.apache.avalon.framework.context.Contextualizable". This > violates the expected usage patterns. > | The Block named "imapsystem" (implementation class > "org.apache.james.imapserver.IMAPSystem"), implements a service > "org.apache.james.imapserver.IMAPSystem" which extends a Lifecycle > interface "org.apache.avalon.framework.component.Composable". This > violates the expected usage patterns. > | The Block named "imapsystem" (implementation class > "org.apache.james.imapserver.IMAPSystem"), implements a service > "org.apache.james.imapserver.IMAPSystem" which extends a Lifecycle > interface "org.apache.avalon.framework.configuration.Configurable". This > violates the expected usage patterns. > | The Block named "imapsystem" (implementation class > "org.apache.james.imapserver.SimpleSystem"), implements Block interface. > The Block interface has been deprecated and should no longer be used. > | The Block named "imaphost" (implementation class > "org.apache.james.imapserver.JamesHost"), implements Block interface. The > Block interface has been deprecated and should no longer be used. > > They could be eliminated by small changes in IMAPSystem.java, > SimpleSystem.java and JamesHost.java. > > 7) Solution of problem 5) creates a new one. > Impossible to add any new users: > > xterm A: James starts up > | Started IMAP Server plain:143 > | POP3 Server Started plain:110 > | SMTP Server Started plain:25 > | java.lang.NullPointerException > | at > org.apache.james.nntpserver.repository.NNTPSpooler$SpoolerRunnable.run(N NT > PSpooler.java:200) > | at java.lang.Thread.run(Thread.java:536) > | NNTP Server Started plain:119 > > xterm B: > | $ telnet localhost 4555 > | Trying 127.0.0.1... > | Connected to localhost. > | Escape character is '^]'. > | JAMES RemoteAdministration Tool 2.1a1-cvs > | Please enter your login and password > | Login id: > | root > | Password: > | root > | Welcome root. HELP for a list of commands > | adduser peter peter > | Connection closed by foreign host. > > xterm A (continued): > | MailboxDir TO WRITE TO var/mail/mailboxes/user/peter > | MailboxDir TO WRITE TO var/mail/mailboxes/user/peter/INBOX > | Exception: null > | java.lang.NullPointerException > | at > org.apache.james.imapserver.FileMailbox.getNextUID(FileMailbox.java:460) > > Cause: highestUID in FileMailbox.java was not initialised. > > Remark: > I don't quite understand why highestUID is static. > This prevents configuration of the FileStoreHighestUID location. > My reading of RFC 2060 (2.3.1.1) is that global uniqueness (across > all mailboxes) is unnecessary. > > > > Diffs of the files I've changed: > > Index: proposals/imap/build.xml > =================================================================== > RCS file: /home/cvspublic/jakarta-james/proposals/imap/build.xml,v > retrieving revision 1.6 > diff -u -r1.6 build.xml > --- proposals/imap/build.xml 27 Sep 2002 08:49:11 -0000 1.6 > +++ proposals/imap/build.xml 13 Oct 2002 15:58:52 -0000 > @@ -176,6 +176,7 @@ > <chmod perm="+x"> > <fileset dir="${dist.dir}/bin"> > <include name="run.sh"/> > + <include name="phoenix.sh"/> > </fileset> > </chmod> > <fixcrlf srcdir="." includes="build.sh" eol="lf"/> > @@ -194,6 +195,8 @@ > <include name="**/*.properties"/> > <include name="**/*.xinfo"/> > <include name="**/*.mxinfo"/> > + <exclude name="org/apache/james/James.java"/> > + <exclude name="org/apache/james/James.xinfo"/> > </fileset> > </copy> > <copy todir="${build.src}"> > > > > Index: proposals/imap/conf/james-assembly.xml > =================================================================== > RCS file: /home/cvspublic/jakarta-james/proposals/imap/conf/james- > assembly.xml,v > retrieving revision 1.3 > diff -u -r1.3 james-assembly.xml > --- proposals/imap/conf/james-assembly.xml 17 Sep 2002 21:51:27 -0000 > 1.3 > +++ proposals/imap/conf/james-assembly.xml 13 Oct 2002 15:59:35 -0000 > @@ -98,7 +98,7 @@ > > <!-- NNTP Server --> > <block class="org.apache.james.nntpserver.NNTPServer" name="nntpserver" > > > - <provide name="nntpauth" > role="org.apache.james.nntpserver.AuthService"/> > + <provide name="users-store" > role="org.apache.james.services.UsersStore"/> > <provide name="sockets" > > role="org.apache.avalon.cornerstone.services.sockets.SocketManager"/> > <provide name="connections" > @@ -107,11 +107,6 @@ > > role="org.apache.avalon.cornerstone.services.scheduler.TimeScheduler"/> > <provide name="nntp-repository" > role="org.apache.james.nntpserver.repository.NNTPRepository"/> > - </block> > - > - <!-- NNTP Authentication Service --> > - <block class="org.apache.james.nntpserver.AuthServiceImpl" > name="nntpauth" > > - <provide name="users-store" > role="org.apache.james.services.UsersStore"/> > </block> > > <!-- NNTP Repository --> > > > > Index: proposals/imap/conf/james-config.xml > =================================================================== > RCS file: /home/cvspublic/jakarta-james/proposals/imap/conf/james- > config.xml,v > retrieving revision 1.3 > diff -u -r1.3 james-config.xml > --- proposals/imap/conf/james-config.xml 17 Sep 2002 21:51:27 -0000 > 1.3 > +++ proposals/imap/conf/james-config.xml 13 Oct 2002 15:59:59 -0000 > @@ -39,6 +39,13 @@ > <!-- Set whether to enable local aliases --> > <usernames ignoreCase="TRUE" enableAliases="TRUE" > enableForwarding="TRUE"/> > > + <!-- Set the type of permanent mailfolders to be used. > + If IMAP service is to be provided, storage must be 'IMAP'; if only > POP3 > + service is being provided then use must be 'basic' (default) . At > some > + stage POP3 will, hopefully, be able to use IMAP storage as well. > This > + choice is irrelevant if the only service provided is SMTP. --> > + <storage>IMAP</storage> > + > <!-- The inbox repository is the location for users inboxes --> > <!-- Default setting: file based repository - enter path ( use > "file:///" for absolute) --> > <inboxRepository> > @@ -338,11 +345,6 @@ > <connectiontimeout>120000</connectiontimeout> > </handler> > </nntpserver> > - > - <nntpauth> > - <!-- make this true, if you want only authenticated users to access > NNTP--> > - <authRequired>false</authRequired> > - </nntpauth> > > <nntp-repository> > <!-- make this true to disallow posting to all newsgroups--> > > > > Index: proposals/imap/conf/james-server.xml > =================================================================== > RCS file: /home/cvspublic/jakarta-james/proposals/imap/conf/james- > server.xml,v > retrieving revision 1.2 > diff -u -r1.2 james-server.xml > --- proposals/imap/conf/james-server.xml 17 Sep 2002 21:51:27 -0000 > 1.2 > +++ proposals/imap/conf/james-server.xml 13 Oct 2002 16:00:26 -0000 > @@ -26,8 +26,8 @@ > <category name="remotemanager" log-level="DEBUG"> > <log-target id-ref="remotemanager-target"/> > </category> > - <category name="imapserver" log-level="DEBUG"/> > - <log-target name="imapserver-target"/> > + <category name="imapserver" log-level="DEBUG"> > + <log-target id-ref="imapserver-target"/> > </category> > <category name="pop3server" log-level="DEBUG"> > <log-target id-ref="pop3server-target"/> > > > > Index: proposals/imap/java/org/apache/james/imapserver/IMAPSystem.java > =================================================================== > RCS file: /home/cvspublic/jakarta- > james/proposals/imap/java/org/apache/james/imapserver/IMAPSystem.java,v > retrieving revision 1.4 > diff -u -r1.4 IMAPSystem.java > --- proposals/imap/java/org/apache/james/imapserver/IMAPSystem.java 17 > Sep 2002 17:00:38 -0000 1.4 > +++ proposals/imap/java/org/apache/james/imapserver/IMAPSystem.java 13 > Oct 2002 16:01:00 -0000 > @@ -7,9 +7,6 @@ > */ > package org.apache.james.imapserver; > > -import org.apache.avalon.framework.component.Composable; > -import org.apache.avalon.framework.configuration.Configurable; > -import org.apache.avalon.framework.context.Contextualizable; > import org.apache.james.imapserver.AuthenticationException; > > import java.util.Iterator; > @@ -24,8 +21,7 @@ > * @version 0.1 on 14 Dec 2000 > * @see Host > */ > -public interface IMAPSystem > - extends Configurable, Contextualizable, Composable { > +public interface IMAPSystem { > > String ROLE = "org.apache.james.imapserver.IMAPSystem"; > > > > > Index: proposals/imap/java/org/apache/james/imapserver/SimpleSystem.java > =================================================================== > RCS file: /home/cvspublic/jakarta- > james/proposals/imap/java/org/apache/james/imapserver/SimpleSystem.java, v > retrieving revision 1.7 > diff -u -r1.7 SimpleSystem.java > --- proposals/imap/java/org/apache/james/imapserver/SimpleSystem.java 17 > Sep 2002 17:00:38 -0000 1.7 > +++ proposals/imap/java/org/apache/james/imapserver/SimpleSystem.java 13 > Oct 2002 16:01:25 -0000 > @@ -8,11 +8,14 @@ > package org.apache.james.imapserver; > > import org.apache.avalon.framework.activity.Initializable; > +import org.apache.avalon.framework.component.Component; > import org.apache.avalon.framework.component.ComponentManager; > +import org.apache.avalon.framework.component.Composable; > +import org.apache.avalon.framework.configuration.Configurable; > import org.apache.avalon.framework.configuration.Configuration; > import org.apache.avalon.framework.configuration.ConfigurationException; > import org.apache.avalon.framework.context.Context; > -import org.apache.avalon.phoenix.Block; > +import org.apache.avalon.framework.context.Contextualizable; > import org.apache.james.imapserver.AuthenticationException; > > import java.net.InetAddress; > @@ -30,7 +33,7 @@ > * @version 0.1 on 14 Dec 2000 > */ > public class SimpleSystem > - implements IMAPSystem, Block, Initializable { > + implements IMAPSystem, Component, Initializable, Configurable, > Contextualizable, Composable { > > private static final String namespaceToken = "#"; > private static final String hierarchySeperator = "."; > > > > Index: proposals/imap/java/org/apache/james/imapserver/JamesHost.java > =================================================================== > RCS file: /home/cvspublic/jakarta- > james/proposals/imap/java/org/apache/james/imapserver/JamesHost.java,v > retrieving revision 1.8 > diff -u -r1.8 JamesHost.java > --- proposals/imap/java/org/apache/james/imapserver/JamesHost.java 17 > Sep 2002 17:00:38 -0000 1.8 > +++ proposals/imap/java/org/apache/james/imapserver/JamesHost.java 13 > Oct 2002 16:02:05 -0000 > @@ -8,6 +8,7 @@ > package org.apache.james.imapserver; > > import org.apache.avalon.framework.activity.Initializable; > +import org.apache.avalon.framework.component.Component; > import org.apache.avalon.framework.component.ComponentManager; > import org.apache.avalon.framework.component.Composable; > import org.apache.avalon.framework.configuration.Configurable; > @@ -16,7 +17,6 @@ > import org.apache.avalon.framework.context.Context; > import org.apache.avalon.framework.context.Contextualizable; > import org.apache.avalon.framework.logger.AbstractLogEnabled; > -import org.apache.avalon.phoenix.Block; > import org.apache.james.imapserver.AccessControlException; > import org.apache.james.imapserver.AuthorizationException; > import org.apache.james.services.MailServer; > @@ -49,7 +49,7 @@ > */ > public class JamesHost > extends AbstractLogEnabled > - implements Host, Block, Configurable, Composable, > Contextualizable, Initializable { > + implements Host, Component, Configurable, Composable, > Contextualizable, Initializable { > > private Context context; > private Configuration conf; > > > > Index: proposals/imap/java/org/apache/james/imapserver/FileMailbox.java > =================================================================== > RCS file: /home/cvspublic/jakarta- > james/proposals/imap/java/org/apache/james/imapserver/FileMailbox.java,v > retrieving revision 1.8 > diff -u -r1.8 FileMailbox.java > --- proposals/imap/java/org/apache/james/imapserver/FileMailbox.java 17 > Sep 2002 17:00:38 -0000 1.8 > +++ proposals/imap/java/org/apache/james/imapserver/FileMailbox.java 13 > Oct 2002 16:02:36 -0000 > @@ -144,8 +144,8 @@ > private boolean notSelectableByAnyone; > > // Sets the UID for all Mailboxes > - private static HighestUID highestUID; > - > + // TODO: This is only a short term solution. > + private static HighestUID highestUID = new FileStoreHighestUID(new > File("var/mail/uidstore")); > // The message sequence number of a msg is its index in List sequence > + 1 > private List sequence; //List of UIDs of messages in mailbox > > > > > > > -- > To unsubscribe, e-mail: <mailto:james-dev- > [EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:james-dev- > [EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
