Re: DB files across machines

2009-11-12 Thread Ralf Hildebrandt
* Gaby Vanhegan g...@vanhegan.net:

 Is there a portable way to share postmapped file across machines?

Yes:

1) share the text files, then use a Makefile to convert them on the
   target systems

2) Use compatible BerkeleyDB versions

3) Don't use BerkeleyDB, use CDB

-- 
Ralf Hildebrandt
  Geschäftsbereich IT | Abteilung Netzwerk
  Charité - Universitätsmedizin Berlin
  Campus Benjamin Franklin
  Hindenburgdamm 30 | D-12203 Berlin
  Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
  ralf.hildebra...@charite.de | http://www.charite.de



Re: DB files across machines

2009-11-12 Thread Gaby Vanhegan


On 12 Nov 2009, at 14:17, lst_ho...@kwsoft.de wrote:

I get the same error if I try to read the contents of the .db file  
using postmap directly.  Is there going to be some architectural  
difference between the two systems?  Is there a more cross-platform  
file format I could use for the databases?


The BerkeleyDB used for hash and btree are known for their always  
changing file format so don't copy db files from one machine to the  
other. Either use a network database like LDAP,MySQL,PostgreSQL or  
stick with plain text and build them on the machine in question. You  
*may* get around with using cdb but don't take it for granted.



I was under the impression that there was a performance penalty using  
CDB with Postfix?


--
Expounding the theory of infinite Abelian Badgers
http://playr.co.uk/



Re: DB files across machines

2009-11-12 Thread Gaby Vanhegan


On 12 Nov 2009, at 14:14, Ralf Hildebrandt wrote:


* Gaby Vanhegan g...@vanhegan.net:


Is there a portable way to share postmapped file across machines?


Yes:

1) share the text files, then use a Makefile to convert them on the
  target systems


I already do this, I wanted to take this step out.


2) Use compatible BerkeleyDB versions


I'm restricted to what packages are available for the target platform  
so I can never guarantee this.



3) Don't use BerkeleyDB, use CDB



I guess I was just misleading myself with respect to CDB and  
performance:


http://www.postfix.org/CDB_README.html

Thanks,

Gaby.

--
Imagine there were no hypothetical situations.
http://playr.co.uk/



Re: DB files across machines

2009-11-12 Thread Ralf Hildebrandt
* Gaby Vanhegan g...@vanhegan.net:

 I was under the impression that there was a performance penalty using
 CDB with Postfix?

A negative penalty, yes

-- 
Ralf Hildebrandt
  Geschäftsbereich IT | Abteilung Netzwerk
  Charité - Universitätsmedizin Berlin
  Campus Benjamin Franklin
  Hindenburgdamm 30 | D-12203 Berlin
  Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
  ralf.hildebra...@charite.de | http://www.charite.de



Re: DB files across machines

2009-11-12 Thread Ralf Hildebrandt
* Gaby Vanhegan g...@vanhegan.net:

 I guess I was just misleading myself with respect to CDB and
 performance:
 
   http://www.postfix.org/CDB_README.html

I've been using it for years, no problems...

-- 
Ralf Hildebrandt
  Geschäftsbereich IT | Abteilung Netzwerk
  Charité - Universitätsmedizin Berlin
  Campus Benjamin Franklin
  Hindenburgdamm 30 | D-12203 Berlin
  Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
  ralf.hildebra...@charite.de | http://www.charite.de



Re: DB files across machines

2009-11-12 Thread Ansgar Wiechers
On 2009-11-12 Gaby Vanhegan wrote:
 Is there a portable way to share postmapped file across machines?

 I have one postfix server running OpenBSD and another running CentOS, I 
 want the CentOS server to provide secondary services for for the BSD box.  
 The OpenBSD box uses virtual delivery:

 /etc/postfix/main.cf:(BSD box)
 ...
 # What are the domains that we handle mail for?
 virtual_alias_domains = hash:/etc/postfix/virtual_domains
 virtual_alias_maps = hash:/etc/postfix/virtual
   
 The two plain text versions of those files are copied over to the CentOS 
 server and renamed so they act as a relay reference:

 /etc/postfix.main.cf (CentOS box)
 ...
 # Relay for ourselves and other hosts
 relay_domains = $mydestination, hash:/etc/postfix/relay_domains
 relay_recipient_maps = hash:/etc/postfix/relay_recipients

 My setup currently copies the plain text versions and creates a flag  
 file.  A cron job then looks for the flag file and postmaps the files if 
 needed.

Use incron instead of cron.

Regards
Ansgar Wiechers
-- 
All vulnerabilities deserve a public fear period prior to patches
becoming available.
--Jason Coombs on Bugtraq