HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=4)
-   -   ERROR- Connection dropped by imap-server (http://www.howtoforge.com/forums/showthread.php?t=38656)

Al1937 30th August 2009 19:01

ERROR- Connection dropped by imap-server
 
Installed
Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 9.04)
Logged into Squirrelmail.
got
ERROR- Connection dropped by imap-server

I did the Mailx thing.

I have yet to disable the plugins as a suggested fix because I
do not know how to do that.
Please tell me how.

After install mutt I tried mutt -f imap://localhost/
It failed certificate --did not match.
I typed "a: to accept.
Did a mutt -f imap://localhost/
This time I got
Username at localhost: root
I pressed Enter
Password for root@localhost
I entered my root password, the same one I enter afte a sudo su command.
I got
Temporary problem- try again later.
Login failed
I did try later (a few hours) again and the a few hours again
Same result.

I sent an email to postmaster@bingftp.com using gmail.
It was successfully sent.
That did not help the problem.

I tried /var/log/mail.err
Got Permission Denied


Tried /var/log/maillog file
Got no such file or directory

I tried telnet localhost 143
Got OK

I hit enter I got
* NO Error in IMAP command received by server.

Then entered <]
I got
telnet>
Entered quit
Got back to root@www:/home/albert#



Did a telnet localhost 25
Then ehlo localhost
Good results.

I have spent hours on Google with this problem.
No definitive fix except for "send an emailwill create malbox"
Which did not help .

falko 31st August 2009 13:25

Did you try to log in as root@localhost? You must log in with the email address of that account.
Any errors in /var/log/mail.log?

Al1937 1st September 2009 01:23

/var/log/mail.log

I get prmission denied.

I am logged in as
root@www:/home/albert#
Am I not logged in as root?

Where did I screw up?
-------------------------------------------------------
vi /usr/local/sbin/quota_notify
I edited
my @POSTMASTERS = ('postmaster@bingftp.tld');
my $COADDR = 'postmaster@bingftp.tld';
my $SUADDR = 'postmaster@bingftp.tld';
-------------------------------------------------------

I adjusted excactly in vi config.php


$csp_dsn = 'mysql://mail_admin:mail_admin_password@localhost/mail';

$lookup_password_query = 'SELECT count(*) FROM users WHERE email = "%1" AND password = %4';

$password_update_queries = array('UPDATE users SET password = %4 WHERE email = "%1"');

$password_encryption = 'MYSQLENCRYPT';

$csp_salt_static = 'LEFT(password, 2)';

//$csp_salt_query = 'SELECT salt FROM users WHERE username = "%1"';

$csp_delimiter = '@';
-------------------------------------------------------------------
Next we do some Postfix configuration. Go sure that you replace server1.example.com with a valid FQDN, otherwise your Postfix might not work properly!

postconf -e 'myhostname = www.bingftp.com'
postconf -e 'mydestination = www.bingftp.com, localhost, localhost.localdomain'
-----------------------------------------------------------------------

cd /etc/postfix
openssl req -new -outform PEM -out smtpd.cert -newkey rsa:2048 -nodes -keyout smtpd.key -keyform PEM -days 365 -x509

Email Address []: postmaster@bingftp.com
------------------------------------------------------------------------


vi /etc/courier/authmysqlrc

I added these lines excactly.
Should I have change mail_admin_password to my real password?
Should I ahve changed to 2 occurences of password to my real password?

MYSQL_SERVER localhost
MYSQL_USERNAME mail_admin
MYSQL_PASSWORD mail_admin_password
MYSQL_PORT 0
MYSQL_DATABASE mail
MYSQL_USER_TABLE users
MYSQL_CRYPT_PWFIELD password
#MYSQL_CLEAR_PWFIELD password
MYSQL_UID_FIELD 5000
MYSQL_GID_FIELD 5000
MYSQL_LOGIN_FIELD email
MYSQL_HOME_FIELD "/home/vmail"
MYSQL_MAILDIR_FIELD CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')
#MYSQL_NAME_FIELD
-----------------------------------------------------------------------


vi /etc/aliases
Was edited as:

postmaster: root
root: postmaster@bingftp.tld
-----------------------------------------------------------------------
root@www:/home/albert# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5241
Server version: 5.0.75-0ubuntu10.2 (Ubuntu)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>


GRANT SELECT, INSERT, UPDATE, DELETE ON mail.* TO 'mail_admin'@'localhost' IDENTIFIED BY 'my real password';
GRANT SELECT, INSERT, UPDATE, DELETE ON mail.* TO 'mail_admin'@'localhost.localdomain' IDENTIFIED BY 'my real password';
FLUSH PRIVILEGES;
------------------------------------------------------------------------

This is all the info I think may pertain to my problem.
I hope it helps.

falko 1st September 2009 16:34

Quote:

Originally Posted by Al1937 (Post 202759)
/var/log/mail.log

I get prmission denied.

Try
Code:

tail -n200 /var/log/mail.log
or
Code:

vi /var/log/mail.log

Al1937 2nd September 2009 01:24

