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 Norman Maurer <no...@apache.org> on 2008/12/12 17:56:18 UTC

VirtualUserTable and VirtualHosting

Hi Guys,

after some long time I had some time to look at james trunk source
again. I tried to deploy a james install and use VirtualUserTable todo
all the forwarding stuff. But It seems it get never caleld todo the
mappings. I enabled the "enableVirtualHosting" flag in the config.xml.

Someone removed the support for it or I'm just not able to find where
it get called and which mailet needs to get called ?

Cheers,
Norman

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


Re: VirtualUserTable and VirtualHosting

Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Sun, Dec 14, 2008 at 2:01 PM, Robert Burrell Donkin
<ro...@gmail.com> wrote:
> On Sun, Dec 14, 2008 at 1:55 PM, Norman Maurer <no...@apache.org> wrote:
>> Ah ok now I see what makes you wonder... thats right. isLocalEmail
>> works only after the vut mappings was done. Thats prolly a problem in
>> some cases..
>
> it's the problem in my case :-)
>
> (the code's very messy since it's trying to ensure backwards compatibility.)

(would be better to move to a new, clean users API with VUT support
for james 3 and just provide a backwards compatiblity layer)

- robert

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


Re: VirtualUserTable and VirtualHosting

Posted by Stefano Bagnara <ap...@bago.org>.
Robert Burrell Donkin ha scritto:
> On Sun, Dec 14, 2008 at 2:49 PM, Norman Maurer <no...@apache.org> wrote:
>> Should I just go ahead an commit it ( and open a jira issue) ?
> 
> if we follow stefano's design reasoning then really the VUT code needs
> to be moved from LocalDelivery into a separate mailet

A little history.

1) LocalDelivery was a single mailet including user aliasing code.

2) I splitted LocalDelivery into 2 separate mailets:
   UsersRepositoryAliasingForwarding
   ToMultiRepository
   I did that because the way aliasing worked in past james was a lot
tricky and this was a first step in modularizing it.

3) Norman and I worked on a VUT service because we wanted to let access
to the same "table" from both mailets and smtp fastfail stuff. I still
consider this an *hack*, but there is no easy way to support per
recipient fastfail unless we don't run some of the mailets during the
smtp protocol. I tried proposing changes to the mailet so that they was
more SMTP aware but others never liked the idea.


Also 2+3 happened at the end of 2006 when we (Norman and I) was working
hard to try to release a new version of james with new features.
That features required some care to be completed but we suddenly stopped
because other people didn't want a release and we gave up.

I really sincerely don't remember anything else about the status of what
was committed and what was not there. It's 2 years ago.


"my" design reasoning is simply derived from what was the design when I
approached james and what was written in the stone by people working on
this before me.

Maybe I didn't understand what kind of API you want to change, so maybe
it's better for me to wait for a concrete proposal and then judge/critic
it. IMHO the problem here is not the code or a VUT API issue, this is a
Mailet API issue.

Stefano

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


Re: VirtualUserTable and VirtualHosting

Posted by Norman Maurer <no...@apache.org>.
I created an jira issue and attached some patch.. please review:

https://issues.apache.org/jira/browse/JAMES-882

Cheers,
Norman

2008/12/14 Norman Maurer <no...@apache.org>:
> I only moved it the UserRepositoryAliasForwarding mailet because of
> some "shared" code. I think it would prolly be better to extract
> shared code to an Abstract class and seperate the "vut store" and
> userrepository stuff.
>
> Cheers,
> Norman
>
>
> 2008/12/14 Robert Burrell Donkin <ro...@gmail.com>:
>> On Sun, Dec 14, 2008 at 2:49 PM, Norman Maurer <no...@apache.org> wrote:
>>> Should I just go ahead an commit it ( and open a jira issue) ?
>>
>> if we follow stefano's design reasoning then really the VUT code needs
>> to be moved from LocalDelivery into a separate mailet
>>
>> - robert
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-dev-help@james.apache.org
>>
>>
>

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


Re: VirtualUserTable and VirtualHosting

Posted by Norman Maurer <no...@apache.org>.
I only moved it the UserRepositoryAliasForwarding mailet because of
some "shared" code. I think it would prolly be better to extract
shared code to an Abstract class and seperate the "vut store" and
userrepository stuff.

Cheers,
Norman


2008/12/14 Robert Burrell Donkin <ro...@gmail.com>:
> On Sun, Dec 14, 2008 at 2:49 PM, Norman Maurer <no...@apache.org> wrote:
>> Should I just go ahead an commit it ( and open a jira issue) ?
>
> if we follow stefano's design reasoning then really the VUT code needs
> to be moved from LocalDelivery into a separate mailet
>
> - robert
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>
>

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


Re: VirtualUserTable and VirtualHosting

Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Sun, Dec 14, 2008 at 4:49 PM, Stefano Bagnara <ap...@bago.org> wrote:
> Robert Burrell Donkin ha scritto:
>> On Sun, Dec 14, 2008 at 4:12 PM, Stefano Bagnara <ap...@bago.org> wrote:
>>> Robert Burrell Donkin ha scritto:
>>>> On Sun, Dec 14, 2008 at 2:49 PM, Norman Maurer <no...@apache.org> wrote:
>>>>> Should I just go ahead an commit it ( and open a jira issue) ?
>>>> if we follow stefano's design reasoning then really the VUT code needs
>>>> to be moved from LocalDelivery into a separate mailet
>>> I'm not following you. Norman patch does touch the LocalDelivery, if I
>>> understand it.
>>
>> LocalDelivery uses UsersRepositoryAliasingForwarding and the code in it
>
> IMO the current aliasingforwarding stuff could be deprecated and I find
> it very "weird" and unintuitive in the way it works. The whole
> refactoring was about allowing it to be excluded and replaced with a
> different solution without breaking backward compatibility (I was only
> working inside the agreed constraints, but in italy we say "a lot of
> water passed under the bridges" since that).

("it's all water under the bridge" in Merry Merry England, we're not
so well endowed bridge-wise as our Italian brothers)

i understand :-)

