PDA

View Full Version : squirrelmail fails to start


satimis
22nd November 2008, 10:51
Hi folks,


Postfix
squirrelmail
mysql
amavis


On login;
Preference database error (connect failed). Exiting abnormally


login - satimis@satimis.com
password - mypassword


Both of them are correct.


# tail /var/log/mail.log
Nov 22 08:46:03 xen05 imapd-ssl: LOGIN: ip=[::ffff:127.0.0.1], command=LOGIN
Nov 22 08:46:03 xen05 imapd-ssl: LOGIN: ip=[::ffff:127.0.0.1], username=satimis@satimis.com
Nov 22 08:46:03 xen05 imapd-ssl: LOGIN: ip=[::ffff:127.0.0.1], password=mypassword
Nov 22 08:46:03 xen05 authdaemond: received auth request, service=imap, authtype=login
Nov 22 08:46:03 xen05 authdaemond: authmysql: trying this module
Nov 22 08:46:03 xen05 authdaemond: SQL query: SELECT id, "", clear, uid, gid, home, concat(home,'/',maildir), "", name, "" FROM users WHERE id = "satimis@satimis.com" AND (enabled=1)
Nov 22 08:46:03 xen05 authdaemond: authmysql: sysusername=<null>, sysuserid=5000, sysgroupid=5000, homedir=/var/spool/mail/virtual, address=satimis@satimis.com, fullname=Stephen, maildir=/var/spool/mail/virtual/Stephen/, quota=<null>, options=<null>
Nov 22 08:46:03 xen05 authdaemond: Authenticated: sysusername=<null>, sysuserid=5000, sysgroupid=5000, homedir=/var/spool/mail/virtual, address=satimis@satimis.com, fullname=Stephen, maildir=/var/spool/mail/virtual/Stephen/, quota=<null>, options=<null>
Nov 22 08:46:03 xen05 imapd-ssl: LOGIN, user=satimis@satimis.com, ip=[::ffff:127.0.0.1], protocol=IMAP
Nov 22 08:46:03 xen05 imapd-ssl: LOGOUT, user=satimis@satimis.com, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=46, sent=376, time=0, sta


No warning there.


# cat /etc/amavis/conf.d/50-user
use strict;

@lookup_sql_dsn = (
['DBI:mysql:database=maildb;host=127.0.0.1;port=330 6',
'mail',
'mailpassword']);

$sql_select_policy = 'SELECT name FROM virtual_domains WHERE CONCAT("@",name) IN (%k)';

#------------ Do not modify anything below this line -------------
1; # insure a defined return

$mydomain= 'satimis.com';
$daemon_user= 'virtual';
$daemon_group= 'virtual';
@local_domains_acl = qw(.);
$inet_socket_port = 10024;
$forward_method = 'smtp:127.0.0.1:10025';
# @bypass_virus_checks_acl = qw( . );
# @bypass_spam_checks_acl = qw( . );

# I also change these
$TEMPBASE = "$MYHOME/tmp";
# Whilst debugging
$log_level = 2;
$warnbannedrecip = 1;
$warn_offsite = 1;
$warnvirusrecip = 1;
$spam_quarantine_to = "spam-quarantine\@$mydomain";
$virus_quarantine_to = "virus-quarantine\@$mydomain";
$sa_local_tests_only = 0;



Please help. TIA


B.R.
satimis

falko
23rd November 2008, 14:25
How did you set up the system? Did you use a tutorial from here?

Which distribution are you using?

satimis
23rd November 2008, 16:48
How did you set up the system? Did you use a tutorial from here?

Which distribution are you using?
Hi falko,


I was following;

http://flurdy.com/docs/postfix/index.html#conf_web

in combination with;
http://workaround.org/articles/ispmail-etch/

Plus heavy search on Internet building this mail server serving multiple domains, virtual domain.


SquirrelMail version 1.4.9a


Problem solved. Solution is still a mystery to me.


Steps performed as follows;


At the beginning SM was unable to start on browser.

1)
After running;
# apt-get install php-file php-db

then I can start SM but unable to login.


2)
#pear list
Installed packages, channel pear.php.net:
=========================================
Package Version State
Archive_Tar 1.3.1 stable
Console_Getopt 1.2 stable
PEAR 1.4.11 stable



Download DB-1.7.13.tgz on Internet. Decompressed it. Then

# cp -R db-4.7.25/db/ /usr/share/php

Still unable to login SM.


3)
Edited following file;

# nano /etc/amavis/conf.d/50-user

adding following lines before 1;

@lookup_sql_dsn = (
['DBI:mysql:database=maildb;host=127.0.0.1;port=330 6',
'mail',
'mailpassword']);

$sql_select_policy = 'SELECT name FROM virtual_domains WHERE CONCAT("@",name) IN (%k)';



Still I can't login.


# cat /etc/amavis/conf.d/50-user
use strict;

@lookup_sql_dsn = (
['DBI:mysql:database=maildb;host=127.0.0.1;port=330 6',
'mail',
'mailpassword']);

$sql_select_policy = 'SELECT name FROM virtual_domains WHERE CONCAT("@",name) IN (%k)';

#------------ Do not modify anything below this line -------------
1; # insure a defined return

$mydomain= 'satimis.com';
$daemon_user= 'virtual';
$daemon_group= 'virtual';
@local_domains_acl = qw(.);
$inet_socket_port = 10024;
$forward_method = 'smtp:127.0.0.1:10025';
# @bypass_virus_checks_acl = qw( . );
# @bypass_spam_checks_acl = qw( . );

#
$TEMPBASE = "$MYHOME/tmp";
# Whilst debugging
$log_level = 2;
$warnbannedrecip = 1;
$warn_offsite = 1;
$warnvirusrecip = 1;
$spam_quarantine_to = "spam-quarantine\@$mydomain";
$virus_quarantine_to = "virus-quarantine\@$mydomain";
$sa_local_tests_only = 0;



Finally;

4)
Ran
# /var/www/squirrelmail/config/conf.pl

9 -> 1

DSN for Address Book
entered;
mysql://satimis@satimis.com:mypassword@127.0.0.1/maildb

S -> Q

(remark: maildb=database users=table)

Leaving "DSN for Preferences" blank


On browser checking;
http://satimis.com/squirrelmail/src/configtest.php
.....
.....
Error: Database error: connect failed in addressbook DSN.


Ignored it for the time being.


On browser;
http://satimis.com/squirrelmail/

Login satimis@satimis.com
Password mypassword


This time I can login SM reading mails. Now it doesn't work for me only. Other users under different domains are also able to login with their password sending/reading mails.


This is working mail server running postfix virtual and MySQL as database serving users of multiple domains. I'm testing the server with 4 domains. All users can send/receive mails on their mail client. Evolution, as well. The said server is running as guest on a Xen box .


This happening surprises me. I only edited the file entering my own data there. Why other users of other domains can also login? Their login data have not been entered on SM. If it uses the data on database then why it needs my data on SM before login can work?


Whether I can revoke steps 2) and 3) above ? TIA


B.R.
satimis