Thanks! I have underestimate the use of flat files and you have give
me useful tips. I have to refresh my perl programming - lately most
C and Python (and sh of course ...)


--bfrost
(fvp.se, fvp.eu, fvpideas.com)

P.S
I am not sure if this gets through to misc mailinglist - sending
from my mailserver.

On Sat, Dec 01, 2007 at 01:12:54PM +0000, Craig Skinner wrote:
> On Sat, Dec 01, 2007 at 12:07:54AM +0100, Bengt Frost wrote:
> > > >
> > > > Someone out there have any suggestions how use Postfix (and Dovecot)
> > > > with PostgreSQL?
> > > ...
> > Ok. Not quite sure I'm following you. You mean pull user data from 
> > PostgreSQL
> > and generate flat(db) user file for smtp-auth using 
> > p5-Authen-SASL-2.10p0 ...
> 
> Aye, using whatever you fancy, probably loads of modules on CPAN that
> will do most of what you want for your site. Perl is in base, so you
> wont run the risk of a broken port of ruby/python/whatever stopping you
> working after an upgrade.
> 
> Same for /etc/postfix/{aliases,canonical.map,virtual.map}
> 
> > 
> > > ... 
> > 
> > Then pull out 'other'  Postfix data maps via (f.ex) Perl script across 
> > my 'mail farm'.
> > Not sure yet how to do it - but I figure it out.
> 
> PostgreSQL is brilliant as you can have views of multiple tables, such
> as user id & passwd, then reference another accounts table with foriegn
> keys to see if payment is upto date, & how much they paid (disk quota).
> Then from this one view, just select * and dump that data into flat
> files, then push to your front line smtp, imap, webmail, shell... boxes.
> No fancy SQL in the scripts, let the DB do the work for you with views &
> stored procedures. (Your business logic is separate from the oily bits
> of service implementation)
> 
> Implement another service, such as web hosting accounts, then just write
> another SQL view, and another Perl script to config apache, etc, etc.
> 
> My basic point is this: you can go to a lot of bother to get some
> services to auth against SQL, then you want to bring up another service
> and there is no way of using SQL directly, so you write some scripts to
> generate flat files. Then you bring up another service,.... So why not
> just do it that way from the beginning? After all, the app was developed
> to use flat files, so as a mere user of an app, why fight against the
> developer?
> 
> > 
> > How about - using OpenLDAP? 
> 
> Same thing. Flat files are fast and reliable, and are basically the only
> way to give users shell access (mutt/pine) on OpenBSD as login wont auth
> against LDAP or SQL.
> 
> -- 
> Craig Skinner | http://www.kepax.co.uk | [EMAIL PROTECTED]

Reply via email to