i've now taken a good look at the user stuff and think we need to use
revised interfaces to take james 3 forward. my current thinking is
that it would be best to take advantage of the poor packaging and
create new revised interfaces in new packages. the old ones can be
retained as legacy. (i would prefer legacy to be maintained outside
the main james server codebase since my IDE struggles and james is
slow to build).

>>> IMO it can be committed.
>>
>> +1
>>
>>> It seems it simply fixes a previously "partial"
>>> work:
>>> https://issues.apache.org/jira/browse/JAMES-615
>>>
>>> Also, if you are interested in revamping/refreshing/fixing the user
>>> stuff in james I can give you 2 more pointers in hour "history":
>>> https://issues.apache.org/jira/browse/JAMES-622
>>
>> i've talked phoenix into not using proxies now so some of the extra
>> complexity can be removed
>
> I saw! I didn't know phoenix had this option :-( , and this should make
> it things much more simple. Thank you!

that's just the start :-)

i've made a *ton* of progress with phoenix. when you get some time, i
have some exciting stuff to share.

- robert

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


Re: VirtualUserTable and VirtualHosting

Posted by Stefano Bagnara <ap...@bago.org>.
Robert Burrell Donkin ha scritto:
> On Sun, Dec 14, 2008 at 4:12 PM, Stefano Bagnara <ap...@bago.org> wrote:
>> Robert Burrell Donkin ha scritto:
>>> On Sun, Dec 14, 2008 at 2:49 PM, Norman Maurer <no...@apache.org> wrote:
>>>> Should I just go ahead an commit it ( and open a jira issue) ?
>>> if we follow stefano's design reasoning then really the VUT code needs
>>> to be moved from LocalDelivery into a separate mailet
>> I'm not following you. Norman patch does touch the LocalDelivery, if I
>> understand it.
> 
> LocalDelivery uses UsersRepositoryAliasingForwarding and the code in it

