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 Levent Guendogdu <l....@feature-it.com> on 2003/08/01 15:06:48 UTC
Multiple Realm Functionality / Virtual Mail Servers
Hi all,
am I correct that handling virtual realms is not possible with James? I
need that functionality very badly and I have the weekend to do some
work on it. Has there been any discussion about it, yet? Since I'm new
to the list I don't have any archive to search trough, so I can't tell
if there's been any discussion about a good way to start the
implementation.
>>From what I can tell so far work needs to be done in two areas:
1) The repositories: store mails for different domains in different
repositories. This should be quite easy to accomplish since you can
already define multiple repositories and only need to give them
different names.
2) The services: POP3, SMTP...
These are based on user information and authentication. Work has to be
done to make those services recognize different realms and use the user
information accordingly. AFAIK these services always use the
"LocalUsers" repository.
Am I correct, so far?
Thanks for any pointers, suggestions or flames ;)
Bye,
Lev.
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Multiple Realm Functionality / Virtual Mail Servers
Posted by Levent Guendogdu <l....@feature-it.com>.
Hi Kervin, hi Christian,
> >> Since POP3 lacks the possiblity to authenticate a user for a specific
> >> domain, I've taken the "not-so-nice" approach and created users like
> >>
> >> username.domainname
> >
> > Minor point...,
> >
> > Cyrus IMAP server, and a few others that support virtual domains use
> > username@domainname
Sure thing ;) I wanted this approach, too, but the JDBCVirtualUserTable
looks up the virtual user and parses the resulting name. If there is a @
in that name (that would reflect the user at the virtual domain), the
mail would not be delivered locally but would be passed to another host.
I worked around that by doing the "username.domainname" notation.
But you're right, the other approach is mucho nicer.
> > I think that approach has the advantage of being able to tell the user
> > "Just use your full email address as your login name"
Agreed.
Lev.
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Multiple Realm Functionality / Virtual Mail Servers
Posted by Christian Andersson <ca...@ofs.no>.
Kervin L. Pierre wrote:
> Levent Guendogdu wrote:
>
>> Since POP3 lacks the possiblity to authenticate a user for a specific
>> domain, I've taken the "not-so-nice" approach and created users like
>>
>> username.domainname
>>
>
> Minor point...,
>
> Cyrus IMAP server, and a few others that support virtual domains use
> username@domainname
>
> I think that approach has the advantage of being able to tell the user
> "Just use your full email address as your login name"
also this server (the server our isp use) (IMail 7.13 382379-2) NT-ESMTP
Server X1
also use the username@domainname scheame to distinguise virtual domains...
/Christian Anderssson
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Multiple Realm Functionality / Virtual Mail Servers
Posted by "Kervin L. Pierre" <ke...@blueprintinc.com>.
Levent Guendogdu wrote:
> Since POP3 lacks the possiblity to authenticate a user for a specific
> domain, I've taken the "not-so-nice" approach and created users like
>
> username.domainname
>
Minor point...,
Cyrus IMAP server, and a few others that support virtual domains use
username@domainname
I think that approach has the advantage of being able to tell the user
"Just use your full email address as your login name"
Plus "username.domainname" may cause issues, since the '.' dot is a
valid charactor in usernames eg. In your current scheme
kervin.pierre@mail.domain.com becomes kervin.pierre.mail.domain.com.
But what if we're also hosting emails on the @domain.com domain? The
login is abiguous with kervin.pierre.mail@domain.com
--
------------------------------------------------
Kervin Pierre
http://kervin.net/
kervin@blueprintinc.com
kervin@kervin.net
kpierre@fit.edu
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
Re: Multiple Realm Functionality / Virtual Mail Servers
Posted by Levent Guendogdu <le...@feature-it.com>.
Hi all,
I have managed to set up a multi realm environment using James. It works
very nice. I've used a slightly modified the JDBCVirtualUserTable mailet
(the original didn't work well with postgresql, as it returned *wrong*
usernames for a specific address, and the column name 'user' is a
reserved keyword in postgresql.).
Since POP3 lacks the possiblity to authenticate a user for a specific
domain, I've taken the "not-so-nice" approach and created users like
username.domainname
which I didn't want at the beginning. But currently there's no other
way, IMHO. But at least I can use as many domains I want on a single IP
address. ;)
Lev.
On Fri, 2003-08-01 at 15:06, Levent Guendogdu wrote:
> Hi all,
>
> am I correct that handling virtual realms is not possible with James? I
> need that functionality very badly and I have the weekend to do some
> work on it. Has there been any discussion about it, yet? Since I'm new
> to the list I don't have any archive to search trough, so I can't tell
> if there's been any discussion about a good way to start the
> implementation.
>
> >From what I can tell so far work needs to be done in two areas:
>
> 1) The repositories: store mails for different domains in different
> repositories. This should be quite easy to accomplish since you can
> already define multiple repositories and only need to give them
> different names.
>
> 2) The services: POP3, SMTP...
> These are based on user information and authentication. Work has to be
> done to make those services recognize different realms and use the user
> information accordingly. AFAIK these services always use the
> "LocalUsers" repository.
>
> Am I correct, so far?
>
> Thanks for any pointers, suggestions or flames ;)
>
> Bye,
> Lev.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
--
Levent Guendogdu <le...@feature-it.info>
Feature-IT Information Technology
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
RE: Multiple Realm Functionality / Virtual Mail Servers
Posted by Levent Guendogdu <l....@feature-it.com>.
Simeon,
> I have a custom implementation, which covers all your requirements, except
> SMTP authentication for virtual domains. It works fine for me for several
> months, already.
mhhh - yummy ;)
> 1. I nevered tried it with file type repositories, although in theory it
> should work;
Guess so, too. When the abstraction is well defined, this should work.
> 2. In order to extend certain James services, during compilation time I'm
> redeclaring some private members in original james classes to public. This
> means, that you should recompile everything from scratch, whenever a new
> James release is available. It is not possible just to get James binaries
> and add my extension jars to lib dirs... And of course, if for some reason
> my extensions are not compatible with future James releases, you should wait
> for me to fix them :)
<nice-meant-flame>Hm.. I'm not sure if I like that ;) First of all, why
did you declare the members of classes to be public? When you need
access to special data inside some objects, it would be "wiser" to
declare access functions. Because now, you may alter those members from
anywhere in the code, making it difficult for others to read or to find
bugs. In an OO Design, please use methods to alter members of
objects.</nice-meant-flame>
I am very interested about your approach and how it works. Could you say
a little more of how you did the actual implementation and which way you
took? And especially: why is the SMTP auth. for virtual domains missing?
> I may send you either sources, or compiled james.sar. In second case it
> would be enough just to replace your original james.sar and apply
> appropriate changes in config.xml.
If you don't mind, a diff to some "official version" would be very very
nice.
Regards,
Lev.
> Hi all,
>
> am I correct that handling virtual realms is not possible with James? I
> need that functionality very badly and I have the weekend to do some
> work on it. Has there been any discussion about it, yet? Since I'm new
> to the list I don't have any archive to search trough, so I can't tell
> if there's been any discussion about a good way to start the
> implementation.
>
> >From what I can tell so far work needs to be done in two areas:
>
> 1) The repositories: store mails for different domains in different
> repositories. This should be quite easy to accomplish since you can
> already define multiple repositories and only need to give them
> different names.
>
> 2) The services: POP3, SMTP...
> These are based on user information and authentication. Work has to be
> done to make those services recognize different realms and use the user
> information accordingly. AFAIK these services always use the
> "LocalUsers" repository.
>
> Am I correct, so far?
>
> Thanks for any pointers, suggestions or flames ;)
>
> Bye,
> Lev.
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
RE: Multiple Realm Functionality / Virtual Mail Servers
Posted by Simeon Kirov <sk...@worldnn.com>.
Levent,
I have a custom implementation, which covers all your requirements, except
SMTP authentication for virtual domains. It works fine for me for several
months, already.
There are some problems:
1. I nevered tried it with file type repositories, although in theory it
should work;
2. In order to extend certain James services, during compilation time I'm
redeclaring some private members in original james classes to public. This
means, that you should recompile everything from scratch, whenever a new
James release is available. It is not possible just to get James binaries
and add my extension jars to lib dirs... And of course, if for some reason
my extensions are not compatible with future James releases, you should wait
for me to fix them :)
I may send you either sources, or compiled james.sar. In second case it
would be enough just to replace your original james.sar and apply
appropriate changes in config.xml.
Regards,
Simeon
-----Original Message-----
From: Levent Guendogdu [mailto:l.guendogdu@feature-it.com]
Sent: Friday, August 01, 2003 16:07
To: server-dev@james.apache.org
Subject: Multiple Realm Functionality / Virtual Mail Servers
Hi all,
am I correct that handling virtual realms is not possible with James? I
need that functionality very badly and I have the weekend to do some
work on it. Has there been any discussion about it, yet? Since I'm new
to the list I don't have any archive to search trough, so I can't tell
if there's been any discussion about a good way to start the
implementation.
>>From what I can tell so far work needs to be done in two areas:
1) The repositories: store mails for different domains in different
repositories. This should be quite easy to accomplish since you can
already define multiple repositories and only need to give them
different names.
2) The services: POP3, SMTP...
These are based on user information and authentication. Work has to be
done to make those services recognize different realms and use the user
information accordingly. AFAIK these services always use the
"LocalUsers" repository.
Am I correct, so far?
Thanks for any pointers, suggestions or flames ;)
Bye,
Lev.
---------------------------------------------------------------------
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: Multiple Realm Functionality / Virtual Mail Servers
Posted by Levent Guendogdu <l....@feature-it.com>.
Hi Andy,
> The big gotcha is that although we can handle SMTP with matchers and mailets
> delivering locally into different repositories depending upon recipient
> address hostname we need to be able to identify the domain (and hence the
> credentials) of the authenticating user during SMTP AUTH, and POP3 log-in.
*nods*
> Trivially you can work around this by making some small changes which use
> the full user@domain or user.domain as the username, others have done this
> sucessfully in the past.
Yeah, I thought about this one, too, but somehow this isn't "nice" ;)
> For completeness though we need to implement proper IP based virtual
> hosting, whereby James can assume the domain from the (local)IP address of
> the socket, and we can then assign user domains to IP addresses.
>
> I did start this, and I believe that some of the work I did in preparation
> has been commited to the HEAD, but I lost it when my drive underwent a nast
> head-crash :-( from what I remember there are few gotchas, but you may have
> to override some of James' global settings with multiple local ones based
> upon socket IPs.
>
> If you see what I mean.
I see. I thought about setting up multiple services SMTP and POP3
services, each listening to another IP address and using it's own user
repository and mail repository. For SMTP, one then would need a "master"
SMTP service which has several relay entries which deliver mail for the
virtual domains to the appropriate SMTP service. But this scenario
breaks for local delivery and POP3.
So your approach sounds a lot better. Each service has to map a specific
incoming address to a virtual domain name which, in turn, has to be used
to access the specific repositories. The down side on this is, that one
really needs a separate IP address for every domain that is handled.
So, the decision about pros and cons doesn't seem to be over yet ;)
Scratching head,
Lev.
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
RE: Multiple Realm Functionality / Virtual Mail Servers
Posted by Danny Angus <da...@apache.org>.
Lev,
> 1) The repositories: store mails for different domains in different
> repositories. This should be quite easy to accomplish since you can
> already define multiple repositories and only need to give them
> different names.
Yes.
>
> 2) The services: POP3, SMTP...
> These are based on user information and authentication. Work has to be
> done to make those services recognize different realms and use the user
> information accordingly. AFAIK these services always use the
> "LocalUsers" repository.
>
> Am I correct, so far?
Yes.
The big gotcha is that although we can handle SMTP with matchers and mailets
delivering locally into different repositories depending upon recipient
address hostname we need to be able to identify the domain (and hence the
credentials) of the authenticating user during SMTP AUTH, and POP3 log-in.
Trivially you can work around this by making some small changes which use
the full user@domain or user.domain as the username, others have done this
sucessfully in the past.
An alternative might be to wholly de-couple the users authentication
username from the user portion of their mail address(es), the former has to
be unique in James, but the latter only unique in the relevant domain. It
could be accomplished by aliasing mailuser@maildomain to
uniqueuser@localhost. I suspect this would be the fastest route and might be
possible without hacking any code, particularly if you can use JDBC Virtual
Users for the mapping and knock up a GUI to manage the task. I expect there
will be hidden gotchas in the processor pipeline, related to aliasing, but I
can't imagine a concrete example ATM.
For completeness though we need to implement proper IP based virtual
hosting, whereby James can assume the domain from the (local)IP address of
the socket, and we can then assign user domains to IP addresses.
I did start this, and I believe that some of the work I did in preparation
has been commited to the HEAD, but I lost it when my drive underwent a nast
head-crash :-( from what I remember there are few gotchas, but you may have
to override some of James' global settings with multiple local ones based
upon socket IPs.
If you see what I mean.
d.
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org