Did I setup all edits correctly?

They both worked.

Here is a partial of the log.

By the way. How do I copy a "code" box on a reply?

Sep 1 18:12:40 www postfix/smtpd[15085]: warning: problem talking to service re write: Connection reset by peer
Sep 1 18:12:40 www postfix/master[2845]: warning: process /usr/lib/postfix/triv ial-rewrite pid 15332 exit status 1
Sep 1 18:12:40 www postfix/smtpd[15156]: warning: problem talking to service re write: Success
Sep 1 18:12:40 www postfix/master[2845]: warning: process /usr/lib/postfix/triv ial-rewrite pid 15333 exit status 1
Sep 1 18:13:40 www postfix/proxymap[3505]: warning: connect to mysql server 127 .0.0.1: Access denied for user 'mail_admin'@'localhost' (using password: YES)
Sep 1 18:13:40 www postfix/proxymap[3505]: warning: connect to mysql server 127 .0.0.1: Access denied for user 'mail_admin'@'localhost' (using password: YES)
Sep 1 18:13:40 www postfix/trivial-rewrite[15378]: fatal: proxy:mysql:/etc/post fix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
Sep 1 18:13:40 www postfix/trivial-rewrite[15379]: fatal: proxy:mysql:/etc/post fix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
Sep 1 18:13:40 www postfix/trivial-rewrite[15380]: fatal: proxy:mysql:/etc/post fix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
Sep 1 18:13:40 www postfix/trivial-rewrite[15381]: fatal: proxy:mysql:/etc/post fix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
Sep 1 18:13:40 www postfix/trivial-rewrite[15382]: fatal: proxy:mysql:/etc/post fix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
Sep 1 18:13:40 www postfix/trivial-rewrite[15383]: fatal: proxy:mysql:/etc/post fix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
Sep 1 18:13:40 www postfix/trivial-rewrite[15384]: fatal: proxy:mysql:/etc/post fix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
Sep 1 18:13:40 www postfix/trivial-rewrite[15385]: fatal: proxy:mysql:/etc/post fix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
Sep 1 18:13:40 www postfix/trivial-rewrite[15386]: fatal: proxy:mysql:/etc/post fix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
Sep 1 18:13:40 www postfix/trivial-rewrite[15387]: fatal: proxy:mysql:/etc/post fix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
Sep 1 18:13:40 www postfix/trivial-rewrite[15388]: fatal: proxy:mysql:/etc/post fix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
Sep 1 18:13:40 www postfix/trivial-rewrite[15389]: fatal: proxy:mysql:/etc/post fix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
Sep 1 18:13:40 www postfix/trivial-rewrite[15390]: fatal: proxy:mysql:/etc/post fix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
root@www:/home/albert# vi /var/log/mail.log
Sep 1 06:46:06 www amavis[26492]: (26492-12) (!)rw_loop: leaving rw loop, no progress
Sep 1 06:46:07 www amavis[26492]: (26492-12) (!)rw_loop: leaving rw loop, no progress
Sep 1 06:46:07 www amavis[26492]: (26492-12) (!)FWD via SMTP: <root@www.bingftp.com> -> <sales@bingftp.com>,BODY=7BIT 451 4.5.0 From MTA([127.0.0.1]:10025) during fwd-rundown-1 (Negative SMTP response to RSET: at (eval 96) line 1118.): id=26492-12
Sep 1 06:46:07 www amavis[26492]: (26492-12) Blocked MTA-BLOCKED, <root@www.bingftp.com> -> <sales@bingftp.com>, Message-ID: <20090830000633.5EAFE6823D@www.bingftp.com>, mail_id: unpryPC35308, Hits: 0.676, size: 337, 561041 ms
Sep 1 06:46:08 www postfix/smtp[32065]: 5EAFE6823D: to=<sales@bingftp.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=211175, delays=210614/0/0/562, dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 No resp. to MAIL FROM, id=26492-12, from MTA([127.0.0.1]:10025): (in reply to end of DATA command))
Sep 1 06:46:14 www postfix/proxymap[3505]: warning: connect to mysql server 127.0.0.1: Access denied for user 'mail_admin'@'localhost' (using password: YES)
Sep 1 06:46:14 www postfix/proxymap[3505]: warning: connect to mysql server 127.0.0.1: Access denied for user 'mail_admin'@'localhost' (using password: YES)
Sep 1 06:46:14 www postfix/trivial-rewrite[321]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
Sep 1 06:46:14 www postfix/trivial-rewrite[322]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
Sep 1 06:46:14 www postfix/trivial-rewrite[323]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
@

falko 2nd September 2009 15:10

Here's the problem:
Code:

Sep 1 18:13:40 www postfix/proxymap[3505]: warning: connect to mysql server 127 .0.0.1: Access denied for user 'mail_admin'@'localhost' (using password: YES)
Sep 1 18:13:40 www postfix/proxymap[3505]: warning: connect to mysql server 127 .0.0.1: Access denied for user 'mail_admin'@'localhost' (using password: YES)