IMO the current aliasingforwarding stuff could be deprecated and I find
it very "weird" and unintuitive in the way it works. The whole
refactoring was about allowing it to be excluded and replaced with a
different solution without breaking backward compatibility (I was only
working inside the agreed constraints, but in italy we say "a lot of
water passed under the bridges" since that).

>> IMO it can be committed.
> 
> +1
> 
>> It seems it simply fixes a previously "partial"
>> work:
>> https://issues.apache.org/jira/browse/JAMES-615
>>
>> Also, if you are interested in revamping/refreshing/fixing the user
>> stuff in james I can give you 2 more pointers in hour "history":
>> https://issues.apache.org/jira/browse/JAMES-622
> 
> i've talked phoenix into not using proxies now so some of the extra
> complexity can be removed

I saw! I didn't know phoenix had this option :-( , and this should make
it things much more simple. Thank you!

>> https://issues.apache.org/jira/browse/JAMES-745
> 
> thanks

Stefano

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


Re: VirtualUserTable and VirtualHosting

Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Sun, Dec 14, 2008 at 4:12 PM, Stefano Bagnara <ap...@bago.org> wrote:
> Robert Burrell Donkin ha scritto:
>> On Sun, Dec 14, 2008 at 2:49 PM, Norman Maurer <no...@apache.org> wrote:
>>> Should I just go ahead an commit it ( and open a jira issue) ?
>>
>> if we follow stefano's design reasoning then really the VUT code needs
>> to be moved from LocalDelivery into a separate mailet
>
> I'm not following you. Norman patch does touch the LocalDelivery, if I
> understand it.

LocalDelivery uses UsersRepositoryAliasingForwarding and the code in it

> IMO it can be committed.

+1

> It seems it simply fixes a previously "partial"
> work:
> https://issues.apache.org/jira/browse/JAMES-615
>
> Also, if you are interested in revamping/refreshing/fixing the user
> stuff in james I can give you 2 more pointers in hour "history":
> https://issues.apache.org/jira/browse/JAMES-622

i've talked phoenix into not using proxies now so some of the extra
complexity can be removed

> https://issues.apache.org/jira/browse/JAMES-745

thanks

- robert

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


Re: VirtualUserTable and VirtualHosting

Posted by Stefano Bagnara <ap...@bago.org>.
Robert Burrell Donkin ha scritto:
> On Sun, Dec 14, 2008 at 2:49 PM, Norman Maurer <no...@apache.org> wrote:
>> Should I just go ahead an commit it ( and open a jira issue) ?
> 
> if we follow stefano's design reasoning then really the VUT code needs
> to be moved from LocalDelivery into a separate mailet

I'm not following you. Norman patch does touch the LocalDelivery, if I
understand it.

IMO it can be committed. It seems it simply fixes a previously "partial"
work:
https://issues.apache.org/jira/browse/JAMES-615

Also, if you are interested in revamping/refreshing/fixing the user
stuff in james I can give you 2 more pointers in hour "history":
https://issues.apache.org/jira/browse/JAMES-622
https://issues.apache.org/jira/browse/JAMES-745

Stefano

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


Re: VirtualUserTable and VirtualHosting

Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Sun, Dec 14, 2008 at 2:49 PM, Norman Maurer <no...@apache.org> wrote:
> Should I just go ahead an commit it ( and open a jira issue) ?

if we follow stefano's design reasoning then really the VUT code needs
to be moved from LocalDelivery into a separate mailet

- robert

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


Re: VirtualUserTable and VirtualHosting

Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Sun, Dec 14, 2008 at 2:49 PM, Norman Maurer <no...@apache.org> wrote:
> Should I just go ahead an commit it

stefano?

> ( and open a jira issue) ?

i have a (failing) smoke test for VUT so opening a JIRA would be useful anyway

- robert

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


Re: VirtualUserTable and VirtualHosting

Posted by Norman Maurer <no...@apache.org>.
Should I just go ahead an commit it ( and open a jira issue) ?

Cheers,
Norman

2008/12/14 Robert Burrell Donkin <ro...@gmail.com>:
> On Sun, Dec 14, 2008 at 2:15 PM, Norman Maurer <no...@apache.org> wrote:
>> I thought of something like this:
>
> <snip>
>
> definitely looks neater
>
> - robert
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>
>

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


Re: VirtualUserTable and VirtualHosting

Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Sun, Dec 14, 2008 at 2:15 PM, Norman Maurer <no...@apache.org> wrote:
> I thought of something like this:

<snip>

definitely looks neater

- robert

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


Re: VirtualUserTable and VirtualHosting

Posted by Norman Maurer <no...@apache.org>.
I thought of something like this:

Index: UsersRepositoryAliasingForwarding.java
===================================================================
--- UsersRepositoryAliasingForwarding.java	(revision 726438)
+++ UsersRepositoryAliasingForwarding.java	(working copy)
@@ -28,6 +28,7 @@
 import org.apache.james.api.user.UsersStore;
 import org.apache.james.api.vut.ErrorMappingException;
 import org.apache.james.api.vut.VirtualUserTable;
+import org.apache.james.api.vut.VirtualUserTableStore;
 import org.apache.mailet.base.GenericMailet;
 import org.apache.mailet.Mail;
 import org.apache.mailet.MailAddress;
@@ -64,6 +65,8 @@
      * inboxes on this server.
      */
     private UsersRepository usersRepository;
+    private VirtualUserTable vut;
+

     /**
      * Delivers a mail to a local mailbox.
@@ -165,70 +168,8 @@
         }

         if (usersRepository instanceof VirtualUserTable) {
-            Collection mappings;
-            try {
-                mappings = ((VirtualUserTable)
usersRepository).getMappings(recipient.getUser(),
recipient.getHost());
-            } catch (ErrorMappingException e) {
-                StringBuffer errorBuffer = new StringBuffer(128)
-                    .append("A problem as occoured trying to alias
and forward user ")
-                    .append(recipient)
-                    .append(": ")
-                    .append(e.getMessage());
-                    throw new MessagingException(errorBuffer.toString());
-            }
-
-            if (mappings != null) {
-                Iterator i = mappings.iterator();
-                Collection remoteRecipients = new ArrayList();
-                Collection localRecipients = new ArrayList();
-                while (i.hasNext()) {
-                    String rcpt = (String) i.next();
-
-                    if (rcpt.indexOf("@") < 0) {
-                        // the mapping contains no domain name, use
the default domain
-                        rcpt = rcpt + "@" +
getMailetContext().getAttribute(Constants.DEFAULT_DOMAIN);
-                    }
-
-                    MailAddress nextMap = new MailAddress(rcpt);
-                    if (getMailetContext().isLocalServer(nextMap.getHost())) {
-                        localRecipients.add(nextMap);
-                    } else {
-                        remoteRecipients.add(nextMap);
-                    }
-                }
-
-                if (remoteRecipients.size() > 0) {
-                    try {
-                        getMailetContext().sendMail(sender,
remoteRecipients, message);
-                        StringBuffer logBuffer = new StringBuffer(128).append(
-                                "Mail for ").append(recipient).append(
-                                " forwarded to ");
-                        for (Iterator j =
remoteRecipients.iterator(); j.hasNext(); ) {
-                            logBuffer.append(j.next());
-                            if (j.hasNext()) logBuffer.append(", ");
-                        }
-                        getMailetContext().log(logBuffer.toString());
-                        return null;
-                    } catch (MessagingException me) {
-                        StringBuffer logBuffer = new StringBuffer(128).append(
-                                "Error forwarding mail to ");
-                        for (Iterator j =
remoteRecipients.iterator(); j.hasNext(); ) {
-                            logBuffer.append(j.next());
-                            if (j.hasNext()) logBuffer.append(", ");
-                        }
-                        logBuffer.append("attempting local delivery");
-
-                        getMailetContext().log(logBuffer.toString());
-                        throw me;
-                    }
-                }
-
-                if (localRecipients.size() > 0) {
-                    return localRecipients;
-                } else {
-                    return null;
-                }
-            }
+            Collection newRcpts = handleVUT((VirtualUserTable)
usersRepository, sender,recipient,message);
+            if (newRcpts != null) return newRcpts;
         } else {
             StringBuffer errorBuffer = new StringBuffer(128)
                 .append("Warning: the repository ")
@@ -236,6 +177,11 @@
                 .append(" does not implement VirtualUserTable interface).");
             getMailetContext().log(errorBuffer.toString());
         }
+
+        if (vut != null) {
+            return handleVUT(vut, sender, recipient, message);
+        }
+
         String realName = usersRepository.getRealName(recipient.getUser());
         if (realName != null) {
             ArrayList ret = new ArrayList();
@@ -247,6 +193,74 @@
             return ret;
         }
     }
+
+    private Collection handleVUT(VirtualUserTable table, MailAddress
sender, MailAddress recipient,
+            MimeMessage message) throws MessagingException {
+        Collection mappings;
+        try {
+            mappings = table.getMappings(recipient.getUser(),
recipient.getHost());
+        } catch (ErrorMappingException e) {
+            StringBuffer errorBuffer = new StringBuffer(128)
+                .append("A problem as occoured trying to alias and
forward user ")
+                .append(recipient)
+                .append(": ")
+                .append(e.getMessage());
+                throw new MessagingException(errorBuffer.toString());
+        }
+
+        if (mappings != null) {
+            Iterator i = mappings.iterator();
+            Collection remoteRecipients = new ArrayList();
+            Collection localRecipients = new ArrayList();
+            while (i.hasNext()) {
+                String rcpt = (String) i.next();
+
+                if (rcpt.indexOf("@") < 0) {
+                    // the mapping contains no domain name, use the
default domain
+                    rcpt = rcpt + "@" +
getMailetContext().getAttribute(Constants.DEFAULT_DOMAIN);
+                }
+
+                MailAddress nextMap = new MailAddress(rcpt);
+                if (getMailetContext().isLocalServer(nextMap.getHost())) {
+                    localRecipients.add(nextMap);
+                } else {
+                    remoteRecipients.add(nextMap);
+                }
+            }
+
+            if (remoteRecipients.size() > 0) {
+                try {
+                    getMailetContext().sendMail(sender,
remoteRecipients, message);
+                    StringBuffer logBuffer = new StringBuffer(128).append(
+                            "Mail for ").append(recipient).append(
+                            " forwarded to ");
+                    for (Iterator j = remoteRecipients.iterator();
j.hasNext(); ) {
+                        logBuffer.append(j.next());
+                        if (j.hasNext()) logBuffer.append(", ");
+                    }
+                    getMailetContext().log(logBuffer.toString());
+                    return null;
+                } catch (MessagingException me) {
+                    StringBuffer logBuffer = new StringBuffer(128).append(
+                            "Error forwarding mail to ");
+                    for (Iterator j = remoteRecipients.iterator();
j.hasNext(); ) {
+                        logBuffer.append(j.next());
+                        if (j.hasNext()) logBuffer.append(", ");
+                    }
+                    logBuffer.append("attempting local delivery");
+
+                    getMailetContext().log(logBuffer.toString());
+                    throw me;
+                }
+            }
+
+            if (localRecipients.size() > 0) {
+                return localRecipients;
+            } else {
+                return null;
+            }
+        }
+    }

     /**
      * @see org.apache.mailet.GenericMailet#init()
@@ -270,11 +284,33 @@
                 UsersStore usersStore = (UsersStore)
compMgr.lookup(UsersStore.ROLE);
                 usersRepository = usersStore.getRepository(userRep);
             }
+
+

         } catch (ServiceException cnfe) {
             log("Failed to retrieve UsersStore component:" +
cnfe.getMessage());
         }
+
+        try {
+            String vutName = getInitParameter("virtualusertable-store");
+            if (vutName == null || vutName.length() == 0) {
+                try {
+                    vut = ((VirtualUserTableStore) compMgr
+
.lookup(VirtualUserTableStore.ROLE)).getTable(vutName);
+                } catch (ServiceException e) {
+                    log("Failed to retrieve VirtualUserTable component:"
+                            + e.getMessage());
+                }
+            } else {
+                vut = ((VirtualUserTableStore) compMgr
+
.lookup(VirtualUserTableStore.ROLE)).getTable("DefaultVirtualUserTable");
+            }
+
+

+        } catch (ServiceException cnfe) {
+            log("Failed to retrieve UsersStore component:" +
cnfe.getMessage());
+        }
     }

 }


Wdyt ?

Cheers,
Norman

2008/12/14 Robert Burrell Donkin <ro...@gmail.com>:
> On Sun, Dec 14, 2008 at 1:55 PM, Norman Maurer <no...@apache.org> wrote:
>> Ah ok now I see what makes you wonder... thats right. isLocalEmail
>> works only after the vut mappings was done. Thats prolly a problem in
>> some cases..
>
> it's the problem in my case :-)
>
> (the code's very messy since it's trying to ensure backwards compatibility.)
>
> - robert
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>
>

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


Re: VirtualUserTable and VirtualHosting

Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Sun, Dec 14, 2008 at 2:18 PM, Stefano Bagnara <ap...@bago.org> wrote:
> Robert Burrell Donkin ha scritto:
>> On Sun, Dec 14, 2008 at 1:55 PM, Norman Maurer <no...@apache.org> wrote:
>>> Ah ok now I see what makes you wonder... thats right. isLocalEmail
>>> works only after the vut mappings was done. Thats prolly a problem in
>>> some cases..
>>
>> it's the problem in my case :-)
>>
>> (the code's very messy since it's trying to ensure backwards compatibility.)
>
> Sorry but I don't agree on this one.

the user code is very messy - lots of casts everywhere, lots of proxy
layers, no way to implement a clean API, too many user POJOs, too many
deprecated methods. the VUT stuff is annoying since it's tacked on to
this mess.

> The way VUT works is by design. We added some support for easy virtual
> hosting leaving there the backward compatibility, but the underlying
> system is not aware of the VUT so you have to run the VUT in the mailet
> chain before any check for "isLocalEmail" is done.

AFACT VUT is resolved in LocalDelivery but LocalDelivery is - in the
default configuration - only called after an isLocalEmail match

> This applies to every "redirecting" mailet, such as Redirect/Forward and
> not only to the VirtualUserTable stuff.

AIUI these features are not part of LocalDelivery whereas VUT is

> There is not a API to know what the final recipient will be given an
> input email and IMHO there should not be a similar API, because I could
> have some mailet with my own rules accepting some address now and some
> other address later and redirecting them to some address now and some
> other address later.
>
> I and Norman simply extracted the VUT to a service so to be able to use
> the same data both from a mailet and from the in protocol smtp filters,
> but this is only for advanced tuning and there is no out of the box
> solution at all, IMHO.

IMHO if LocalDelivery supports VUT then it should be a core feature
and supported out of the box. if not then create a VUT mailet which
using the service.

> If you have a proposal try to describe it and I'll try to show you the
> issues I see with the proposal ;-)

reduce the complexity: come up with a new clean consolidated user API
without the need for casts etc

- robert

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


Re: VirtualUserTable and VirtualHosting

Posted by Stefano Bagnara <ap...@bago.org>.
Robert Burrell Donkin ha scritto:
> On Sun, Dec 14, 2008 at 1:55 PM, Norman Maurer <no...@apache.org> wrote:
>> Ah ok now I see what makes you wonder... thats right. isLocalEmail
>> works only after the vut mappings was done. Thats prolly a problem in
>> some cases..
> 
> it's the problem in my case :-)
> 
> (the code's very messy since it's trying to ensure backwards compatibility.)

Sorry but I don't agree on this one.

The way VUT works is by design. We added some support for easy virtual
hosting leaving there the backward compatibility, but the underlying
system is not aware of the VUT so you have to run the VUT in the mailet
chain before any check for "isLocalEmail" is done.

This applies to every "redirecting" mailet, such as Redirect/Forward and
not only to the VirtualUserTable stuff.

There is not a API to know what the final recipient will be given an
input email and IMHO there should not be a similar API, because I could
have some mailet with my own rules accepting some address now and some
other address later and redirecting them to some address now and some
other address later.

I and Norman simply extracted the VUT to a service so to be able to use
the same data both from a mailet and from the in protocol smtp filters,
but this is only for advanced tuning and there is no out of the box
solution at all, IMHO.

If you have a proposal try to describe it and I'll try to show you the
issues I see with the proposal ;-)

Stefano

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


Re: VirtualUserTable and VirtualHosting

Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Sun, Dec 14, 2008 at 1:55 PM, Norman Maurer <no...@apache.org> wrote:
> Ah ok now I see what makes you wonder... thats right. isLocalEmail
> works only after the vut mappings was done. Thats prolly a problem in
> some cases..

it's the problem in my case :-)

(the code's very messy since it's trying to ensure backwards compatibility.)

- robert

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


Re: VirtualUserTable and VirtualHosting

Posted by Norman Maurer <no...@apache.org>.
Ah ok now I see what makes you wonder... thats right. isLocalEmail
works only after the vut mappings was done. Thats prolly a problem in
some cases..

Cheers,
Norman


2008/12/14 Robert Burrell Donkin <ro...@gmail.com>:
> On Sun, Dec 14, 2008 at 1:49 PM, Norman Maurer <no...@apache.org> wrote:
>> Hi Robert,
>>
>> I think it works like it should... if virtualhosting is not used it
>> just use the username to check if it is enable it use the complete
>> emailaddress.
>> Why you think it not works as aspected ?
>
> suppose support@example.org maps to john.smith (local user)
>
>>>    /**
>>>     * @see org.apache.mailet.MailetContext#isLocalEmail(org.apache.mailet.MailAddress)
>>>     */
>>>    public boolean isLocalEmail(MailAddress mailAddress) {
>>>    String userName = mailAddress.toString();
>>>        if (!isLocalServer(mailAddress.getHost())) {
>>>            return false;
>>>        }
>>>        if (virtualHosting == false) {
>>>            userName = mailAddress.getUser();
>>>        }
>>>        return localusers.contains(userName);
>>>    }
>
> this checks local users for user 'support' not the mapped local user
> 'john.smith'
>
> - robert
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>
>

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


Re: VirtualUserTable and VirtualHosting

Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Sun, Dec 14, 2008 at 1:49 PM, Norman Maurer <no...@apache.org> wrote:
> Hi Robert,
>
> I think it works like it should... if virtualhosting is not used it
> just use the username to check if it is enable it use the complete
> emailaddress.
> Why you think it not works as aspected ?

suppose support@example.org maps to john.smith (local user)

>>    /**
>>     * @see org.apache.mailet.MailetContext#isLocalEmail(org.apache.mailet.MailAddress)
>>     */
>>    public boolean isLocalEmail(MailAddress mailAddress) {
>>    String userName = mailAddress.toString();
>>        if (!isLocalServer(mailAddress.getHost())) {
>>            return false;
>>        }
>>        if (virtualHosting == false) {
>>            userName = mailAddress.getUser();
>>        }
>>        return localusers.contains(userName);
>>    }

this checks local users for user 'support' not the mapped local user
'john.smith'

- robert

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


Re: VirtualUserTable and VirtualHosting

Posted by Norman Maurer <no...@apache.org>.
Hi Robert,

I think it works like it should... if virtualhosting is not used it
just use the username to check if it is enable it use the complete
emailaddress.
Why you think it not works as aspected ?

Cheers,
Norman

2008/12/14 Robert Burrell Donkin <ro...@gmail.com>:
> On Sun, Dec 14, 2008 at 1:38 PM, Norman Maurer <no...@apache.org> wrote:
>> Ok I will try to fix it now.. Do you think we should create an extra
>> mailet or better include it in localDelivery ?
>> I think I would prolly add it to localDelivery
>
> UsersRepositoryAliasingForwarding is used by LocalDelivery and appears
> to contain code to sort out aliasing. the problem i have ATM is in
> James:
>
>    /**
>     * @see org.apache.mailet.MailetContext#isLocalEmail(org.apache.mailet.MailAddress)
>     */
>    public boolean isLocalEmail(MailAddress mailAddress) {
>    String userName = mailAddress.toString();
>        if (!isLocalServer(mailAddress.getHost())) {
>            return false;
>        }
>        if (virtualHosting == false) {
>            userName = mailAddress.getUser();
>        }
>        return localusers.contains(userName);
>    }
>
> this ignores virtual hosting and so the server assumes that the mail
> is for a remote domain.
>
> - robert
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>
>

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


Re: VirtualUserTable and VirtualHosting

Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Sun, Dec 14, 2008 at 1:38 PM, Norman Maurer <no...@apache.org> wrote:
> Ok I will try to fix it now.. Do you think we should create an extra
> mailet or better include it in localDelivery ?
> I think I would prolly add it to localDelivery

UsersRepositoryAliasingForwarding is used by LocalDelivery and appears
to contain code to sort out aliasing. the problem i have ATM is in
James:

    /**
     * @see org.apache.mailet.MailetContext#isLocalEmail(org.apache.mailet.MailAddress)
     */
    public boolean isLocalEmail(MailAddress mailAddress) {
    String userName = mailAddress.toString();
        if (!isLocalServer(mailAddress.getHost())) {
            return false;
        }
        if (virtualHosting == false) {
            userName = mailAddress.getUser();
        }
        return localusers.contains(userName);
    }

this ignores virtual hosting and so the server assumes that the mail
is for a remote domain.

- robert

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


Re: VirtualUserTable and VirtualHosting

Posted by Norman Maurer <no...@apache.org>.
Ok I will try to fix it now.. Do you think we should create an extra
mailet or better include it in localDelivery ?
I think I would prolly add it to localDelivery

Cheers,
Norman


2008/12/14 Robert Burrell Donkin <ro...@gmail.com>:
> On Sun, Dec 14, 2008 at 12:37 PM, Norman Maurer <no...@apache.org> wrote:
>> Sorry Robert I'm a bit confused.. So after adding that config stuff it
>> should just be a Matter of coding the right Mailet to support the VUT
>> stuff ?
>
> i think that it should just work once the config is right
>
> - robert
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>
>

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


Re: VirtualUserTable and VirtualHosting

Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Sun, Dec 14, 2008 at 12:37 PM, Norman Maurer <no...@apache.org> wrote:
> Sorry Robert I'm a bit confused.. So after adding that config stuff it
> should just be a Matter of coding the right Mailet to support the VUT
> stuff ?

i think that it should just work once the config is right

- robert

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


Re: VirtualUserTable and VirtualHosting

Posted by Norman Maurer <no...@apache.org>.
Sorry Robert I'm a bit confused.. So after adding that config stuff it
should just be a Matter of coding the right Mailet to support the VUT
stuff ?

Cheers,
Norman

2008/12/14 Robert Burrell Donkin <ro...@gmail.com>:
> On Sun, Dec 14, 2008 at 12:24 PM, Norman Maurer <no...@apache.org> wrote:
>> Hi Robert,
>>
>> that's what I have done ;-)
>
> i needed to add that to my test
>
> - robert
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>
>

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


Re: VirtualUserTable and VirtualHosting

Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Sun, Dec 14, 2008 at 12:24 PM, Norman Maurer <no...@apache.org> wrote:
> Hi Robert,
>
> that's what I have done ;-)

i needed to add that to my test

- robert

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


Re: VirtualUserTable and VirtualHosting

Posted by Norman Maurer <no...@apache.org>.
Hi Robert,

that's what I have done ;-)

Cheers,
Norman

2008/12/14 Robert Burrell Donkin <ro...@gmail.com>:
> On Sun, Dec 14, 2008 at 11:27 AM, Norman Maurer <no...@apache.org> wrote:
>> Hi Robert,
>>
>> thx for digging a bit deeper. I think we just need a Mailet which do
>> the "rewrite" of the recipients and add it before the LocalDelivery
>> mailet.
>>
>> Anythink I miss ?
>
> the same thing i missed ;-)
>
> the code's there but the configuration needs to be right.
> enableVirtualHosting needs to be enabled plus the domains listed.
> (that's as far as i've got so far).
>
> - robert
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>
>

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


