Re: Play Nice - Real men don't attack straw men (Theo)

2007-12-16 Thread Bengt Frost
On Sat, Dec 15, 2007 at 11:56:43PM -0500, David H. Lynch Jr. wrote:
 Bengt Frost wrote:
  On Sat, Dec 15, 2007 at 12:31:25PM -0700, Darrin Chandler wrote:

 
  Finally as long as i do not hurt 'someone' (to mutch) then it must
  be up to me to choose what i want to do, f.ex. install packages through
  portssystem.

 If I wrote a a BSD Licensed program to mailbomb jews.
 Would that be acceptable within ports ?

 Either answer makes it clear that inclusion within ports
 expresses values.
 Including non-free software in ports makes a statement.
 Excluding it makes a different one.
  --bfrost
 
 Any intelligent fool can make things bigger and more complex... It takes a 
 touch of genius - and a lot of courage to move in the opposite direction.
 Albert Einstein

Albert Einstein - Technological progress is like an axe in the hands of
a pathological criminal.

--bfrost
(Bengt Frost)
http://www.fvp.se, http://www.fvpideas.com, http://www.fvpideas.eu



Re: Play Nice - Real men don't attack straw men (Theo)

2007-12-15 Thread Bengt Frost
On Sat, Dec 15, 2007 at 12:31:25PM -0700, Darrin Chandler wrote:
 On Sat, Dec 15, 2007 at 11:32:19AM -0700, Jack J. Woehr wrote:
  I do, too. I like them both. I want them to stop fighting in public. I don't
  care which one started it. I suppose it was Richard. It doesn't matter. Our
  reputations as human beings will long outlive our reputations as coders.
 
 Fighting in public is not nice. But sometimes nice takes a backseat to
 truth. Aside from any amusement value, I'm getting something real out of
 this thread: who sticks by their own principles and who doesn't is
 becoming clear to me.
 
 I judge people less by how much they agree with my own views than by how
 they adhere to their own. If I don't agree with someone but they stand
 by their principles then at least I know where they stand and that they
 have honor.
 
 So far, the rationale from rms is extremely murky at best, and
 *anything* less than *best* sounds outright hypocritical. So far, Theo's
 position is completely consistent. This is what I've taken away from
 this thread. This is important in both theory and practice. Theo is
 winning this on both ideological and pragmatic ground.
 
 -- 
 Darrin Chandler|  Phoenix BSD User Group  |  MetaBUG
 [EMAIL PROTECTED]   |  http://phxbug.org/  |  http://metabug.org/
 http://www.stilyagin.com/  |  Daemons in the Desert   |  Global BUG Federation

Writing this mail from my Debian/GNU(?) desktop and sending it through my free 
OpenBSD firewall/server etc ... Following this thread with great interest and 
find 
it very claryfing on licensing issues. 

I admire Richard Stallman for making people aware of free GNU software as a 
alternative 
to M$ and other propriary -closed-software vendors. Thanks Richard Stallman! 
 
But must admit that after following this thread mr Stallman's arguments
seems __contradictory__. He says f.ex. it's 'ok' to use gcc and emacs ... on
propriary system, but it's not 'ok' to give to the user - if she or he
__wants__ to - the possibility to install propr*** sofware through the *BSD
portssystem(sep. install).

Finally as long as i do not hurt 'someone' (to mutch) then it must
be up to me to choose what i want to do, f.ex. install packages through
portssystem.

--bfrost
(Bengt Frost)
http://www.fvp.se, http://www.fvpideas.com, http://www.fvpideas.eu



Re: Postfix(chroot) and Postgresql

2007-12-01 Thread Bengt Frost
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 +, 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]



Re: Postfix(chroot) and Postgresql

2007-11-30 Thread Bengt Frost

Thanks,

Not sure if this mail is showing in correct thread - lost your mail att 
google server.


