Koozali.org: home of the SME Server

Separate User names for Virtual Domains

Scott

Separate User names for Virtual Domains
« on: August 27, 2003, 08:31:38 AM »
I would like to see an implementation of
username@yourdomain.com as opposed
to the current username. So that a
user does not receive email at every site
on the server.

It should not be to hard to set up a panel
in server-manager with the options necessary
to bind a particular username to a particular
domain. And have the system recognize that
username@domain1 is a different user
than username@domain2 and therefore should
allow a different password and directory.

Further more: server-manager should only
be accessible through the primary domain.
Not every domain on the server.

Boris

Re: Separate User names for Virtual Domains
« Reply #1 on: August 28, 2003, 03:38:20 PM »
Check here:
http://dungog.net/sme/products/index.php
They sell (cheap) add -on that does exactly what you want.

Scott

Re: Separate User names for Virtual Domains
« Reply #2 on: August 29, 2003, 04:05:59 AM »
Yes,

I checked them out after reading a post
in another forum. All they do is modify
qmail's settings so that it does not
apply a user name to every domain.

If it is this simple, why then does not
sme use such settings as default. Or
provide a panel in server-manager to
change these settings?

I have personally looked in the dierectory
structure for the .conf files. You know
the template directory where you are
suppose to change and update settings?
Either I am looking in all the wrong
places, as there are multiple instances
of subdirectories to get lost in, or
things are not where they are supposed
to be.

If I was more familiar with mitel and the
server-manager, (the scripting part of it)
I would attempt creating a script and
panel myself.

I however, have not found anyplace to get
such information.

Scott

Brian Markus

Re: Separate User names for Virtual Domains
« Reply #3 on: September 24, 2003, 11:30:07 PM »
I found this a while back reguarding this issue.  

How to set-up virtual domain e-mail aliases
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.

Scott

Re: Separate User names for Virtual Domains
« Reply #4 on: September 26, 2003, 05:02:11 AM »
Brian Markus wrote:
>
> I found this a while back reguarding this issue.  
>
> How to set-up virtual domain e-mail aliases
> 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.


How does these instructions separate email between
jim@domain1 with jim@domain2. What I am
reading in this post sme does already by default.
Now if there was a way to make user names
of jim@domain1 as opposed to jim, then these
instructions would do and the implementation
would work. But as it stands, this looks to be
only perform as the default settings of sme already
perform.

One last thing, if we continue this thread, lets take
it to either the general or expert group as to not
annoy the wish list guy:)