Re: VirtualUserTable and VirtualHosting

Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Sun, Dec 14, 2008 at 11:27 AM, Norman Maurer <no...@apache.org> wrote:
> Hi Robert,
>
> thx for digging a bit deeper. I think we just need a Mailet which do
> the "rewrite" of the recipients and add it before the LocalDelivery
> mailet.
>
> Anythink I miss ?

the same thing i missed ;-)

the code's there but the configuration needs to be right.
enableVirtualHosting needs to be enabled plus the domains listed.
(that's as far as i've got so far).

- robert

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


Re: VirtualUserTable and VirtualHosting

Posted by Norman Maurer <no...@apache.org>.
Hi Robert,

thx for digging a bit deeper. I think we just need a Mailet which do
the "rewrite" of the recipients and add it before the LocalDelivery
mailet.

Anythink I miss ?

Cheers,
Norman


2008/12/14 Robert Burrell Donkin <ro...@gmail.com>:
> On Sun, Dec 14, 2008 at 10:02 AM, Robert Burrell Donkin
> <ro...@gmail.com> wrote:
>> On Sun, Dec 14, 2008 at 9:44 AM, Robert Burrell Donkin
>> <ro...@gmail.com> wrote:
>>> On Sat, Dec 13, 2008 at 8:42 PM, Robert Burrell Donkin
>>> <ro...@gmail.com> wrote:
>>>> On Sat, Dec 13, 2008 at 10:57 AM, Robert Burrell Donkin
>>>> <ro...@gmail.com> wrote:
>>>>> On Sat, Dec 13, 2008 at 10:24 AM, Norman Maurer <no...@apache.org> wrote:
>>>>>> Hi Robert,
>>>>>> comments inside...
>>>>>> 2008/12/13 Robert Burrell Donkin <ro...@gmail.com>:
>>>>>>> On Fri, Dec 12, 2008 at 4:56 PM, Norman Maurer <no...@apache.org> wrote:
>>>>
>>>> <snip>
>>>>
>>>>>> I think before the defunc it get called somewhere in the processor
>>>>>> chain todo the mapping. At the moment it seems the virtualuser-store
>>>>>> will get never used. Can you maybe give me some pointers where I can
>>>>>> dig a bit deeper ?
>>>>>
>>>>> i'll take a look but i'm not familiar with this area so it may take a
>>>>> little while...
>>>>
>>>> haven't managed to find the day to track down the problem and
>>>> demonstrate that it's fixed with an integration test but i did fix a
>>>> bug i'd introduced on friday which stopped the spool working. i have a
>>>> test for that so hopefully it should stay fixed now.
>>>>
>>>> i'm working on a test for the virtual user stuff but if you are in a
>>>> rush, it might be worthwhile just updating and retrying again.
>>>
>>> ATM the standard james configuration has a virtual user block (which
>>> allows mappings to be added and removed through the remote manager)
>>> but the mailet configuration uses RecipientIsLocal which is not
>>> virtual host aware. i can't find a suitable matcher that uses the new
>>> VUT interfaces. shouldn't be too difficult to create one, though.
>>
>> ok
>>
>> i think that the root cause of this issue is that James does not use
>> the VUT stuff when implementing the isLocalXXX calls in MailContext. i
>> think that the correct approach would be to add support into James and
>> make virtual users a core supported feature in james 3.
>>
>> unless anyone has any objections, i will dive in and implement.
>
> spoke too soon
>
> after taking a better look at the code, need to set up some more
> configuration stuff in james
>
> - robert
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>
>

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


