Koozali.org: home of the SME Server

Emails & virtual domains

Ole Andersen

Emails & virtual domains
« on: February 25, 2003, 02:48:12 PM »
Hi' All

By going through the forum, i have found out that by design, it is not possible to differentiate users for virtual domains.
I can't have a mailbox for joe@vdomain1.com and another for joe@vdomain2.com.

Why is that. Is it smart, or is it something for the wishlist.

My first impression is that it is hard to host a domain for a friend and separate the accounts

Jim Little

Re: Emails & virtual domains
« Reply #1 on: February 25, 2003, 05:04:03 PM »
You should check out Darrell May's Virtual domain e-mail how-to:

http://www.myezserver.com/downloads/mitel/howto/vdomain-alias-howto.html

Jim

Dan Brown

Re: Emails & virtual domains
« Reply #2 on: February 25, 2003, 05:09:44 PM »
Yes, this is by design.  It's a bit of a pain if you want to use the system for hosting, but it's essential to the windows file server role.

sme server list

Re: Emails & virtual domains
« Reply #3 on: March 13, 2003, 09:49:12 PM »
Howdy,

I tried Darrell May's Howto instructions which are no longer on his site if you tried that URL posted in the earlier thread. His howto seems (a few users having mailer-daemon returned messages i'm still sorting out) to have worked for us (thanks Darrell!).

So i have a copy here (Thanks Google Cache! - http://216.239.57.100/search?q=cache:ocCuA3p683QC:www.myezserver.com/downloads/mitel/howto/vdomain-alias-howto.html+&hl=en&ie=UTF-8) for those of you who need it as well, as i have referred to it a few times already to fix some errors and edit the template.


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.
--------------------------------------------------------------------------------

Orville Carter


Orville Carter

Re: Emails & virtual domains
« Reply #5 on: March 15, 2003, 12:51:05 AM »
My only question - which SME server packages can be modified using this How-to?
http://mirror.contribs.org/smeserver/contribs/dmay/mitel/howto/vdomain-alias-howto.html

4.x?  5.x? 5.x.x? ALL?

OC

sme server list

Re: Emails & virtual domains
« Reply #6 on: March 24, 2003, 06:40:34 PM »
ok, i think i got it working for all users of the virtual domain.

my miss was that i did not do steps 3 & 4 for all users. and to make sure to put in the account username, not an alias or the persons real name, in the .qmail-default file.

how would one setup a virtual domain email configuration so that you would have a seperate pop account if the user didnt want their primary domain and virtual domain messages mixed together?

probably to just make a new user account and create a .qmail-default in there corresponding to the username and then add them to the aliases template in step 5 huh?

did i answer my own question? :D

Thanks.