Koozali.org: home of the SME Server

Multi-Domain

Mike

Multi-Domain
« on: December 28, 2003, 05:01:25 PM »
Has someone concidered to make the SME server multi-domain.
Right now SME has a Primary domain and can contain additional virtual domains.
But mail can only be send to anything@primarydomain.com.
As I have seen at dungog.net, they have made an rpm (not for free) that makes it possible to reroute all mail to anyuser@virtualdomain.com
There is also an oldfashioned way to program it by hand.
It would be a nice thing if SME wouldn't have a primary domain and additional virtual domains anymore but that it would have: domain1, domain2, and so on.
Are there people who have the expertise and are able to start a project like that?

Klaus Eckert

Re: Multi-Domain
« Reply #1 on: December 29, 2003, 01:49:41 AM »
good idea.
i would be happy about this new feature, too.

cheers klaus

Richard Bruce

Re: Multi-Domain
« Reply #2 on: December 31, 2003, 01:18:03 PM »
Unfortunately for every person that wants seperate domains, there's someone that wants it the "traditional" e-smith way! I'm in the camp that would like everything to default to auser@primarydomain BUT also to have an option on a user-panel to be able to set up a diversion for auser@avirtualdomain to an alternative e-smith user account. Perhaps this is the best way to keep everyone happy :-)

As an example every user on our system has an email address of auser@cfpress.co.uk, but we have around 30 newspaper titles, all wanting to use editor@title.co.uk! The manual setup for this is a total pain in the rear end! If anyone fancies developing a panel for this they get my vote :-)

However if your willing to wait a few months and I get the time, who knows?

Blockbuster

Re: Multi-Domain
« Reply #3 on: December 31, 2003, 02:23:35 PM »
This is what I found on http://myezserver.com doesn't this solves your problem?

Problem:
You need set-up virtual e-mail domains that support for example info@domain1.com and forward this e-mail to the appropriate recipient.  For our example will send info@domain1.com to the user fred.
Step 1- Virtual Domain Set-up:

Use the e-smith-manager, Virtual domain panel to set-up the virtual domain, domain1.com.  Instructions are found in the user manual.

Step 2 - Create your user:

Use the e-smith-manager, User accounts panel to set-up the user fred.  Instructions are found in the user manual.

Step 3 - Create users .qmail-default:

In the users home directory, /home/e-smith/files/users/fred create a file named .qmail-default containing only one line, the users name, fred.

   pico /home/e-smith/files/users/fred/.qmail-default
   - add the one word fred
   - save the file
Step 4 - Set the ownership and rights on .qmail-default to the user only:

   chown fred:fred /home/e-smith/files/users/fred/.qmail-default
   chmod 644 /home/e-smith/files/users/fred/.qmail-default
Step 5 - Create a templates-custom fragment:
   mkdir -p /etc/e-smith/templates-custom/var/qmail/control/virtualdomains
   pico /etc/e-smith/templates-custom/var/qmail/control/virtualdomains/90aliases
In this 90aliases file enter all your virtual aliases in the form alias:username.  In the example below info@domain1.com is to go to user fred.

   info@domain1.com:fred
If you want all domain mail going into one account, enter your virtual alias in the form domain:username.  In the example below domain1.com:fred sends all @domain1.com mail to user fred.

   domain1.com:fred
If you want all domain mail going into one account, except for defined users, enter your virtual aliases in the form shown below.  In the example below domain1.com:fred sends all @domain1.com mail to user fred except for jim and bob who get their mail directly..

   domain1.com:fred
   jim@domain1.com:jim
   bob@domain1.com:bob
Step 6 - Save the file above and execute a console-save:

   /sbin/e-smith/signal-event console-save
This recreates the file var/qmail/control/virtualdomains with the above alias entries preceeding the domain entries.

Step 7 - Restart Qmail:

Issue the command "killall -HUP qmail-send" to restart qmail and re-read in the updated var/qmail/control/virtualdomains file.

   killall -HUP qmail-send
or
   /etc/rc.d/init.d/qmail.init restart
Step 8 - Test the above virtual aliases:

Send an e-mail to info@domain1.com to test that it is received by the qmail server without error and reach the intended recipient (fred) mailbox.

Richard Bruce

Re: Multi-Domain
« Reply #4 on: December 31, 2003, 02:40:26 PM »
Hi,

That's exactly the method I use (and where I got it from!) however it would be soooo much easier if it could be converted into a control panel somewhere. Have you ever tried managing a couple of hundred aliases this way? Nightmare....but it works!

Mike

Re: Multi-Domain
« Reply #5 on: December 31, 2003, 02:55:34 PM »
Yes, Blockbuster, I know and found that one also.
That's what I meant with:
"There is also an oldfashioned way to program it by hand."
I have never needed to use it but I read somewhere that someone was doing it like that and he would have been very happy with a panel that would do just that because in his opinion it was a lot of work if you would have to do it by hand al the time.
I just took his word on that and personally I am pro for making userpanels for everything that people want to do with an SME-server.

Also Richard, You are right, there is nothing wrong with defaulting to a primary domain as long as you could directly select the domain that you would want the user to be a part of in the create a "Add user account"-panel.
If a new user would default to the primary domain, but with one selection with "Add user account"-panel, you could make the user to belong to another virtual domain, than I think all people would be happy.

Just wish I would have more time and would have some programming knowledge.
Than I would jump in and try to make someting like that myself but time is a luxery I do not have to much of and I have never programmed something like that.

That's why I had hoped that someone who does have some spare time and programming knowledge, would jump in on this.
It is possible by hand so it must be programmable in a panel without too much problems for someone with programming knowledge.
Beside that, it would be a great pro for the SME-server.

Anyone with the skills to create SME-panels that would like to have a go on this?

Boris

Re: Multi-Domain
« Reply #6 on: December 31, 2003, 09:59:46 PM »
> we have around 30 newspaper titles, all wanting to use editor@title.co.uk! The manual setup for this is a total pain in the rear end!

dungog's vdomain is only $33 (a dollar per your title). Is it to much for decreasing the pain in the rear? Pain killers pills are more expensive :-)

Richard Bruce

Re: Multi-Domain
« Reply #7 on: January 05, 2004, 04:46:04 PM »
Boris,

Thanks for that. Strangely enough I actually pointed someone else to Dungog for another panel Stephen had done. I didn't realise that he had a vdomain panel as well. Only fly in the ointment is that we've got a registered server and Mitel aren't very happy with non-Mitel contribs. I'll take a look at the panel, if it's what I need I'll try to find a way to buy it.

Thanks

Richard