Re: VirtualUserTable and VirtualHosting

Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Sun, Dec 14, 2008 at 10:02 AM, Robert Burrell Donkin
<ro...@gmail.com> wrote:
> On Sun, Dec 14, 2008 at 9:44 AM, Robert Burrell Donkin
> <ro...@gmail.com> wrote:
>> On Sat, Dec 13, 2008 at 8:42 PM, Robert Burrell Donkin
>> <ro...@gmail.com> wrote:
>>> On Sat, Dec 13, 2008 at 10:57 AM, Robert Burrell Donkin
>>> <ro...@gmail.com> wrote:
>>>> On Sat, Dec 13, 2008 at 10:24 AM, Norman Maurer <no...@apache.org> wrote:
>>>>> Hi Robert,
>>>>> comments inside...
>>>>> 2008/12/13 Robert Burrell Donkin <ro...@gmail.com>:
>>>>>> On Fri, Dec 12, 2008 at 4:56 PM, Norman Maurer <no...@apache.org> wrote:
>>>
>>> <snip>
>>>
>>>>> I think before the defunc it get called somewhere in the processor
>>>>> chain todo the mapping. At the moment it seems the virtualuser-store
>>>>> will get never used. Can you maybe give me some pointers where I can
>>>>> dig a bit deeper ?
>>>>
>>>> i'll take a look but i'm not familiar with this area so it may take a
>>>> little while...
>>>
>>> haven't managed to find the day to track down the problem and
>>> demonstrate that it's fixed with an integration test but i did fix a
>>> bug i'd introduced on friday which stopped the spool working. i have a
>>> test for that so hopefully it should stay fixed now.
>>>
>>> i'm working on a test for the virtual user stuff but if you are in a
>>> rush, it might be worthwhile just updating and retrying again.
>>
>> ATM the standard james configuration has a virtual user block (which
>> allows mappings to be added and removed through the remote manager)
>> but the mailet configuration uses RecipientIsLocal which is not
>> virtual host aware. i can't find a suitable matcher that uses the new
>> VUT interfaces. shouldn't be too difficult to create one, though.
>
> ok
>
> i think that the root cause of this issue is that James does not use
> the VUT stuff when implementing the isLocalXXX calls in MailContext. i
> think that the correct approach would be to add support into James and
> make virtual users a core supported feature in james 3.
>
> unless anyone has any objections, i will dive in and implement.