On Fri, Nov 30, 2007 at 10:15:29PM +, Craig Skinner wrote:
 On Fri, Nov 30, 2007 at 10:33:04PM +0100, Bengt Frost wrote:
 
  Someone out there have any suggestions how use Postfix (and Dovecot)
  with PostgreSQL?

 Pull the user data from PostgreSQL and generate the files:
 /etc/sasldb2.db (copy to /var/spool/postfix/etc  postfix reload)
 /etc/cram-md5.pwd

 e.g: have a cron driven perl script check for changes to the user tables
 in the last 15 mins  if so, then generate new files. Stops PostgreSQL
 becoming a bottleneck when under high load (a spam attack).

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 ...


 As your site grows, you can punt the flat files out across your mail
 farm from your central db/admin box, use rdist or something similar.

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.

How about - using OpenLDAP? 


Thanks

--bfrost



Re: Postfix(chroot) and Postgresql

2007-11-30 Thread Bengt Frost

Ok,

Efficiency can sometimes be important. Had no idea about this solution - 
have to figure out how to do

it. Thanks!

Is OpenLDAP something to consider.

--bfrost

Genadijus Paleckis wrote:
Instead of that I would recommend you to use DB files generated at 
regular intervals instead of 'online' access to postgresql. It is less 
CPU expensive and much faster.
But if you wish to use SQL maps I guess you may want to use 127.0.0.1 
instead of local socket and of course you need to configure postgresql 
to accept network access.   *Addition* to above: In pg_hba.conf 
(PosgreSQL):




Re: Postfix(chroot) and Postgresql

2007-11-30 Thread Bengt Frost

*Addition* to above: In pg_hba.conf (PosgreSQL):
vmail(user)  access to datab with md5 password
local(and host)

--bfrost

Bengt Frost wrote:

Hi,

I am trying to use PostgreSQL as a backend for my Postfix virtual mail 
system and dovecot(psql) for smtp-auth.
'Postfix' is chrooted - most of it - and with MySQL socket there is no 
problem to auth users and use Postfix
transport_maps and virtual_*_maps. I have problem with postgresql 
socket(.s.PGSQL.5432). Neither
dovecot(auth) or Postfix(processes) can connect to PostgreSQL. I have 
tried to google, read OpenBSD misc and
ports maillinglists with no success. Here is some files with related 
'stuff':


### rc - system
/etc/rc.local:
# Postfix - PostgreSQL
if [ -x /usr/local/bin/pg_ctl ]; then
   echo -n ' postgresql'
   su -l _postgresql -c nohup /usr/local/bin/pg_ctl start \
   -D /var/postgresql/data -l /var/postgresql/logfile \
   -o '-D /var/postgresql/data' /dev/null
   su -l _postgresql -c ln -s /var/spool/postfix/tmp/.s.PGSQL.5432 /tmp
   su -l _postgresql -c ln -s 
/var/spool/postfix/tmp/.s.PGSQL.5432.lock /tmp

fi

/etc/rc.shutdown:
# Posfix - PostgreSQL
if [ -f /var/postgresql/data/postmaster.pid ]; then
su -l _postgresql -c /usr/local/bin/pg_ctl stop -m fast \
   -D /var/postgresql/data
   rm -f /var/postgresql/data/postmaster.pid \
 /var/spool/postfix/tmp/.s.PGSQL.5432 \
 /var/spool/postfix/tmp/.s.PGSQL.5432.lock \
 /tmp/.s.PGSQL.5432 \
 /tmp/.s.PGSQL.5432.lock
fi

### Dovecot:
/etc/dovecot.conf:
 passdb sql {
   args = /etc/dovecot-pgsql.conf
 }
