Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've hit a problem when trying to install Sympa on an Ubuntu Hardy server.

The problem seems related with the associated PostreSQL database.

Steps I followed:

1) Installed PostreSQL.

sudo apt-get install postgresql postgresql-client postgresql-contrib libpq-dev

2) Updated PostgreSQL's administrator passwords. PostgreSQL creates two accounts for its "administrator". One is a "database account" (for logging in to postgresql itself) and another is a "linux account" (for creating files on the server, I guess). I reset the password of the database account like this:

sudo su postgres -c psql
ALTER USER postgres WITH PASSWORD 'password';
\q

And then reset the "linux account" password the usual way:

sudo passwd -d postgres
sudo su postgres -c passwd

3) Enabled password access on PostgreSQL. By default PostgreSQL only lets you log in with your linux name. So if you are logged in on linux as the user "tim", it only lets you enter the database as "tim". We want to change this so it asks you for a username and password, so you can log in as other people.

sudo nano /etc/postgresql/8.3/main/pg_hba.conf

On that file I updated the following lines:

#local all all ident sameuser
local all all md5
#host all all 127.0.0.1/32 ident sameuser
host all all 127.0.0.1/32 md5
#host all all ::1/128 ident sameuser
host all all ::1/128 md5

4) Now it was time to install sympa. I just did this:

sudo apt-get install sympa

5) I was prompted to install lots of perl packages. I accepted the suggestions.

6) Then a dialog appeared and I answered 3 questions:

  • What type of Database will you be using? PostgreSQL
  • What is the hostname where your database is running? localhost
  • What is the sympa user password? entered a password (twice)
  • What is the db admin password? entered the password used on step 2)

At this point the installation shows the following messages:

/etc/sympa/sympa.conf file has been created
/etc/sympa/wwsympa.conf file has been created
 * Reloading system log daemon...         [ OK ] 
Upgrade::probe_db() Table user_table not found in database sympa
Upgrade::probe_db() Table subscriber_table not found in database sympa
Upgrade::probe_db() Table admin_table not found in database sympa
DBD::Pg::db do failed: ERROR:  permission denied to create database
Upgrade::probe_db() Failed to run script '/usr/lib/sympa/bin/create_db.Pg' : ERROR:  permission denied to create database

DBD::Pg::st execute failed: ERROR:  relation "user_table" does not exist
List::get_user_db() Unable to execute SQL statement "SELECT email_user AS email, gecos_user AS gecos, password_user AS password, cookie_delay_user AS cookie_delay, lang_user AS lang , attributes_user AS attributes FROM user_table WHERE email_user = 'listmaster@testohwr.org' " : ERROR:  relation "user_table" does not exist

Language::SetLang() Language::SetLang(), missing locale parameter
Database sympa defined in sympa.conf has not the right structure or is unreachable. If you don't use any database, comment db_xxx parameters in sympa.conf
Sympa failed to prepare database.
dpkg: error processing sympa (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 sympa
E: Sub-process /usr/bin/dpkg returned an error code (1)

The sympa database and user are, however, created on the database - I see them if I do:

sudo su postgres -c psql
/du  (list of users contains sympa)
/l   (list of databases contains sympa)

It looks as if the sympa installer isn't able to connect to posgre, and thus it doesn't find the tables it needs... and then reinterprets this as a "database missing" error.

I don't know how to trace this error. Any pointers would be appreciated.

share|improve this question

3 Answers 3

Try without resetting the psql database user's password.

According to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=440109#27, this fixes the problem.

share|improve this answer
    
I grew tired of this issue and just installed mySQL - I had no issues installing it then. Thanks for your comment anyway. –  egarcia Jan 19 '10 at 10:06

Sympa works quite nicely with PostgreSQL (tested both on 5.3 and 6.1). It only has some problems in Upgrade.pm module where it is checking for tables existence because PostgreSQL (its Perl module, more precisely) is returning table names with schema as a prefix and because of this table name comparison fails. I have submitted a bug for this with a patch.

share|improve this answer
    
And I am also using it with Postfix and no code changes were necessary for that. –  Mitar Jan 28 '11 at 12:36
up vote -1 down vote accepted

Sympa is only fully supported with MySQL and Sendmail (at least the version in the Hardy repositories is).

Trying to install it with other configuration (i.e. PosgreSQL + PostFix) you are more or less on your own ... be prepared to modify perl files and (possibly) recompile it at some point.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.