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 Kenny Smith <ke...@journalscape.com> on 2002/11/22 18:50:18 UTC

Dynamic Domains?

Hello all,

Short Version:

I'm interested in adding some functionality to the pop server, but I'm not 
exactly sure how to approach it. I understand how to add mailets to process 
incoming mail, but I can't find any way to plug functionality into the POP 
server. Is there a way?

Long Version:

My high level goal:

I would like to be able to add a domain to James without having to hard 
code it in the config.xml and without having to restart.

My users are outside the network on dynamic IPs. Currently, I'm using 
SMTP-AUTH to allow them to send mail through James, but in order for that 
to work I have to hard code the domains in the <servernames/> block. That 
means every time I want to add a domain to James, I have to edit config.xml 
and restart, which isn't a pleasant situation. I'm using the all the JDBC 
classes so that my users and email aliases are all dynamic. The only piece 
missing is the above.

I have 2 ideas:

1) Write code to replace the <servername/> entries in the config.xml with 
JDBC calls
2) Stop using SMTP-AUTH (the thing requiring the hard coded domains), and 
write code to dynamically allow and disallow mail relay. This way 
JDBCVirtualUserTable will resolve the email from kenny@journalscape.com 
down to kenny@localhost and localhost _will_ be hard coded into the 
<servernames/> so the email will get delivered properly.

Option 1 involves getting down into the guts of James (at least I think so) 
so it's intimidating. Option 2 _feels_ like it can be done with mailets, 
which makes it feel inherently superior.

What I'd like to do:
I'd like to add a mailet to record the IP address and timestamp of a user 
when they make a successfully authenticated POP connection. Then I'd like 
to add a mailet to the root processor that checks the sender's IP address 
against the above record of IP addresses to see if they have been 
authenticated.

As far as I can tell this will allow me to dynamically add domains to James 
by just inserting new rows in the email alias table used by 
JDBCVirtualUserTable.

Any suggestions, comments, criticism are appreciated.

Kenny Smith
JournalScape.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Dynamic Domains?

Posted by Kenny Smith <ke...@journalscape.com>.
> We're in a holding pattern while we make a new stable release based on
> the existing code base, but then we'll be making more aggressive changes
>  to the mailet API and the guts of James.  Supporting virtual hosts and
> dynamically managing them is going to be a top priority as it's one of
> the most requested features.
>
> If you can sit tight for a few more weeks, we hope to get this
> conversation started next month (I'm hoping), and then we'd very much
> appreciate your involvement.


Hi Serge!

That sounds great! Good luck with the release and I look forward to the 
chance to contribute.

Kenny Smith
JournalScape.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Dynamic Domains?

Posted by Serge Knystautas <se...@lokitech.com>.
Kenny Smith wrote:
> Hello all,
> 
> Short Version:
> 
> I'm interested in adding some functionality to the pop server, but I'm 
> not exactly sure how to approach it. I understand how to add mailets to 
> process incoming mail, but I can't find any way to plug functionality 
> into the POP server. Is there a way?
> 
> Long Version:
> 
> My high level goal:
> 
> I would like to be able to add a domain to James without having to hard 
> code it in the config.xml and without having to restart.
> 
> My users are outside the network on dynamic IPs. Currently, I'm using 
> SMTP-AUTH to allow them to send mail through James, but in order for 
> that to work I have to hard code the domains in the <servernames/> 
> block. That means every time I want to add a domain to James, I have to 
> edit config.xml and restart, which isn't a pleasant situation. I'm using 
> the all the JDBC classes so that my users and email aliases are all 
> dynamic. The only piece missing is the above.
> 
> I have 2 ideas:
> 
> 1) Write code to replace the <servername/> entries in the config.xml 
> with JDBC calls
> 2) Stop using SMTP-AUTH (the thing requiring the hard coded domains), 
> and write code to dynamically allow and disallow mail relay. This way 
> JDBCVirtualUserTable will resolve the email from kenny@journalscape.com 
> down to kenny@localhost and localhost _will_ be hard coded into the 
> <servernames/> so the email will get delivered properly.
> 
> Option 1 involves getting down into the guts of James (at least I think 
> so) so it's intimidating. Option 2 _feels_ like it can be done with 
> mailets, which makes it feel inherently superior.
> 
> What I'd like to do:
> I'd like to add a mailet to record the IP address and timestamp of a 
> user when they make a successfully authenticated POP connection. Then 
> I'd like to add a mailet to the root processor that checks the sender's 
> IP address against the above record of IP addresses to see if they have 
> been authenticated.
> 
> As far as I can tell this will allow me to dynamically add domains to 
> James by just inserting new rows in the email alias table used by 
> JDBCVirtualUserTable.
> 
> Any suggestions, comments, criticism are appreciated.