...
userdb sql {
   args = /etc/dovecot-pgsql.conf
... socket listen {
   client {
   path = /var/spool/postfix/private/auth
   mode = 0660
   user = _postfix
   group = _postfix
   }
/etc/dovecot-pgsql:
# Currently supported schemes include PLAIN, PLAIN-MD5, DIGEST-MD5, 
and CRYPT.

default_pass_scheme = CRYPT  # also above schemes

# Database options
# UNIX socket - see host
connect = host=/tmp/.s.PGSQL.5432 dbname= user=vmail password=x

### Postfix - referensed from main.conf(pgsql: - no proxymap used):
/etc/postfix/pgsql_transport:
# UNIX socket - PostgreSQL - relative path(chroot)
hosts = unix:/tmp/.s.PGSQL.5432
# inet: for TCP connections (default)
#hosts = localhost
##hosts = 127.0.0.1

### PostgreSQL
/var/postgresql/postgresql.conf:
unix_socket_directory = '/var/spool/postfix/tmp'
# tmp directory in Postfix root : rwxrwxr-t permission and 'owned' 
by   _postfix  _postgresql


Someone out there have any suggestions how use Postfix (and Dovecot) 
with PostgreSQL?

Thanks!

--bfrost




Postfix(chroot) and Postgresql

2007-11-30 Thread Bengt Frost

Hi,

I am trying to use PostgreSQL as a backend for my Postfix virtual mail 
system and dovecot(psql) for smtp-auth.
'Postfix' is chrooted - most of it - and with MySQL socket there is no 
problem to auth users and use Postfix
transport_maps and virtual_*_maps. I have problem with postgresql 
socket(.s.PGSQL.5432). Neither
dovecot(auth) or Postfix(processes) can connect to PostgreSQL. I have 
tried to google, read OpenBSD misc and
ports maillinglists with no success. Here is some files with related 
'stuff':


### rc - system
/etc/rc.local:
# Postfix - PostgreSQL
if [ -x /usr/local/bin/pg_ctl ]; then
   echo -n ' postgresql'
   su -l _postgresql -c nohup /usr/local/bin/pg_ctl start \
   -D /var/postgresql/data -l /var/postgresql/logfile \
   -o '-D /var/postgresql/data' /dev/null
   su -l _postgresql -c ln -s /var/spool/postfix/tmp/.s.PGSQL.5432 /tmp
   su -l _postgresql -c ln -s 
/var/spool/postfix/tmp/.s.PGSQL.5432.lock /tmp

fi

/etc/rc.shutdown:
# Posfix - PostgreSQL
if [ -f /var/postgresql/data/postmaster.pid ]; then
su -l _postgresql -c /usr/local/bin/pg_ctl stop -m fast \
   -D /var/postgresql/data
   rm -f /var/postgresql/data/postmaster.pid \
 /var/spool/postfix/tmp/.s.PGSQL.5432 \
 /var/spool/postfix/tmp/.s.PGSQL.5432.lock \
 /tmp/.s.PGSQL.5432 \
 /tmp/.s.PGSQL.5432.lock
fi

### Dovecot:
/etc/dovecot.conf:
 passdb sql {
   args = /etc/dovecot-pgsql.conf
 }
...
userdb sql {
   args = /etc/dovecot-pgsql.conf
... 
socket listen {

   client {
   path = /var/spool/postfix/private/auth
   mode = 0660
   user = _postfix
   group = _postfix
   }
/etc/dovecot-pgsql:
# Currently supported schemes include PLAIN, PLAIN-MD5, DIGEST-MD5, and 
CRYPT.

default_pass_scheme = CRYPT  # also above schemes

# Database options
# UNIX socket - see host
connect = host=/tmp/.s.PGSQL.5432 dbname= user=vmail password=x

### Postfix - referensed from main.conf(pgsql: - no proxymap used):
/etc/postfix/pgsql_transport:
# UNIX socket - PostgreSQL - relative path(chroot)
hosts = unix:/tmp/.s.PGSQL.5432
# inet: for TCP connections (default)
#hosts = localhost
##hosts = 127.0.0.1

### PostgreSQL
/var/postgresql/postgresql.conf:
unix_socket_directory = '/var/spool/postfix/tmp'
# tmp directory in Postfix root : rwxrwxr-t permission and 'owned' by   
_postfix  _postgresql


Someone out there have any suggestions how use Postfix (and Dovecot) 
with PostgreSQL?

Thanks!

--bfrost