spoke too soon

after taking a better look at the code, need to set up some more
configuration stuff in james

- robert

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


Re: VirtualUserTable and VirtualHosting

Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Sun, Dec 14, 2008 at 9:44 AM, Robert Burrell Donkin
<ro...@gmail.com> wrote:
> On Sat, Dec 13, 2008 at 8:42 PM, Robert Burrell Donkin
> <ro...@gmail.com> wrote:
>> On Sat, Dec 13, 2008 at 10:57 AM, Robert Burrell Donkin
>> <ro...@gmail.com> wrote:
>>> On Sat, Dec 13, 2008 at 10:24 AM, Norman Maurer <no...@apache.org> wrote:
>>>> Hi Robert,
>>>> comments inside...
>>>> 2008/12/13 Robert Burrell Donkin <ro...@gmail.com>:
>>>>> On Fri, Dec 12, 2008 at 4:56 PM, Norman Maurer <no...@apache.org> wrote:
>>
>> <snip>
>>
>>>> I think before the defunc it get called somewhere in the processor
>>>> chain todo the mapping. At the moment it seems the virtualuser-store
>>>> will get never used. Can you maybe give me some pointers where I can
>>>> dig a bit deeper ?
>>>
>>> i'll take a look but i'm not familiar with this area so it may take a
>>> little while...
>>
>> haven't managed to find the day to track down the problem and
>> demonstrate that it's fixed with an integration test but i did fix a
>> bug i'd introduced on friday which stopped the spool working. i have a
>> test for that so hopefully it should stay fixed now.
>>
>> i'm working on a test for the virtual user stuff but if you are in a
>> rush, it might be worthwhile just updating and retrying again.
>
> ATM the standard james configuration has a virtual user block (which
> allows mappings to be added and removed through the remote manager)
> but the mailet configuration uses RecipientIsLocal which is not
> virtual host aware. i can't find a suitable matcher that uses the new
> VUT interfaces. shouldn't be too difficult to create one, though.