You probably use a wrong password in the mysql*.cf files...

Al1937 2nd September 2009 15:50

I am not sure what the mysql*.cf files are.
Can you please be more detailed?

-------------------------------------
root@www:/home/albert# mysql -u root -p
Enter password:'my real password'
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5241
Server version: 5.0.75-0ubuntu10.2 (Ubuntu)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>


GRANT SELECT, INSERT, UPDATE, DELETE ON mail.* TO 'mail_admin'@'localhost' IDENTIFIED BY 'my real password';
GRANT SELECT, INSERT, UPDATE, DELETE ON mail.* TO 'mail_admin'@'localhost.localdomain' IDENTIFIED BY 'my real password';
FLUSH PRIVILEGES;
--------------------------------------------------------------------------
USE mail;

Is this where the mysql*.cf files are created?

falko 3rd September 2009 17:06

Quote:

Originally Posted by Al1937 (Post 202989)
I am not sure what the mysql*.cf files are.
Can you please be more detailed?

The six .cf files that you created during this tutorial: "Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 9.04) "

Al1937 4th September 2009 06:04

I have reinstalled The Perfect Server - Ubuntu 9.04 [ISPConfig 3] I wanted the FTP server.
I thought that "Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 9.04) "had FTP
Well, anyway I have the same error.
During base or core installation I used ??????? for my password. I used this same password when ever I was asked to enter a password. I use my user name albert and ??????? when I logon to Squirellmail. Any other login I got Unknown user or password.









root@www:~# vi /var/log/mail.log
Sep 3 21:32:22 www authdaemond: modules="authpam", daemons=5
Sep 3 21:32:22 www authdaemond: Installing libauthpam
Sep 3 21:32:22 www authdaemond: Installation complete: authpam
Sep 3 21:32:22 www authdaemond: stopping authdaemond children
Sep 3 21:32:22 www authdaemond: restarting authdaemond children
Sep 3 21:32:22 www authdaemond: modules="authpam", daemons=5
Sep 3 21:32:22 www authdaemond: Uninstalling authpam
Sep 3 21:32:22 www authdaemond: Installing libauthpam
Sep 3 21:32:22 www authdaemond: Installation complete: authpam
Sep 3 21:32:30 www postfix/master[5100]: daemon started -- version 2.5.5, configuration /etc/postfix
Sep 3 21:39:46 www amavis[11841]: starting. /usr/sbin/amavisd-new at www.bingftp.com amavisd-new-2.6.2 (20081215), Unicode aware, LANG="en_US.UTF-8"
Sep 3 21:39:46 www amavis[11841]: Perl version 5.010000
Could this be the problem?
Sep 3 21:39:47 www amavis[11846]: Net::Server: Group Not Defined. Defaulting to EGID '119 119'
Sep 3 21:39:47 www amavis[11846]: Net::Server: User Not Defined. Defaulting to EUID '110'
If so, how do I fix it?
Sep 3 21:39:47 www amavis[11846]: Module Amavis::Conf 2.203
Sep 3 21:39:47 www amavis[11846]: Module Archive::Zip 1.18
Sep 3 21:39:47 www amavis[11846]: Module BerkeleyDB 0.34
Sep 3 21:39:47 www amavis[11846]: Module Compress::Zlib 2.015
Sep 3 21:39:47 www amavis[11846]: Module Convert::TNEF 0.17
Sep 3 21:39:47 www amavis[11846]: Module Convert::UUlib 1.11
Sep 3 21:39:47 www amavis[11846]: Module Crypt::OpenSSL::RSA 0.25
Sep 3 21:39:47 www amavis[11846]: Module Digest::MD5 2.36_01
"/var/log/mail.log" 164L, 11530C 1,1 Top
-------------------------------------------------------------------------

http://bingftp.com/webmail/src/configtest.php

ERROR: You have enabled any one of magic_quotes_runtime, magic_quotes_gpc or magic_quotes_sybase in your PHP configuration. We recommend all those settings to be off. SquirrelMail may work with them on, but when experiencing stray backslashes in your mail or other strange behaviour, it may be advisable to turn them off.
ALL ELSE SEEMS OK

Checking outgoing mail service....
SMTP server OK (220 www.bingftp.com ESMTP Postfix (Ubuntu))
Checking IMAP service....
IMAP server ready (* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION STARTTLS] Courier-IMAP ready. Copyright 1998-2008 Double Precision, Inc. See COPYING for distribution information.)
Capabilities: * CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION STARTTLS

I hope this helps.



OK, Now I am really frustrated!!

I am editing this post.

I did all the above before I installed ISPConfig3. I then did the update to 3.0.1.4
NOW, instead of getting Connection dropped by imap-server when I try to login to Squirrelmail with albert and ??????? for my password I now get
Unknown user or password. What is going on???

falko 4th September 2009 18:39

If you want to install ISPConfig 3, please use just this one tutorial: "The Perfect Server - Ubuntu 9.04 [ISPConfig 3]"

Don't use "Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 9.04)"!


All times are GMT +2. The time now is 13:42.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.