I'm trying to implement a Linux-based email server with a webmail
interface.
My platform is:
RedHat 8.0 using the included Apache and PHP
I have Qmail installed via Qinstall 1.1
http://obua.org/modules.php?name=Downloads&d_op=viewdownload&cid=1&min=10&orderby=titleA&show=10
It works perfectly for SMTP and POP.
I installed squirrelmail 1.2.10
http://www.squirrelmail.org/download.php
Squirrelmail works perfectly for only local users (that is, those that
are in the /etc/passwd database.)
The problem is that IMAP won't authenticate the virtual domains/users
created by vadduser/vadddomain. I always get the error unknown user.
I have to support about 1,000 virtual domains.
I need an antivirus solution
I would like a web-based management tool
Bonus: support for addressbook
Bonus: Mailboxes on NFS mount. |
Request for Question Clarification by
legolas-ga
on
03 Dec 2002 15:16 PST
Are you set on squirrelmail? vs. another solution that I find to be
better (that will give you address books, etc..)?
Legolas-ga
|
Clarification of Question by
pidgeonstool-ga
on
03 Dec 2002 15:21 PST
Not really, What attracted me was the fact that there is no MySQL,
which I know almost nothing about.
I want to keep it simple.
What do you have in mind?
|
Request for Question Clarification by
legolas-ga
on
03 Dec 2002 15:23 PST
Hi pidgeonstool-ga,
I am interested in answering your question, but I believe that, to
answer
it well, your question will require more time and effort than the
average
amount of time and effort associated with this price. Here is a link
to
guidelines about pricing your question,
https://answers.google.com/answers/pricing.html
If you both raise your price and also post a clarification here, the
system will notify me and I will take another look at your question.
For your information, Qmail is an EXCELLENT choice for the mail
server, however, after a quick look at what Qinstall does (and what it
sets up for you), and what you've expressed as your list of desires in
maintaining this mailserver, it will take substantially longer to
answer this question than the average amount of time normally
associated with a $50 question.
|
Request for Question Clarification by
legolas-ga
on
03 Dec 2002 15:29 PST
MySQL isn't a bad thing at all.. It quite easy to use: and is a
necessary part of at least one part of my solution.
For your information, I currently use Qmail and a few other programs
on my own linux server to host about 6 or so seperate domains with a
couple dozen users a piece. I can help you setup the webmail, address
book, virtual domains, and web-management tools (for adding/removing
users and changing passwords/.forwards,e tc..) as well as IMAP support
to allow virtual users on each of your virtual domains. Antivirus
support is always a big hit-and-miss and I've never tried to install
it, though I could provide some links for you. And, mailboxes on NFS
is a bad idea for many reasons.. Although, as long as you're using
qmail's maildir capability, it should be ok.. Though, probably be too
much work to be worth it.
Let me know.. This is quite the project to undertake: it's almost too
much work for the $200 max question price if I were to document each
step and configuration detail... But, depending on the level of
detail, we may be able to achieve your goal.
|
Clarification of Question by
pidgeonstool-ga
on
03 Dec 2002 15:50 PST
I think I can get most of the other configurations, I was kinda hoping
someone had duplicated my efforts and had a cute walk through. What
would be worth it to me would be just a clarification on how to
authenticate using imap. Squirrelmail doesn't seem to be able to
access the database (wherever that is)
Is that in your scope of expertise?
I *may* be convinced of a MySQL solution, but like I said, the fewer
moving parts the better. :)
|
Hi pidgeonstool,
I think a large chunk of your problem is the fact that you used that
Qinstall to install Qmail vs. installing it yourself. You MAY wish to
remove all the previous install and start from scratch. I have found
you some HOWTO's that explain the process of installing Qmail,
courier-imap and vmailmgr. You will also need to install MySQL (VERY
EASY to do - and this provides the address book functionality) and
Horde/IMP/Turba (webmail). You also need oMail and PHP for remote
administration.
Let me explain what each component does:
Qmail you know. It is the mail sender and receiver.
Courier-IMAP provides IMAP functionality tightly tied to vMailMgr. It
allows for virtual domain and virtual users to be authenticated --
without having a system account. It also provides for IMAP
functionality. I'd actually not bother with POP3 at all--there just
isn't any benefit over IMAP.
vMailMgr provides the framework that Courier IMAP uses to provide
virtual authentication and management. A great program that works well
with Qmail and Courier IMAP.
Horde/IMP/Turba - webmail components that provide remote access to
mailboxes, and address books. You can also add calendar functionality
and a few other tools. It is generally accepted to be one of the best
webmail programs around.
oMail provides the web-based administration of adding/removing users
to a domain and/or changing passwords, etc.. You can also set it up to
limit the number of accounts and/or quotas for each virtual user.
A HOWTO on setting up and configuring Qmail, vMailMgr and Courier-IMAP
can be found here:
http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/Qmail-VMailMgr-Courier-imap-HOWTO.html
Doing the install isn't the easiest thing in the world: but, it really
WILL work--and work well once finished. Make sure you read the docs
provided though!
You'll also need to install Horde and IMP. Horde is found at
http://www.horde.org
IMP and Turba et al are found under the 'Projects' link on the
horde.org site.
oMail can be found at the oMail-admin homepage:
http://omail.omnis.ch/
What you want to do is get Qmail, Courier-IMAP, vMailMgr and oMail up
and running first. Make sure you can connect and create accounts,
etc.. and be able to receive and send messages using a normal program
like Netscape Mail and/or Outlook Express.
Once you are satisified that all of that is working, install Horde and
IMP. There's a HOWTO on installing Horde and IMP that you can find
here:
http://www.geocities.com/oliversl/imp/
Basically, once this is all setup, what it will look like in your
filesystem will be something like this:
For abcd.com domain, you'll assign a user.. We'll say "abcd.com" :)
So...
/home/abcd.com/
will have a bunch of directories: one for each "user" of the domain.
i.e.
/home/abcd.com/users/person1
/home/abcd.com/users/person2
/home/abcd.com/users/person3
And, within each directory has all their mail and mail directories.
Therefore, if you have two domains, abcd.com and efgh.com both domains
can have the same username assigned--with no problems of addressing.
What I mean is that:
/home/abcd.com/users/person1
is different than
/home/efgh.com/users/person1
even though the "user" is called person1 in both cases.
That means, that the username isn't "person1" but, "person1@abcd.com"
or "person1@efgh.com". The fully-qualified name is the username. You
need to use this fully qualified name in horde, outlook, and netscape.
Basically, everywhere you need a "username", you need to use the full
name. So, the username and the e-mail address are the SAME things in
this setup.
MySQL is used by horde/IMP/Turba to store the user settings and the
address book for each user. MySQL is *very* easy to install from rpms.
The howto will explain how to configure it.
You may also be interested in obtaining a copy of webmin to make MySQL
administration less daunting. You can get webmin from:
http://www.webmin.com/
Also, don't worry that most of these howto's talk about RedHat 7.2 or
7.3 or even 6.x. It really doesn't make any difference. All will work
the same way.
Also, make sure that you do NOT install sendmail and/or procmail
and/or WU-IMAP, etc.. RedHat is particularly bad for ignoring the fact
that you have Qmail vs. Sendmail.. So, just be careful about using
up2date without some sanity filter being applied to ensure that
sendmail isn't "updated" and thereby wiping out your qmail install
(well, just your sendmail link to qmail-inject, but, hey, that's pain
enough :) )
This should give you all that you need to get what you want up and
running. If you hit any snags or snaffu's, ask for clarification prior
to rating and I will do what I can to help you out. Like I said, I use
this setup myself and it works VERY well.
Thanks again! and.. Enjoy your new mailserver!
Legolas-ga |
Clarification of Answer by
legolas-ga
on
03 Dec 2002 18:03 PST
I forgot to talk about antivirus.
There is a content scanner available for qmail at:
http://qmail-scanner.sourceforge.net/
"[The qmail Scanner] enables a Qmail Email server to scan all
gatewayed Email for certain characteristics (i.e. a content scanner).
It is typically used for its anti-virus protection functions, in which
case it is used in conjunction with commercial virus scanners."
On that site there is a list of antivirus scanners that are known to
work with qmail-scanner. You will also need to patch qmailqueue during
the qmail install process to allow the content scans. It is a
relatively painless process to patch qMail, and the directions on the
site are clear.
Look at Qmail-Scanner BEFORE you install qMail! It will make your life
a lot easier :)
Hope this helps. Again, please ask for clarification prior to rating
this answer if any part of it is unclear to you.
Thanks!
Legolas-ga
Search Terms:
antivirus qmail gpl
|
Clarification of Answer by
legolas-ga
on
03 Dec 2002 18:04 PST
One other small point.. Did I mention that qMail's maildir format,
when used in the way I've described will also allow NFS writes to a
maildir store?
So, with that, both bonus questions are answered too! :) Hope it
works for you.
Legolas-ga
|
Request for Answer Clarification by
pidgeonstool-ga
on
03 Dec 2002 21:47 PST
I agree, the qinstall may be part of the issue. I had already
frequented the offered links, and attempted the installation of
horde/IMP/MySQL. It just got me into a bit too deep water. That's
why I liked the squirrelmail--- apache, imap, PHP, qmail.
I have seen various hosting sites offering exactly that:
qmail/squirrelmail, I figured it must be a fairly standard procedure.
Getting back to my original posting: What do I need to do to get IMAP
to authenticate my virtual users?
|
Clarification of Answer by
legolas-ga
on
03 Dec 2002 22:09 PST
Once you get all the software installed as I've layed it out, IMAP
logins will authenticate based on the vMailMgr software and Courier
IMAP's support of it.
The HOWTO's show how to make things play nicely with each other. But,
vMailMgr is the one that will handle the user accounts and Courier
IMAP will look to vMailMgr for the userlists.
What I think may have happened is that you never REALLY installed an
IMAP server! I didn't see any reference to it in the Qinstall at any
rate. Courier IMAP is a IMAP4 server--that will give you the IMAP
login functionality that you want, and give you the ability to host
1000+ domains with diff. users on each without having to give shell
access to anyone. A very nice system actually.
Incidently, this is very similar to the system used by Hotmail for
years. Hotmail used Qmail for it's mail processing, and a variation on
courier imap/vmailmgr for its user authentication, etc..
Legolas-ga
|
Request for Answer Clarification by
pidgeonstool-ga
on
03 Dec 2002 23:02 PST
Here is the error thrown on the server:
Dec 2 11:05:06 dd imapd[1253]: Login failed user=dan@test.com
auth=dan@test.com host=station1.test.com [10.1.1.250]
I have the rpm that came with the distro:
imap-2001a-15
installed and started by xinetd
$ cat /etc/xinetd.d/imap
# default: off
# description: The IMAP service allows remote users to access their
mail using \
# an IMAP client such as Mutt, Pine, fetchmail, or
Netscape \
# Communicator.
service imap
{
socket_type = stream
wait = no
user = root
server = /usr/sbin/imapd
log_on_success += HOST DURATION
log_on_failure += HOST
disable = no
}
netstat -an yields:
tcp 0 0 0.0.0.0:143 0.0.0.0:*
LISTEN
From what I understand, it is a variant of Univ. of Wash. imap.
So it is going, but like I said, isn't aware of the vMailMgr database.
Maybe I should uninstall the RPM and compile courier from source?
If that is the case, what files are responsible for the communication
between the imapd and squirrel? what PHP files? php.ini? what .conf
files? is there an imapd.conf? what should the xinetd script look
like?
Thanks for your patience, I'm really trying to turn this into the
moste distilled question possible. I think that I'm very, very close,
I just need a couple pointers to the right files.
|
Clarification of Answer by
legolas-ga
on
03 Dec 2002 23:48 PST
You're not using Courier-IMAP :) That's WU-IMAP.. A very good IMAP
server for *certain* types of installations. In your case, it's
probably the worst you could use.
Remove that program, and sendmail, etc.. and follow the HOWTO's and
use the exact software (of course the versions could be different)
that it talks about.. i.e. Courier-IMAP.
Thanks!
Legolas-ga
|
Clarification of Answer by
legolas-ga
on
03 Dec 2002 23:54 PST
My understanding is that squirrel is more for POP mail that is then
deposited into the users home directory. None of your current solution
meets all your goals. The information I've provided meets every goal
you have. I know it's a lot of work down the drain, but, believe me
when I say that it is for the better to do this :)
By the way, I would hand-compile each program.. Don't rely on the
RPM's. I found them to be buggy at best, and horribly configured at
worst. I just didn't have much luck with them. Sorry, it will make it
slightly more challenging, but, it's worth it in stability. The
HowTo's do a good job of handholding through the process.
Legolas-ga
|
Request for Answer Clarification by
pidgeonstool-ga
on
07 Dec 2002 23:52 PST
Well,
I ended up doing a lot more work:
and compiled a walkthrough that takes about 2 hours from a formatted
hard drive
This is after I spent 3 weeks trying to figure it out :|
Here it is:
http://s.apc.net/ref/qmail/qmail_walkthrough/
Basically, what I wanted you to tell me was this:
Requirements for RedHat installation:
Applications/Internet:
openssl-perl
squirrelmail
Apache
PHP
Development/Languages
gcc
gcc-c++
python
Development/Libraries
gdbm-devel
libstdc++-devel
openssl-devel
Dependencies:
httpd
php
cpp
binutils
This is the line that lets courier-imap track changes in virtual
domains:
authmodulelist="authvchkpw"
This is the line I have to put in rc.local
/usr/lib/courier-imap/libexec/imapd.rc start
Then I tell squirrelmail to use courier for authentication.
all is outlined in the walkthrough.
I do use the qinstall, squirrelmail from the RPM works or can be
downloaded.
With the proper tools and gotchas, courier-imap will compile easily.
That means just a RedHat disk, qinstall, courier and I'm covered.
There is a rudimentary address book, that can be copied amongst all
users. Someday, I'd like to integrate it to a database, but I was in
a hurry to get the basics done.
What do you use for virus protection? have you any advice for that?
Any you have had problems or great experiences with?
And do you know if all the mail boxes are mounted through NFS will
there be issues?
|
Clarification of Answer by
legolas-ga
on
08 Dec 2002 00:21 PST
The link I gave for AV is the one that I think will work the best.
However, I don't run a server based AV program, so, I can't tell you
my experiences. But, from the site I gave...
There is a content scanner available for qmail at:
http://qmail-scanner.sourceforge.net/
"[The qmail Scanner] enables a Qmail Email server to scan all
gatewayed Email for certain characteristics (i.e. a content scanner).
It is typically used for its anti-virus protection functions, in which
case it is used in conjunction with commercial virus scanners."
This seems the most logical way of doing it.
As for NFS mounts and maildirs.. As long as your mail directories are
Maildir's and NOT mboxes or other such sillyness, it will work just
fine over NFS. Quick way to figure it out is if each directory in the
mail store has lots and lots of files named like:
1498549834593.54345.hostname:2, If that's what it looks like, then
you're good to go. If not, make the change to use MAILDIR's in the
qmail control files.
Hope that clarifies the remaining issues. Naturally, it isn't the
easiest setup in the world, but, it does work very well.. Just make
sure you're using Maildir's with courier-imap and vmailmgr to handle
the virtual accounts...
I'd still HIGHLY recommend that you don't use the install scripts or
squirrelmail, but instead use horde/imp, compile by hand and use MySQL
w/ horde/imp. That will give you the solution you want. Once you start
using the setup in a production environment, you will find it hard to
make the change. Doing it correctly now, will save a lot of time in
the long run.
Legolas-ga
|
Clarification of Answer by
legolas-ga
on
11 Dec 2002 09:20 PST
I'm glad you were able to solve your original problem of not being
able to use IMAP on client connections. I was glad I was able to
figure out that you did not have an IMAP server installed and pointed
you towards installing the IMAP server that you needed to allow you to
use IMAP.
The solution given, definately supports your original question and
meets all your requirements:
I have to support about 1,000 virtual domains. - This is done via. my
suggested vMailMgr and your use of vpopmail
I need an antivirus solution - This is done via. the link to
qmail-scanner I offered: however, you needed to compile qmail by hand
to use this. This is a limitation of qmail.
I would like a web-based management tool - qmailadmin provides this
functionality, as well as omail that I suggested.
Bonus: support for addressbook - provided by horde/imp/turba and by
your solution as well although not as robustly.
Bonus: Mailboxes on NFS mount. - this is provided by the Maildirs used
by qmail and courier IMAP.
Each of these has been dealt with in the answer provided.
Thanks again for your question.
Legolas-ga
|