PDA

View Full Version : Standard way of having multiple mail users with many virtual domains?


lazyant
08-10-2005, 05:59 PM
Hello,

As summary, I want to have two domains (one.com and two.com) with several independent mail accounts like sales@one.com , webmaster@one.com and sales@two.com, webmaster@two.com

I have the standard Rimu Red Hat and Postfix.

I have created the Linux users onecom and twocom and set up the virtual Apache hosting in their /home directories, following pretty much:
http://rimuhosting.com/howto/virtualhosting.jsp

I'm able to receive mail for the users onecom and twocom (onecom@one.com and twocom@twocom.com), and I can set up virtual domains in Postfix so that email directed at (for example) sales@one.com goes into the onecom box. I've followed more or less: http://rimuhosting.com/support/settingupemail.jsp?mta=postfix , altough the instructions are for just one domain.

My question is, how do I have separate users ("sales" and "webmaster") for the two domains? if I create the sales user in Linux, that's system-wide (for all domains) and if I use aliases or virtual domains in Postfix, messages end up in the same user box.

There is a standard way of doing this that I'm missing. I guess creating the Linux users like onecom_sales, twocome_sales and then mapping then in Postfix or the mail client.


Thanks.

lazyant
08-10-2005, 06:06 PM
I guess creating the Linux users like onecom_sales, twocome_sales and then mapping then in Postfix or the mail client.


OK, answering myself:

I'm reading http://www.postfix.org/VIRTUAL_README.html and it looks like the solution is to create the (nologin) Linux users onecome_sales, twocom_sales etc and then map then in /etc/postfix/virtual

I just want to make sure this is like the standard way for multiple virtual hosting

RedOut
08-10-2005, 06:21 PM
Read this thread:

http://forums.rimuhosting.com/forums/showthread.php?t=32

There's an excellent howto in the first post, and the rest of the thread will discuss some issues you might encounter.

This method makes it so you do not have to create linux users for each email account. You can setup as many as you want with just one linux user, and you can also set up aliases that forward mail to real mailboxes. Say sales@one.com and sales@two.com actually go to the same person, you can create a real user, joe@one.com and aliases for both sales accounts. Then you could use a filter in your mailreader to automatically move emails to either of these aliases to a specific folder.

All the user info is stored in a LDAP DB, which is much easier to maintain, and to move over if you have to change to another VPS. I was able to easily copy over my LDAP DB, and my Maildir files to a new VPS and had virtually no downtime when I switched to one of the new plans.

lazyant
08-10-2005, 06:39 PM
Thanks, but for now I want to learn a simple way of dealing with the requirement, that doesn't involve running Tomcat+Jamm and LDAP. I don't think (most) web hosting companies that do virtual hosting use that powerful scheme.

Having aliases is easy, what I need is independent mail boxes:

Company One.com
-----------------
sales@one.com <-> john smith
webmaster@one.com <-> mary lopez
ceo@one.com <-> rober palmer

Company Two.com
------------------
sales@two.com <-> Emily Stevens
susan@two.com <-> susan burke

thanks

RedOut
08-10-2005, 09:20 PM
You don't have to use Tomcat and Jamm to administer it. There's also Phamm which is a php based alternative if you think Tomcat is too heavy.

In my experience virtual mail hosting is not done by creating multiple unix accounts, anyone doing that on a large scale would have to be nuts. That's just a maintainence nightmare. It's done by having another system manage the logins, such as LDAP or MySQL.

It's about a 2-4 hour install, and well worth it IMO. You can set up as many individual mailboxes as you like.

retep
08-18-2005, 11:07 AM
lazyant: the /etc/postfix/virtual way will work. I think we mention that in our postfix howto FWIW.

outlook
08-18-2005, 01:45 PM
OK seems to work now with this information about dbx reader (http://www.oemailrecovery.com) and outlook express help (http://www.mail-repair.com)

lazyant
09-01-2005, 02:28 PM
The "problem" is solved. Basically there was no problem but rather I was researching the more or less standard procedures of the hosting industry.

I'm evaluating the control panel tools www.virtualmin.com and www.ispconfig.org (as oppose to say, cPanel), I'm learning how to automatize things not only on control panels but by hand (scripts), knowing how the procurement process works.