You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Daniel Perry <d....@netcase.co.uk> on 2004/03/03 12:10:14 UTC

servernames and virtual hosting

I've been further testing my virtual hosting setup with james.

If you're going to follow my @ -> ..at.. username hack, you need to do it in
the smtp auth code aswell :)

Now onto my current problem - servernames are set in the config.xml.  While
this is simple, and effective for determining local hosts for simple setups,
it isnt very good for dynamic virtual hosting.  Using the virtual hosting
approach i've taken, all domains in the servernames block, and all names in
the 'domain' column of the VirtualUserTable should be treated as local.  Am
i missing somthing, or to add a servername is it necessary of me to copy the
info from vitrualusertable into config.xml and restart james?

I would like to be able to do somthing like the following:


      <servernames autodetect="true" autodetectIP="true"
serverNameTable="db://maildb/VirtualUserTable" serverNameColumn="domain">
<!-- CONFIRM? -->
         <servername>localhost</servername>
         <!--<servername>orange.netcase.co.uk</servername>
         <servername>apple.netcase.co.uk</servername>-->
         <servername>eddie.netcase.co.uk</servername>
      </servernames>


And have james check the (dynamic) database aswell as it's hardcoded list.

I'm working on implementing this. (not difficult, just trying to figure out
how the database abstraction in james is working...)

If anyone thinks any of this code will be useful, i'd be happy to submit it
to the dev list.

Thanks,
Daniel.

Re: servernames and virtual hosting

Posted by Tracy Bost <tb...@appraisalforum.com>.
Yes Daniel, it seems your hack may be helpful. I have been looking into james for our organization. Two of the issues I need to investigate further is
user quotas and virtual domains, as we have several domain names we use for email addresses.

thanks.


  ----- Original Message ----- 
  From: Daniel Perry 
  To: James Users List 
  Sent: Wednesday, March 03, 2004 5:10 AM
  Subject: servernames and virtual hosting


  I've been further testing my virtual hosting setup with james.

  If you're going to follow my @ -> ..at.. username hack, you need to do it in the smtp auth code aswell :)

  Now onto my current problem - servernames are set in the config.xml.  While this is simple, and effective for determining local hosts for simple setups, it isnt very good for dynamic virtual hosting.  Using the virtual hosting approach i've taken, all domains in the servernames block, and all names in the 'domain' column of the VirtualUserTable should be treated as local.  Am i missing somthing, or to add a servername is it necessary of me to copy the info from vitrualusertable into config.xml and restart james?

  I would like to be able to do somthing like the following:


        <servernames autodetect="true" autodetectIP="true" serverNameTable="db://maildb/VirtualUserTable" serverNameColumn="domain">
  <!-- CONFIRM? -->
           <servername>localhost</servername>
           <!--<servername>orange.netcase.co.uk</servername>
           <servername>apple.netcase.co.uk</servername>-->
           <servername>eddie.netcase.co.uk</servername>
        </servernames>


  And have james check the (dynamic) database aswell as it's hardcoded list.

  I'm working on implementing this. (not difficult, just trying to figure out how the database abstraction in james is working...)

  If anyone thinks any of this code will be useful, i'd be happy to submit it to the dev list.

  Thanks,
  Daniel.