Fedora Linux Support Community & Resources Center
  #1  
Old 22nd March 2005, 01:14 PM
maxblack Offline
Registered User
 
Join Date: Mar 2005
Posts: 6
mail server with MySQL virtual users?

I keep running into brick walls on this: why is it so difficult to set up a mail server without system accounts? My latest attempt has been with Postfix (recompiled with MySQL support) and the stock Fedora Dovecot, but SMTP authentication among other things have kept me debugging for days and I'm fed up.

More than going into tedious detail about any particular config, what I (and many many others) would really like to see is a simple RPM or SRPM combination of apps that would work almost out-of-the-box with MySQL and perhaps a web-based account manager (like Postfixadmin). One should almost expect this to be included in the default distribution of Fedora...!

Scenario: A box with hosted domains and the need for managing email addresses painlessly without messing with system accounts. SMTP authentication and quota control is a must.

It must be possible?

regards,
Max
Reply With Quote
  #2  
Old 22nd March 2005, 02:47 PM
nephila Offline
Registered User
 
Join Date: Feb 2005
Posts: 121
I know this is possible using qmail. If you are interested check out www.qmailrocks.org
Reply With Quote
  #3  
Old 22nd March 2005, 05:04 PM
maxblack Offline
Registered User
 
Join Date: Mar 2005
Posts: 6
Thanks Nephila, I had a look at that. Qmail seems to need all this:

Qmail + qmail patch with qmailqueue, smtp-auth and TLS smtp encryption + EZmlm + Autoresponder + Vpopmail + Vqadmin + Maildrop + Qmailadmin + Courier-imap/imap-ssl + Squirrelmail + Clam Antivirus + SpamAssassin + qmail-scanner + qms-analog + qmailanalog + q-trap

That's 17 new and different components and patches that have to be compiled and installed. Yes, there is a tutorial walkthrough but I simply got the shivers.

Maybe keeping on trying with Postfix+Dovecot+MySQL isn't such a bad idea after all ...there are lots of tutorials out there about one or another but never with the three together, or has anybody found one?
Reply With Quote
  #4  
Old 23rd March 2005, 08:28 AM
nephila Offline
Registered User
 
Join Date: Feb 2005
Posts: 121
Understandable, when I first started I got more than just the shivers, but working through that tutorial I had a mail system up and running within about two hours. It looks nasty but it is really simple if you follow the tutorial. For the record I no longer use qmail, am using postfix with dovecot but using system accounts not mysql. Keep at it!
Reply With Quote
  #5  
Old 5th April 2005, 09:56 PM
rae Offline
Registered User
 
Join Date: Dec 2004
Posts: 86
maxbalck,

I am attempting the same thing you are but wondering if the default install of postfix is already compiled with mysql support? If not, I was wondering if you compiled it from source or a source rpm?

rae
Reply With Quote
  #6  
Old 6th April 2005, 09:03 AM
maxblack Offline
Registered User
 
Join Date: Mar 2005
Posts: 6
Rae, my fc3 stock postfix rpm didn't come with MySQL support. I installed the Postfix src.rpm, modified the .spec file to include MySQL support and then did a rpmbuild. There are plenty of howtos out there on Google about how to do this.

BTW still searching for the Holy Grail but don't feel like wandering down the Qmail path now that I've learnt so much about Postfix. Switched to Postfix+Courier IMAP+MySQL following the http://high5.net/postfixadmin/ howto to the letter, and everything is working except for the SMTP Auth part since my compile of SASL2 absolutely refuses logins with LOGIN encrypted MySQL passwords. Unencrypted passwords (horror) works fine though.

When I have time I'll try pam-mysql authorization through saslauthd, it seems to be a common workaround. It's really insane that one has to go through all this to set up something that should be fairly standard...
Reply With Quote
  #7  
Old 8th April 2005, 01:04 AM
rae Offline
Registered User
 
Join Date: Dec 2004
Posts: 86
maxblack,
Instead of changing mail servers I opted for changing the db from MySQL to PostgreSQL. typed it in google and came up with this. http://www.tummy.com/Products/vpostmaster/ very nice and sleek and works apparently. You don't really need to configure anything. Its all done for you.
rae
Reply With Quote
  #8  
Old 8th April 2005, 08:34 AM
maxblack Offline
Registered User
 
Join Date: Mar 2005
Posts: 6
Thanks Rae, looks nice...it even installs with yum! Looks like I have to shell out $250 , since my server is commercial.

I'll try it out first on my home box...
Reply With Quote
  #9  
Old 8th April 2005, 09:49 PM
maxblack Offline
Registered User
 
Join Date: Mar 2005
Posts: 6
Got the shivers again...Vpostmaster is real easy to install and should work great, but there seems to be no back door to hack it to your needs, there's ONLY the web interface...

