Index: B:/java/jamesws/JamesNewTrunk/src/java/org/apache/james/James.java
===================================================================
--- B:/java/jamesws/JamesNewTrunk/src/java/org/apache/james/James.java	(revision 412323)
+++ B:/java/jamesws/JamesNewTrunk/src/java/org/apache/james/James.java	(working copy)
@@ -526,11 +526,12 @@
                         .append(userName)
                         .append("/");
             String destination = destinationBuffer.toString();
-            DefaultConfiguration mboxConf
-                = new DefaultConfiguration("repository", "generated:AvalonFileRepository.compose()");
-            mboxConf.setAttribute("destinationURL", destination);
-            mboxConf.setAttribute("type", "MAIL");
             try {
+                // Copy the inboxRepository configuration and modify the destinationURL
+                DefaultConfiguration mboxConf = new DefaultConfiguration(conf
+                        .getChild("inboxRepository").getChild("repository"));
+                mboxConf.setAttribute("destinationURL", destination);
+
                 userInbox = (MailRepository) store.select(mboxConf);
                 if (userInbox!=null) {
                     mailboxes.put(userName, userInbox);