ok

i think that the root cause of this issue is that James does not use
the VUT stuff when implementing the isLocalXXX calls in MailContext. i
think that the correct approach would be to add support into James and
make virtual users a core supported feature in james 3.

unless anyone has any objections, i will dive in and implement.

- robert

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


Re: VirtualUserTable and VirtualHosting

Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Sat, Dec 13, 2008 at 8:42 PM, Robert Burrell Donkin
<ro...@gmail.com> wrote:
> On Sat, Dec 13, 2008 at 10:57 AM, Robert Burrell Donkin
> <ro...@gmail.com> wrote:
>> On Sat, Dec 13, 2008 at 10:24 AM, Norman Maurer <no...@apache.org> wrote:
>>> Hi Robert,
>>> comments inside...
>>> 2008/12/13 Robert Burrell Donkin <ro...@gmail.com>:
>>>> On Fri, Dec 12, 2008 at 4:56 PM, Norman Maurer <no...@apache.org> wrote:
>
> <snip>
>
>>> I think before the defunc it get called somewhere in the processor
>>> chain todo the mapping. At the moment it seems the virtualuser-store
>>> will get never used. Can you maybe give me some pointers where I can
>>> dig a bit deeper ?
>>
>> i'll take a look but i'm not familiar with this area so it may take a
>> little while...
>
> haven't managed to find the day to track down the problem and
> demonstrate that it's fixed with an integration test but i did fix a
> bug i'd introduced on friday which stopped the spool working. i have a
> test for that so hopefully it should stay fixed now.
>
> i'm working on a test for the virtual user stuff but if you are in a
> rush, it might be worthwhile just updating and retrying again.