Went back to my original config (the one I had from http://high5.net/postfixadmin/ howto) but tried the pam-mysql way of doing smtp auth instead of the described sasl2 way, and after some debugging...it worked!

# rpm -Uvh pam_mysql-0.5-0.src.rpm
# rpmbuild -ba /usr/src/redhat/SPECS/pam_mysql.spec
# rpm -Uvh /usr/src/redhat/RPMS/i386/pam_mysql-0.5-0.i386.rpm
# rpm -Uvh /usr/src/redhat/RPMS/i386/pam_mysql-debuginfo-0.5-0.i386.rpm

file /etc/pam.d/smtp:
auth sufficient pam_mysql.so user=postfix passwd=YOURPASSWORDHERE host=localhost db=postfix table=mailbox usercolumn=username passwdcolumn=password crypt=1 sqlLog=0
account required pam_mysql.so user=postfix passwd=YOURPASSWORDHERE host=localhost db=postfix table=mailbox usercolumn=username passwdcolumn=password crypt=1 sqlLog=0

file /usr/lib/sasl2/smtpd.conf (using stock FC3 cyrus-sasl):
pwcheck_method: saslauthd
mech_list: PLAIN LOGIN

file /etc/sysconfig/saslauthd:
SOCKETDIR=/var/run/saslauthd
MECH=pam
FLAGS="-r"


Last edited by maxblack; 8th April 2005 at 09:53 PM. Reason: path error
Reply With Quote
  #10  
Old 2nd May 2005, 10:40 PM
jafo Offline
Registered User
 
Join Date: May 2005
Posts: 3
What sort of back-door?

Help me understand what you mean by a "back door". vPostMaster includes full source to the glue and management code, so that could be modified if necessary. vPostMaster is largely glue which consolidates a whole slew of existing tools such as Postfix, Squirrelmail, Dovecot, Spam Assassin. Therefore, if you want to tweek the settings of those tools, you can go in and make modifications to the setup to customize it to your exact needs.

I'm very interested in hearing more about what you wanted to do but thought you were unable to do with vPostMaster. One of the primary goals of vPostMaster is to be an easy to install and maintain mail system, which provides all the typical functionality required of today's mail servers. I plan to enhance it with extra spam prevention and other features, but an experienced user should be able to go in and make modifications to Postfix or Spam Assassin or ClamAV, for example, to further customize how it works beyond the base functionality provided. That's one of the benefits to our using existing tools instead of writing more of it from scratch.

Thanks,
Sean
Reply With Quote
  #11  
Old 3rd May 2005, 02:05 AM
jafo Offline
Registered User
 
Join Date: May 2005
Posts: 3
Why it's hard to do.

The short answer to why this is so difficult is just that there are a lot of little things to get right. The basic system, with just Postfix, Dovecot, and one of the databases really isn't that hard to get working. It would typically only take an hour or two for someone familair with the individual tools (but not familiar with the combination) to do. However, you probably want something a bit more full-featured than that. For example, you probably want some sort of control panel to automate creation and management of these virtual accounts. And you can't run a server on the Internet today without some level of anti-spam. Then you probably want webmail, and a user control panel so that users can manage their accounts. And SMTP AUTH relay authentication...

Pretty soon you're talking about something which can involve days of installation and setup. This is exactly why we built vPostMaster. It's a 5-minute install of exactly this consolidation of tools. We ask that people using it in a commercial environment help fund the development and maintenance of it, but we for trial and non-commercial use it's free.

So, yes, it is possible, and it's also easy, depending on the way you go.

Sean
Reply With Quote
  #12  
Old 3rd May 2005, 07:47 AM
maxblack Offline
Registered User
 
Join Date: Mar 2005
Posts: 6
Hi Sean,

Your email system should be great for anyone who needs exactly what you've created, and also for "real" full-time programmers who can analyze your source code or "glue" at a glance. I'm sorry if I picked on vPostmaster. What I wanted to say was that if one needs to hack source, people like me with a limited programming experience usually finds it more difficult to modify a finished control system than to roll his/her own simple one. I've had this situation while modifying web portal projects in PHP, for example: one has to first understand the underlying base systems, and then on top of that understand the control panel programmer's train of thought.

cheers,
Max
Reply With Quote
  #13  
Old 3rd May 2005, 06:20 PM
jafo Offline
Registered User
 
Join Date: May 2005
Posts: 3
Fair enough. On the other hand, of course, you did spend several days poking at the SMTP AUTH stuff, so maybe it wasn't such a big win. ;-) There's a lot you can do in vPostMaster without having to resort to hacking the vPostMaster code, because of the way it's designed. However, to be honest, there's not any documentation yet about the low-level of vPostMaster. I'll add that to the TODO list.

Thanks,
Sean
Reply With Quote
Reply

Tags
mail, mysql, server, users, virtual

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Fedora 10) j.smith1981 Servers & Networking 8 28th October 2009 12:35 PM
Mail Server with Virtual Host and Virtual Domains ssdude Servers & Networking 1 2nd May 2009 03:45 PM
Mail server - setup virtual mail boxes satimis Linux Chat 0 10th February 2007 05:00 PM
MySQL Virtual Domain/Users, PostfixAdmin, Postfix, Dovecot & SquirrelMail paul_mat Servers & Networking 0 20th May 2006 01:00 AM
Dovecot, Postfix, Mysql and Virtual Users trinimoses Using Fedora 0 3rd August 2005 09:39 PM


Current GMT-time: 06:42 (Saturday, 20-12-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
...Creek Side - Stockholm-Arlanda Airport (ARN) Travel Photos on Instagram - Marina of Koper Travel Photos - Te Whiti Park Instagram Photos - Texas State Fair Photos on Instagram