Ok,
When i get time i will write this up for ppl, but for now:

I am using a file store, with the exception of users - these are in a jdbc
store (mysql).

Configure james as per normal, but add the JDBCVirtualUserTable maillet:

<mailet match="All" class="JDBCVirtualUserTable">
    <table>db://maildb/VirtualUserTable</table>
</mailet>

At the moment i havnt completed the code for dealing with domains, so you
have to add to the servername section each domain you want to host.

To add users, i am not usign the admin tool (i am doing it directly in the
database).  I am also starting to write a web based tool to manage
addresses.

Addresses reuqire two entries - one in users, and one in virtualusers.

In the virtualusertable for my address ([EMAIL PROTECTED]) you have:
user: d.perry
domain: netcase.co.uk
target_address: d.perry..at..netcase.co.uk

In the users table for my address you have:
user: d.perry..at..netcase.co.uk
pwdHash: (sha encrypted junk)
pwdAlgorithm: SHA
useForwarding:0
forwardDestination:(NULL)
useAlias:0
alias:(zero length string)

Basically you have this pair for every user.
Also can add forwarders to virtual users. (including % in user)

Now down to the customisations:

The modified source, james.jar, and complete james.sar are available at:
http://www.netcase.co.uk/daniel/james/

This whole system relies on accounts being stored internally using ..at..
instead of @ otherwise the maillet tries to route it, and gets annoyed.

But, people are logging into smtp, and pop3 using @ symbols, so i've bodged
the java files to make this work - on the appropriate commands it replaces @
with ..at..

This still relies on you setting the account up either manually, or through
the admin tool as ..at..

As i said, i am planning on finishing the code so that it automatically
treats any domains in the virtualusertable as local.  This will get rid of
any changes required in config.xml on a per domain basis.

I am also planning on writing a simple web app for administering the email
addresses.

Note that i found all this much easier to understand and setup, that i did
getting any of sendmail/qmail/etc to work at all.

Daniel.

-----Original Message-----
From: J Malcolm [mailto:[EMAIL PROTECTED]
Sent: 17 March 2004 15:47
To: 'James Users List'
Subject: RE: Virtual Domain Emulation - Cookbook?


What you are doing looks like it will work for me.  But could you give
me more details?  I assume you now set up mailboxes in the admin tool
using:

adduser [EMAIL PROTECTED] password

right?

This means that now you have add/modify a mailet to know to send it a
box by this name rather than a box named "user".  How do you do that?

What kind of patch did you have to make to James as you referred to?

Finally, does this work with file store as well as database store?

Thanks.

Jerry


-----Original Message-----
From: Daniel Perry [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 17, 2004 9:31 AM
To: James Users List
Subject: RE: Virtual Domain Emulation - Cookbook?

This is true, pop3/smtp dont have a hostname header - but they do have a
to
address and a login - so you can work it out.

Incoming mails have a hostname in the to address.... (unless you're
accepting mails to an ip.... which i think you have to do without).

Logging into server - use [EMAIL PROTECTED] as the username.

This works effectively for me. (note you have to patch james's code to
work
around not beign able to have @s in usernames)

With very little effort james does provide a good virtual hosting
solution.

Btw, i have been working with a modified version of latest stable james.
I
havnt checked out the cvs verion of james - what new virtual hosting
features will be added? Will i still have to patch it to convert "@'s"
to
"..at.." and also add code for treating any domains in virtual host
table as
local?

Daniel.


-----Original Message-----
From: Danny Angus [mailto:[EMAIL PROTECTED]
Sent: 17 March 2004 15:06
To: James Users List
Subject: Re: Virtual Domain Emulation - Cookbook?

      > P.S. Just out of curiosity, is there any plan to incorporate
      virtual domains natively in James in a future release?  Would seem
to
      me to be a pretty basic function and should be > native such as
with
      Apache and Tomcat.

      Yes I'm going to do it, I've already done it once, and lost it in
an
      hdd crash :-(
      I'm waiting until Noel's merged our two main branches, and will
      probably be implementing JNDI for resource lookups first.

      You should be aware that IP based Vhosting *is* fairly
      straightforward, but name based vhosting isn't as there is no
      equivalent in POP or IMAP to http's "Hostname" header for telling
us
      what name you're trying to get.

      d.




************************************************************************
***
The information in this e-mail is confidential and for use by the
addressee(s) only. If you are not the intended recipient (or responsible
for
delivery of the message to the intended recipient) please notify us
immediately on 0141 306 2050 and delete the message from your computer.
You
may not copy or forward it or use or disclose its contents to any other
person. As Internet communications are capable of data corruption
Student
Loans Company Limited does not accept any  responsibility for changes
made
to this message after it was sent. For this reason it may be
inappropriate
to rely on advice or opinions contained in an e-mail without obtaining
written confirmation of it. Neither Student Loans Company Limited or the
sender accepts any liability or responsibility for viruses as it is your
responsibility to scan attachments (if any). Opinions and views
expressed in
this e-mail are those of the sender and may not reflect the opinions and
views of The Student Loans Company Limited.

This footnote also confirms that this email message has been swept for
the
presence of computer viruses.

************************************************************************
**


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to