ATM the standard james configuration has a virtual user block (which
allows mappings to be added and removed through the remote manager)
but the mailet configuration uses RecipientIsLocal which is not
virtual host aware. i can't find a suitable matcher that uses the new
VUT interfaces. shouldn't be too difficult to create one, though.

- robert

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


Re: VirtualUserTable and VirtualHosting

Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Sat, Dec 13, 2008 at 10:57 AM, Robert Burrell Donkin
<ro...@gmail.com> wrote:
> On Sat, Dec 13, 2008 at 10:24 AM, Norman Maurer <no...@apache.org> wrote:
>> Hi Robert,
>> comments inside...
>> 2008/12/13 Robert Burrell Donkin <ro...@gmail.com>:
>>> On Fri, Dec 12, 2008 at 4:56 PM, Norman Maurer <no...@apache.org> wrote:

<snip>

>> I think before the defunc it get called somewhere in the processor
>> chain todo the mapping. At the moment it seems the virtualuser-store
>> will get never used. Can you maybe give me some pointers where I can
>> dig a bit deeper ?
>
> i'll take a look but i'm not familiar with this area so it may take a
> little while...

haven't managed to find the day to track down the problem and
demonstrate that it's fixed with an integration test but i did fix a
bug i'd introduced on friday which stopped the spool working. i have a
test for that so hopefully it should stay fixed now.

i'm working on a test for the virtual user stuff but if you are in a
rush, it might be worthwhile just updating and retrying again.

- robert

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


Re: VirtualUserTable and VirtualHosting

Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Sat, Dec 13, 2008 at 10:24 AM, Norman Maurer <no...@apache.org> wrote:
> Hi Robert,
> comments inside...
>
>
> 2008/12/13 Robert Burrell Donkin <ro...@gmail.com>:
>> On Fri, Dec 12, 2008 at 4:56 PM, Norman Maurer <no...@apache.org> wrote:
>>> Hi Guys,
>>>
>>> after some long time I had some time to look at james trunk source
>>> again.
>>
>> cool :-)
>>
>>> I tried to deploy a james install and use VirtualUserTable todo
>>> all the forwarding stuff. But It seems it get never caleld todo the
>>> mappings. I enabled the "enableVirtualHosting" flag in the config.xml.
>>>
>>> Someone removed the support for it or I'm just not able to find where
>>> it get called and which mailet needs to get called ?
>>
>> i didn't intentionally remove support but it is possible that it isn't
>> working any more :-/
> Ok so it seems this is the case :-/ Unfortunaly I'm really spare in
> time and the new "layout" of the svn structure makes it even harder
> for me to understand what happend.

if that's the case, we should probably take another look at the
modularisation. the exercise has been useful but it might be time to
take stock and come up with a more measured solution.

is it the layout or the just tracking the code movements using subversion?

> I think before the defunc it get called somewhere in the processor
> chain todo the mapping. At the moment it seems the virtualuser-store
> will get never used. Can you maybe give me some pointers where I can
> dig a bit deeper ?

i'll take a look but i'm not familiar with this area so it may take a
little while...

>> ATM i'm working on building up a body of high level smoke tests using
>> MPT (http://james.apache.org/mpt). these tests use scripts (xsl to
>> transform the james configuration and mpt to script protocol
>> interactions) to run directly against an instance unpackaged from a
>> fully packaged james distribution.
>>
>> BTW if can find a few cycles to take a look and vote on the mailet 2.4
>> release that'd be really great
>
> Will do... promise.

cheers :-)

- robert

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


Re: VirtualUserTable and VirtualHosting

Posted by Norman Maurer <no...@apache.org>.
Hi Robert,
comments inside...


2008/12/13 Robert Burrell Donkin <ro...@gmail.com>:
> On Fri, Dec 12, 2008 at 4:56 PM, Norman Maurer <no...@apache.org> wrote:
>> Hi Guys,
>>
>> after some long time I had some time to look at james trunk source
>> again.
>
> cool :-)
>
>> I tried to deploy a james install and use VirtualUserTable todo
>> all the forwarding stuff. But It seems it get never caleld todo the
>> mappings. I enabled the "enableVirtualHosting" flag in the config.xml.
>>
>> Someone removed the support for it or I'm just not able to find where
>> it get called and which mailet needs to get called ?
>
> i didn't intentionally remove support but it is possible that it isn't
> working any more :-/
Ok so it seems this is the case :-/ Unfortunaly I'm really spare in
time and the new "layout" of the svn structure makes it even harder
for me to understand what happend.
I think before the defunc it get called somewhere in the processor
chain todo the mapping. At the moment it seems the virtualuser-store
will get never used. Can you maybe give me some pointers where I can
dig a bit deeper ?


> ATM i'm working on building up a body of high level smoke tests using
> MPT (http://james.apache.org/mpt). these tests use scripts (xsl to
> transform the james configuration and mpt to script protocol
> interactions) to run directly against an instance unpackaged from a
> fully packaged james distribution.
>
> BTW if can find a few cycles to take a look and vote on the mailet 2.4
> release that'd be really great

Will do... promise.

>
> - robert
>

Cheers,
Norman

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


Re: VirtualUserTable and VirtualHosting

Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Fri, Dec 12, 2008 at 4:56 PM, Norman Maurer <no...@apache.org> wrote:
> Hi Guys,
>
> after some long time I had some time to look at james trunk source
> again.

cool :-)

> I tried to deploy a james install and use VirtualUserTable todo
> all the forwarding stuff. But It seems it get never caleld todo the
> mappings. I enabled the "enableVirtualHosting" flag in the config.xml.
>
> Someone removed the support for it or I'm just not able to find where
> it get called and which mailet needs to get called ?

i didn't intentionally remove support but it is possible that it isn't
working any more :-/

ATM i'm working on building up a body of high level smoke tests using
MPT (http://james.apache.org/mpt). these tests use scripts (xsl to
transform the james configuration and mpt to script protocol
interactions) to run directly against an instance unpackaged from a
fully packaged james distribution.

BTW if can find a few cycles to take a look and vote on the mailet 2.4
release that'd be really great

- robert

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