Kenny,

We're in a holding pattern while we make a new stable release based on 
the existing code base, but then we'll be making more aggressive changes 
  to the mailet API and the guts of James.  Supporting virtual hosts and 
dynamically managing them is going to be a top priority as it's one of 
the most requested features.

If you can sit tight for a few more weeks, we hope to get this 
conversation started next month (I'm hoping), and then we'd very much 
appreciate your involvement.

-- 
Serge Knystautas
Loki Technologies - Unstoppable Websites
http://www.lokitech.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [V3] Dynamic Configuration and DRAC

Posted by Kenny Smith <ke...@journalscape.com>.
Woo hoo! I'm happy we're back on a forward track. :) :) :)

> >I would like to be able to add a domain to James without having to hard
> >code it in the config.xml and without having to restart.
>
>
> This should be a feature goal for James v3.  Do you know the Wiki?  :-)


No, I've heard it mentioned on the list though. Is it a Jakarta project? 
I'll look on the site.

As for the v3 goal.. I'd like to suggest that we add to a 2.x. A lot of 
stuff has been talked about being added to James and we keep talking 
about a 3.x version it, but I'd really like to get to the "Release 
Often" paradigm. It's been talked about a lot on the list, but I think 
now that we are moving forward again we're all excited to work on big 
changes.

>
> >1) Write code to replace the  entries in the config.xml with
> >   JDBC calls.
>
>
> We need to discuss, generically, how we want to handle dynamic
> configuration.

Agreed. I like to throw my ideas out to see how they work with others. 
In my current situation, something that would make my life a lot easier 
is a set of objects that represent the standard user, alias, repository 
tables.

My desire: I want to write a web app to manage pop accounts and aliases, 
etc. What this requires is that I write my own object that fiddles with 
the user and alias tables. I'd love a James object I could instantiate, 
make changes to, and then commit, outside of an Avalon structure. I 
realize this might not be a doable thing, but I just want to put it out 
there to see what you think.

> One method, as a strawman, might be to view the current config.xml as 
> a bootstrap, and to have configuration handlers that can go out to 
> other data sources, and call methods on James to affect configuration. 
>  So you might have a configuration handler that would lookup server 
> names from JNDI or from a database, and it would call a method on 
> James to add a new server name.

I think I follow you... it's a little big for me to picture.

> >2) Stop using SMTP-AUTH (the thing requiring the hard coded domains), 
> and write code to dynamically allow and disallow mail relay.
>
> >add a mailet to record the IP address and timestamp of a user
> >when they make a successfully authenticated POP connection.
>
> This ties in with Serge's comment about DRAC
> (http://mail.cc.umanitoba.ca/drac/).

Yes, I use otto_relayd which is a system very similiar to DRAC and what 
I was basing the concept of my request on. I'd be interested in a way to 
plug functionality into the POP server (like we plug mailets into the 
transport processor), so that I could do special stuff during POP 
sessions. *shrug* :)

Kenny


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


[V3] Dynamic Configuration and DRAC

Posted by "Noel J. Bergman" <no...@devtech.com>.
Now that James v2.1 is delivered (Danny still needs to do some work on
Jakarta, or I need to get sufficient karma to make the changes), I'm going
back over some older e-mails ... one of which is from Kenny Smith, entitled
"Dynamic Domains."

> I would like to be able to add a domain to James without having to hard
> code it in the config.xml and without having to restart.

This should be a feature goal for James v3.  Do you know the Wiki?  :-)

> 1) Write code to replace the <servername/> entries in the config.xml with
>    JDBC calls.

We need to discuss, generically, how we want to handle dynamic
configuration.

One method, as a strawman, might be to view the current config.xml as a
bootstrap, and to have configuration handlers that can go out to other data
sources, and call methods on James to affect configuration.  So you might
have a configuration handler that would lookup server names from JNDI or
from a database, and it would call a method on James to add a new server
name.

> 2) Stop using SMTP-AUTH (the thing requiring the hard coded domains), and
> write code to dynamically allow and disallow mail relay.

> add a mailet to record the IP address and timestamp of a user
> when they make a successfully authenticated POP connection.

This ties in with Serge's comment about DRAC
(http://mail.cc.umanitoba.ca/drac/).

	--- Noel


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>