ERROR- Connection dropped by imap-server

Discussion in 'Installation/Configuration' started by Al1937, Aug 30, 2009.

  1. Al1937

    Al1937 New Member

    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 .
     
  2. falko

    falko Super Moderator ISPConfig Developer

    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?
     
  3. Al1937

    Al1937 New Member

    /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.
     
  4. falko

    falko Super Moderator ISPConfig Developer

    Try
    Code:
    tail -n200 /var/log/mail.log
    or
    Code:
    vi /var/log/mail.log
     
  5. Al1937

    Al1937 New Member

    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
    @
     
  6. falko

    falko Super Moderator ISPConfig Developer

    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...
     
  7. Al1937

    Al1937 New Member

    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?
     
    Last edited: Sep 2, 2009
  8. falko

    falko Super Moderator ISPConfig Developer

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

    Al1937 New Member

    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???
     
    Last edited: Sep 4, 2009
  10. falko

    falko Super Moderator ISPConfig Developer

    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)"!
     
  11. Al1937

    Al1937 New Member

    That's what I did. I gave up on Virtual and installed Perfect server 9.04.
    Strange what happened. Before I installed ISPConfig 3.0.1.4
    I would login to Squirrelmail with my username "albert" and my password. I would get "Connection dropped by imap-server.
    After installing ISPConfig 3.0.1.4 I now get unknown user or password.
    Also
    The Perfect Server - Ubuntu 9.04 [ISPConfig 3]

    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.

    vi /etc/php5/cli/php.ini

    magic_quotes_runtime was on. I turned it Off, :w :q
    magic_quotes_gpc was Off
    magic_quotes_sybase was Off

    I rebooted system.

    re-ran http://bingftp.com/webmail/src/configtest.php
    Same error?
    Is there another file with magic_quotes_xxxxxx?
     

Share This Page