[imp] imp2turba & postgres

Adam Williams adam@morrison-ind.com
Mon, 22 Jul 2002 13:38:51 -0400 (EDT)


  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

---------------------- multipart/mixed attachment
>Here we have imp 2.2 in production and imp 3.1 in test at the same server. We
>use Debian 2.2, Apache 1.3.26, PHP 4.1.2, Postgres 7.2.1, uw-imap 4.7c, Perl
>5.6.1.
>IMP 3.1 is running ok, now I'm trying to run imp2turba script to
>migrate the address book to the new IMP. Have installed CPAN modules
>'DBI', 'Pg' and 'DBD::Pg', but when I try to run the script, I get the
>following message:
>DBI->connect(imp22:localhost:5432) failed: missing "="
>after "imp22:localhost:5432" in connection info string at ./imp2turba.pl line
>43

Ick, perl.  I've got a PHP script to translate the address books.

---------------------- multipart/mixed attachment
PD9QSFANCg0KIyBEYXRhYmFzZSBjb25uZWN0aXZpdHkgaW5mb3JtYXRpb24N
Cg0KJElNUF9EQk5BTUUgPSAiaW1wIjsNCiRJTVBfVVNFUiAgID0gIm5vYm9k
eSI7DQokSU1QX0hPU1QgICA9ICJrb2hvY3RvbiI7DQokSU1QX1BPUlQgICA9
ICI1NDMyIjsNCg0KJFRVUkJBX0RCTkFNRSA9ICJ0dXJiYSI7DQokVFVSQkFf
VVNFUiAgID0gIm5vYm9keSI7DQokVFVSQkFfSE9TVCAgID0gImtvaG9jdG9u
IjsNCiRUVVJCQV9QT1JUICAgPSAiNTQzMiI7DQoNCiRUVVJCQV9VU0VSX1NV
RkZJWCA9ICJAaW50cmFuZXQiOw0KDQojDQojIEluaXRpYWxpemUgdGhlIHJh
bmRvbSBudW1iZXIgZ2VuZXJhdG9yDQojDQpsaXN0KCR1c2VjLCRzZWMpPWV4
cGxvZGUoIiAiLG1pY3JvdGltZSgpKTsNCm10X3NyYW5kKCRzZWMgKiAkdXNl
Yyk7DQp1bnNldCgkc2VjKTsNCnVuc2V0KCR1c2VjKTsNCg0KIw0KI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GdfZnJlZXJl
c3VsdCgkcmVzdWx0KTsNCnBnX2Nsb3NlKCRpbXBfY29ubik7DQoNCiMNCiMg
IFN5bmMgYWRkcmVzcyBhcnJheSB3aXRoIFR1cmJhIGRhdGFiYXNlDQojDQoN
CiR0dXJiYV9jb25uID0gcGdfY29ubmVjdCgiZGJuYW1lPSRUVVJCQV9EQk5B
TUUNCiAgICAgICAgICAgICAgICAgICAgICAgICAgdXNlcj0kVFVSQkFfVVNF
Ug0KICAgICAgICAgICAgICAgICAgICAgICAgICBob3N0PSRUVVJCQV9IT1NU
DQogICAgICAgICAgICAgICAgICAgICAgICAgIHBvcnQ9JFRVUkJBX1BPUlQi
KTsNCg0KZm9yICgkaSA9IDA7ICRpIDwgJGFkZHJlc3NbImNvdW50Il07ICRp
KyspIHsNCiAgcHJpbnRmKCJQUk9DRVNTSU5HOiB1c2VybmFtZT0lcyBhZGRy
ZXNzPSVzXG4iLA0KICAgICRhZGRyZXNzWyRpXVsidXNlcm5hbWUiXSwNCiAg
ICAkYWRkcmVzc1skaV1bImFkZHJlc3MiXSk7DQogICRyZXN1bHQgPSBwZ19l
eGVjKCR0dXJiYV9jb25uLCBzcHJpbnRmKCJzZWxlY3Qgb3duZXJfaWQNCiAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJv
bSB0dXJiYV9vYmplY3RzDQogICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgIHdoZXJlIG93bmVyX2lkID0gJyVzJyANCiAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYW5kIG9i
amVjdF9lbWFpbCA9ICclcyc7IiwNCiAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgJGFkZHJlc3NbJGldWyJ1c2VybmFtZSJdLA0KICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkYWRkcmVzc1skaV1bImFk
ZHJlc3MiXSkpOw0KICBpZiAocGdfbnVtcm93cygkcmVzdWx0KSkgew0KICAg
IHBnX2ZyZWVyZXN1bHQoJHJlc3VsdCk7DQogICAgcHJpbnRmKCJcdCBSZWNv
cmQgZXhpc3RzLCBza2lwcGluZy5cbiIpOw0KICAgfSBlbHNlIHsNCiAgICAg
ICBwZ19mcmVlcmVzdWx0KCRyZXN1bHQpOw0KICAgICAgIHByaW50ZigiXHIg
TmV3IHJlY29yZCwgaW5zZXJ0aW5nOiIpOw0KICAgICAgICR0dXJiYV9rZXkg
PSBnZW5lcmF0ZV90dXJiYV9rZXkoKTsgDQogICAgICAgJHJlc3VsdCA9IHBn
X2V4ZWMoJHR1cmJhX2Nvbm4sIHNwcmludGYoImluc2VydCBpbnRvIHR1cmJh
X29iamVjdHMNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAob2JqZWN0X2lkLCBvd25lcl9pZCwgb2JqZWN0X2Vt
YWlsLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICBvYmplY3RfbmFtZSwgb2JqZWN0X2FsaWFzKQ0KICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFs
dWVzICgnJXMnLCAnJXMnLCAnJXMnLA0KICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnJXMnLCAnJXMn
KTsiLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICR0dXJiYV9rZXksDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgJGFkZHJlc3NbJGldWyJ1c2VybmFtZSJdLA0KICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRhZGRyZXNzWyRpXVsi
YWRkcmVzcyJdLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICRhZGRyZXNzWyRpXVsiZnVsbG5hbWUiXSwNCiAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkYWRkcmVzc1skaV1bIm5p
Y2tuYW1lIl0pKTsNCiAgICAgICBpZiAoJHJlc3VsdCkgew0KICAgICAgICAg
cHJpbnRmKCJTdWNjZXNzIChLZXk6ICVzKVxuIiwgJHR1cmJhX2tleSk7DQog
ICAgICAgIH0gZWxzZSB7DQogICAgICAgICAgICBwcmludGYoIkZhaWxlZCAo
S2V5OiAlcylcbiIsICR0dXJiYV9rZXkpOw0KICAgICAgICAgICB9DQogICAg
ICAgcGdfZnJlZXJlc3VsdCgkcmVzdWx0KTsNCiAgICAgIH0NCiB9DQoNCnBn
X2Nsb3NlKCR0dXJiYV9jb25uKTsNCg==
---------------------- multipart/mixed attachment--