Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 01 Sep 2000 13:49:36 -0400
From:      Jan Knepper <jan@smartsoft.cc>
To:        Andrew Houghton <aah@acm.org>
Cc:        freebsd-isp@FreeBSD.ORG
Subject:   Re: How can I create an elegant mail system for virtual domains?
Message-ID:  <39AFEC30.33D864CF@smartsoft.cc>
References:  <00a101c01437$47f77390$6b46ca3f@desire>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

A couple of months ago I run into the same problem and was helped a lot by
people on the list here.
Right now I have setup my HOST with about 20 virtual domains and am
unfortunately still waiting for the T1 connection.

However... I have the following services running:
1.    HTTP
2.    SMTP
3.    FTP

For HTTP I used Apache, just as it comes with FreeBSD. (Running 4.0 at this
moment). As you know, it's no problem to configure Apache for virtual domains.

For SMTP (e-mail) I looked at sendmail and was about to change it so it would
store e-mail for virtual domains in directories named after the domains when I
was adviced to look at postfix and qmail. I looked at postfix, but realized that
the problem there still is that the mail for john@john.com has to be redirected
to john@yourhost.ext. john@sue.com would be ether john@yourhost.com (if it is
the same john and the customer whats that, not very likely) or
john1@yourhost.com. Needless to say I didn't like this configuration and tried
qmail http://www.qmail.org/ instead. However, qmail itself does not solve the
problem, but when you add vpopmail from http://www.inter7.com/vpopmail you will
be able to handle e-mail for virtual domains seamlessly. I do right now and I am
very happy with how it works.

For FTP you will run into the same problem soner or later. Needless to say, the
list here helped me again and I changed to proftpd http://www.proftpd.net/

Right now I have a directory structure like:
~/virtualdomains/one.com
~/virtualdomains/two.com
~/virtualdomains/three.com

with underneath each domain directory the following directories:
~/etc
~/www
~/cgi

The Apache setup files reside in ~/apache the directory where Apache per default
puts the stuff. Of course the .conf files set the ~/www directories as document
root and the ~/cgi directories for CGI.

qmail resides in /var, but vpopmail is in ~/vpopmail with the several domains
under ~/vpopmail/domains as ~/vpopmail/domains/one.com
~/vpopmain/domains/two.com ~/vpopmail/three.com
If you want these directories accessable from the ~/virtualdomains directories I
guess there are two options:
1.    Move the directory from ~/vpopmail/domains/one.com to
~/virtualdomains/one.com/mail and create a symbolic link from
~/vpopmail/domains/one.com to ~/virtualdomains/one.com/mail. If you do this you
have to make sure that the vpopmail/qmail daemon can read and write in the
~/virtualdomains directories where the mail is being stored I guess.
2.    Just create a symbolic link from ~/virtualdomains/one.com/mail to
~/vpopmail/domains/one.com

If someone has a better solution let me know!

proftpd is so simple that just reading the docco will help you out there.
proftpd has a great option of keeping passwd and group files per virtual domain.
Something I really like. For that reason I have a ~/etc directory where I
simulate the idea of the real /etc directory.

Sorry for the long reply, but I have really found that a setup like this is
pretty structured (as I like to have things structured, and so is FreeBSD!)
There are quite a couple of utilities for qmail, check http://www.inter7.com/
that allow admin of the Email domains. I don't use any of those (yet) since the
number of domains I am hosting isn't that huge (yet).

HTH

Don't worry, be Kneppie!
Jan



Andrew Houghton wrote:

> Sorry to spam the list, but I feel like I'm banging my head against a brick
> wall here.. if anyone has any thoughts on the following, and can spare a few
> cycles, we can do this through email.  Just so you know, I'm running postfix
> as my MTA on a fairly recent 4.1-STABLE box.
>
> I want to set up a single box with multiple virtual domains, where each
> domain can be administered by the domain owner.  Say john owns john.com, and
> sue owns sue.com.  Their websites and email are being handled by my box.
> The directory structure looks like this:
>
> /virtualhosts/john.com
> /virtualhosts/sue.com
> /virtualhosts/....
>
> with each virtual host having a directory structure of:
>
> .../www
> .../mail
> .../ftp
> .../...
>
> John should be able to setup a certain number of mail id's, and access those
> id's via a POP or IMAP server in an intuitive way.  That means that if John
> has created ids for 'webmaster', 'info', and 'support', he should be able to
> 1) have any or all of those be forwarding addresses to some other mail
> account he has somewhere else, 2) have any of those be forwarding addresses
> to a different mail account on the local box, 3) have any or all of those
> store mail on the local box, and 4) access those by pointing his mail client
> at [pop|imap].john.com, and using a uid of 'webmaster', 'info', or 'support'
> to get the mail for those accounts.  Ideally, John should also be able to
> setup and control a certain number of mailing lists on his own.
>
> I'd like to store *all* user information in either an LDAP server or a local
> database .  That means the IMAP server, the POP server, the FTP server, and
> the MTA (in this case postfix) should be using the LDAP server or the
> database for all lookups - directory information, uid, password, etc. etc.
> etc.  Using PAM for some info is fine (I got the pam_ldap module working on
> my FreeBSD box, which makes me happy).
>
> I'd also like to use Maildir for mail rather than mailbox, so that users'
> mail gets counted towards their quota.
>
> ----
>
> Given all that, I feel I'm really close to having things work, but I'm
> massively confused about two things:
> 1) the best way to handle the changing state of a virtual host's mail
> system -- how do I deliver mail to a place within the virtual hosts mail
> directory, in a way that will make sense to whatever POP/IMAP server I end
> up using?
> 2) which of the myriad POP / IMAP servers will allow me to accomplish point
> 4, above -- webmaster@john.com is different from webmaster@sue.com, and
> nobody should *ever* have to use a compound uid (that is, no pointing your
> client at pop.john.com and using a uid of 'webmaster@john.com'.)
>
> This must have been done, somewhere.  All the various pieces for this are
> out there, but they don't seem to work with each other -- cyrus does a lot
> of what I want, and handles quotas itself, but I can't figure out how to
> make cyrus listen to particular interfaces and use the domain name
> intelligently.  solidpop3d does a lot of what I want, but requires external
> files to do the username mapping (as far as I can tell it won't use the LDAP
> server).  courier IMAP does a lot of what I want but doesn't provide the POP
> server.
>
> ----
>
> If someone has done this, please give me a yell and let me know.  If anyone
> has looked into this and decided that everything I detailed above can be
> done *except* some particular part, please let me know.  I'm looking for a
> streamlined, all-inclusive, administratively elegant email system, and I'm
> not sure it exists (without running out and buying a Mirapoint box which I'm
> sure is prohibitively priced for my needs).
>
> Thanks for your time,
>
> Andrew
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-isp" in the body of the message

--
Jan Knepper
Smartsoft, LLC
88 Petersburg Road
Petersburg, NJ 08270
U.S.A.

http://www.smartsoft.cc/

http://www.pianoprincess.com/
http://www.mp3.com/pianoprincess
http://www.riffage.com/Bands/0,2939,2859,00.html
http://pianoprincess.iuma.com/
http://www.changemusic.com/piano_princess

Phone : 609-628-4260
FAX   : 609-628-1267
FAX   : 303-845-6415 http://www.fax4free.com/

Phone : 020-873-3837 http://www.xoip.nl/ (Dutch)
FAX   : 020-873-3837 http://www.xoip.nl/ (Dutch)




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?39AFEC30.33D864CF>