Squirrelmail ERROR: Connection dropped by courier IMAP server.

Discussion in 'Installation/Configuration' started by dpicella, Aug 13, 2010.

  1. dpicella

    dpicella New Member

    I am getting the following error when trying to log in to squirrelmail.

    "ERROR: Connection dropped by courier IMAP server."

    Here is some information about my setup.

    Software: Newly installed CentOS 5.5 and ISPConfig 3

    I followed the instructions in the turorial to set up Dovecot, but I had trouble configuring Dovecot and replaced it with courier-imap.

    I can send and receive email from the server in mbox format just fine. I just can't get squirrmail to work.

    Finally, I am running this computer in a colocated data center. I manage the DNS for my domains myself.

    CONFIG FILES

    /etc/postfix/main.cf
    Code:
    queue_directory = /var/spool/postfix
    command_directory = /usr/sbin
    daemon_directory = /usr/libexec/postfix
    mail_owner = postfix
    myhostname = mail.jpre.net 
    mydomain = jpre.net
    myorigin = $myhostname
    inet_interfaces = all
    mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
    unknown_local_recipient_reject_code = 550
    mynetworks = 127.0.0.0/8 [::1]/128 
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    debug_peer_level = 2
    debugger_command =
    	 PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
    	 xxgdb $daemon_directory/$process_name $process_id & sleep 5
    sendmail_path = /usr/sbin/sendmail.postfix
    newaliases_path = /usr/bin/newaliases.postfix
    mailq_path = /usr/bin/mailq.postfix
    setgid_group = postdrop
    html_directory = no
    manpage_directory = /usr/share/man
    sample_directory = /usr/share/doc/postfix-2.3.3/samples
    readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
    /etc/postfix/master.cf
    Code:
    smtp      inet  n       -       n       -       -       smtpd
    pickup    fifo  n       -       n       60      1       pickup
    cleanup   unix  n       -       n       -       0       cleanup
    qmgr      fifo  n       -       n       300     1       qmgr
    tlsmgr    unix  -       -       n       1000?   1       tlsmgr
    rewrite   unix  -       -       n       -       -       trivial-rewrite
    bounce    unix  -       -       n       -       0       bounce
    defer     unix  -       -       n       -       0       bounce
    trace     unix  -       -       n       -       0       bounce
    verify    unix  -       -       n       -       1       verify
    flush     unix  n       -       n       1000?   0       flush
    proxymap  unix  -       -       n       -       -       proxymap
    smtp      unix  -       -       n       -       -       smtp
    relay     unix  -       -       n       -       -       smtp
    	-o fallback_relay=
    showq     unix  n       -       n       -       -       showq
    error     unix  -       -       n       -       -       error
    discard   unix  -       -       n       -       -       discard
    local     unix  -       n       n       -       -       local
    virtual   unix  -       n       n       -       -       virtual
    lmtp      unix  -       -       n       -       -       lmtp
    anvil     unix  -       -       n       -       1       anvil
    scache	  unix	-	-	n	-	1	scache
    maildrop  unix  -       n       n       -       -       pipe
      flags=DRhu user=vmail argv=/usr/bin/maildrop -d vmail ${extension} ${recipient} ${user} ${nexthop} ${sender}
    old-cyrus unix  -       n       n       -       -       pipe
      flags=R user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -m ${extension} ${user}
    cyrus     unix  -       n       n       -       -       pipe
      user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -r ${sender} -m ${extension} ${user}
    uucp      unix  -       n       n       -       -       pipe
      flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
    ifmail    unix  -       n       n       -       -       pipe
      flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
    bsmtp     unix  -       n       n       -       -       pipe
      flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
    dovecot   unix  -       n       n       -       -       pipe
      flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${user}@${nexthop}
    SYSTEM INFO

    # netstat -tap
    Code:
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name   
    tcp        0      0 localhost.localdomain:2208  *:*                         LISTEN      4450/hpiod          
    tcp        0      0 *:mysql                     *:*                         LISTEN      4596/mysqld         
    tcp        0      0 *:877                       *:*                         LISTEN      4087/rpc.statd      
    tcp        0      0 localhost.local:dyna-access *:*                         LISTEN      4512/clamd          
    tcp        0      0 *:sunrpc                    *:*                         LISTEN      4010/portmap        
    tcp        0      0 *:munin                     *:*                         LISTEN      5261/munin-node     
    tcp        0      0 *:ftp                       *:*                         LISTEN      5241/pure-ftpd (SER 
    tcp        0      0 208.76.252.132-unall:domain *:*                         LISTEN      3977/named          
    tcp        0      0 208.76.252.131-unall:domain *:*                         LISTEN      3977/named          
    tcp        0      0 www.jpre.net:domain         *:*                         LISTEN      3977/named          
    tcp        0      0 localhost.localdomai:domain *:*                         LISTEN      3977/named          
    tcp        0      0 localhost.localdomain:ipp   *:*                         LISTEN      4477/cupsd          
    tcp        0      0 *:smtp                      *:*                         LISTEN      24579/master        
    tcp        0      0 localhost.localdomain:rndc  *:*                         LISTEN      3977/named          
    tcp        0      0 *:atmtcp                    *:*                         LISTEN      17310/monit         
    tcp        0      0 localhost.localdomain:2207  *:*                         LISTEN      4455/python         
    tcp      144      0 www.jpre.net:atmtcp         cpe-98-154-30-92.soca:58848 CLOSE_WAIT  -                   
    tcp      144      0 www.jpre.net:atmtcp         cpe-98-154-30-92.soca:58849 CLOSE_WAIT  -                   
    tcp      144      0 www.jpre.net:atmtcp         cpe-98-154-30-92.soca:58840 CLOSE_WAIT  -                   
    tcp      144      0 www.jpre.net:atmtcp         cpe-98-154-30-92.soca:58841 CLOSE_WAIT  -                   
    tcp      144      0 www.jpre.net:atmtcp         cpe-98-154-30-92.soca:58842 CLOSE_WAIT  -                   
    tcp      144      0 www.jpre.net:atmtcp         cpe-98-154-30-92.soca:58843 CLOSE_WAIT  -                   
    tcp      144      0 www.jpre.net:atmtcp         cpe-98-154-30-92.soca:58844 CLOSE_WAIT  -                   
    tcp      144      0 www.jpre.net:atmtcp         cpe-98-154-30-92.soca:58845 CLOSE_WAIT  -                   
    tcp      144      0 www.jpre.net:atmtcp         cpe-98-154-30-92.soca:58846 CLOSE_WAIT  -                   
    tcp      144      0 www.jpre.net:atmtcp         cpe-98-154-30-92.soca:58847 CLOSE_WAIT  -                   
    tcp        0      0 localhost.localdomain:40803 localhost.localdomain:ssh   TIME_WAIT   -                   
    tcp        0      0 localhost.localdomain:59418 localhost.localdomain:8009  ESTABLISHED 13490/httpd         
    tcp        0      0 *:imaps                     *:*                         LISTEN      24655/couriertcpd   
    tcp        0      0 *:pop3s                     *:*                         LISTEN      24667/couriertcpd   
    tcp        0      0 localhost.localdomain:8005  *:*                         LISTEN      5186/java           
    tcp        0      0 *:8070                      *:*                         LISTEN      13483/httpd         
    tcp        0      0 *:8009                      *:*                         LISTEN      5186/java           
    tcp        0      0 *:pop3                      *:*                         LISTEN      24661/couriertcpd   
    tcp        0      0 *:imap                      *:*                         LISTEN      24648/couriertcpd   
    tcp        0      0 *:http                      *:*                         LISTEN      13483/httpd         
    tcp        0      0 *:webcache                  *:*                         LISTEN      5186/java           
    tcp        0      0 *:tproxy                    *:*                         LISTEN      13483/httpd         
    tcp        0      0 *:ftp                       *:*                         LISTEN      5241/pure-ftpd (SER 
    tcp        0      0 *:ssh                       *:*                         LISTEN      4468/sshd           
    tcp        0      0 localhost6.localdomain:rndc *:*                         LISTEN      3977/named          
    tcp        0      0 *:https                     *:*                         LISTEN      13483/httpd         
    tcp        0      0 localhost.localdomain:8009  localhost.localdomain:59418 ESTABLISHED 5186/java           
    tcp        0   1584 www.jpre.net:ssh            cpe-98-154-30-92.soca:48784 ESTABLISHED 10324/1             
    tcp        0      0 www.jpre.net:ssh            cpe-98-154-30-92.soca:45103 ESTABLISHED 22138/sshd: root@no 
    
    The host domain has an IPv6 glue record and points to itself for DNS
    # dig mx jpre.net
    Code:
    ; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 <<>> mx jpre.net
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40845
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;jpre.net.			IN	MX
    
    ;; ANSWER SECTION:
    jpre.net.		86400	IN	MX	10 mail.jpre.net.
    
    ;; Query time: 2 msec
    ;; SERVER: 208.67.220.220#53(208.67.220.220)
    ;; WHEN: Fri Aug 13 05:36:38 2010
    ;; MSG SIZE  rcvd: 47
    
    The domain where I am setting up sqirrelmail email is pcmgdoc.com
    dig mx pcmgdoc.com
    Code:
    ; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 <<>> mx pcmgdoc.com
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 52175
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;pcmgdoc.com.			IN	MX
    
    ;; ANSWER SECTION:
    pcmgdoc.com.		86400	IN	MX	10 mail.pcmgdoc.com.
    
    ;; Query time: 168 msec
    ;; SERVER: 208.67.220.220#53(208.67.220.220)
    ;; WHEN: Fri Aug 13 05:39:19 2010
    ;; MSG SIZE  rcvd: 50
    
     
  2. falko

    falko Super Moderator Howtoforge Staff

    You must use Maildir, not mbox, because both Dovecot and Courier don't support mbox.

    Any errors in your mail log?
     
  3. dpicella

    dpicella New Member

    After trying to log in with squirrelmail, I get

    #tail -30 /var/log/maillog
    Code:
    [...]
    Aug 14 11:38:55 jpre postfix/smtpd[20734]: connect from localhost.localdomain[127.0.0.1]
    Aug 14 11:38:55 jpre postfix/smtpd[20734]: disconnect from localhost.localdomain[127.0.0.1]
    Aug 14 11:39:41 jpre imapd: Connection, ip=[::ffff:127.0.0.1]
    Aug 14 11:39:55 jpre postfix/smtpd[20734]: connect from localhost.localdomain[127.0.0.1]
    Aug 14 11:39:55 jpre postfix/smtpd[20734]: disconnect from localhost.localdomain[127.0.0.1]
    Aug 14 11:40:01 jpre postfix/smtpd[20734]: connect from localhost.localdomain[127.0.0.1]
    Aug 14 11:40:01 jpre postfix/smtpd[20734]: lost connection after CONNECT from localhost.localdomain[127.0.0.1]
    Aug 14 11:40:01 jpre postfix/smtpd[20734]: disconnect from localhost.localdomain[127.0.0.1]
    Aug 14 11:40:01 jpre pop3d: Connection, ip=[::ffff:127.0.0.1]
    Aug 14 11:40:01 jpre pop3d: Disconnected, ip=[::ffff:127.0.0.1]
    Aug 14 11:40:01 jpre imapd: Connection, ip=[::ffff:127.0.0.1]
    Aug 14 11:40:01 jpre imapd: Disconnected, ip=[::ffff:127.0.0.1], time=0
    Aug 14 11:40:11 jpre imapd: LOGIN FAILED, [email protected], ip=[::ffff:127.0.0.1]
    Aug 14 11:40:11 jpre imapd: authentication error: Input/output error
    
     
  4. falko

    falko Super Moderator Howtoforge Staff

    How exactly did you install Courier?
     
  5. dpicella

    dpicella New Member

    I followed these instructions:
    http://www.howtoforge.com/installing-courier-imap-courier-authlib-maildrop-fedora-redhat-centos

    For smtp, I probably need saslauthd - it's not running. I have not configured it. ??
    http://www.howtoforge.com/howto_postfix_smtp_auth_tls_howto

    # telnet localhost 25
    Code:
    Trying 127.0.0.1...
    Connected to localhost.localdomain (127.0.0.1).
    Escape character is '^]'.
    220 mail.jpre.net ESMTP Postfix
    
    ... my terminal session will freeze after the last line above and I have to close my terminal session and spawn a new one.

    Sorry but I do not know much about mail config. Thanks in advance for your post!
     
  6. dpicella

    dpicella New Member

    I take that back ...

    Actually, if I wait long enough ... the telnet command will time out and close the connection.

    Code:
    Trying 127.0.0.1...
    Connected to localhost.localdomain (127.0.0.1).
    Escape character is '^]'.
    220 mail.jpre.net ESMTP Postfix
    421 4.4.2 mail.jpre.net Error: timeout exceeded
    Connection closed by foreign host.
    
    :confused:
     
  7. falko

    falko Super Moderator Howtoforge Staff

    Type
    Code:
    ehlo localhost
    after the 220 line - this will show you what Postfix supports; then type
    Code:
    quit
    to go back to the shell.

    Please install Courier according to chapter 10 on http://www.howtoforge.com/perfect-server-centos-5.2-ispconfig-3-p4 .
     
  8. dpicella

    dpicella New Member

    Here is what I get:
    Code:
    # telnet localhost 25
    Trying 127.0.0.1...
    Connected to localhost.localdomain (127.0.0.1).
    Escape character is '^]'.
    220 mail.jpre.net ESMTP Postfix
    ehlo localhost
    250-mail.jpre.net
    250-PIPELINING
    250-SIZE 10240000
    250-VRFY
    250-ETRN
    250-ENHANCEDSTATUSCODES
    250-8BITMIME
    250 DSN
    quit
    
     
  9. dpicella

    dpicella New Member

    I followed instructions 10 through 12
    http://www.howtoforge.com/perfect-server-centos-5.2-ispconfig-3-p4

    Afterward, I updated ISPConfig to reconfigure postfix etc.

    I can't send or receive anything.

    Here are conf files

    /etc/postfix/main.cf
    Code:
    queue_directory = /var/spool/postfix
    command_directory = /usr/sbin
    daemon_directory = /usr/libexec/postfix
    mail_owner = postfix
    myhostname = jpre.net
    mydomain = jpre.net
    myorigin = $myhostname
    inet_interfaces = all
    mydestination = jpre.net, localhost, localhost.localdomain
    unknown_local_recipient_reject_code = 550
    mynetworks = 127.0.0.0/8 [::1]/128
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    debug_peer_level = 2
    debugger_command =
    	 PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
    	 xxgdb $daemon_directory/$process_name $process_id & sleep 5
    sendmail_path = /usr/sbin/sendmail.postfix
    newaliases_path = /usr/bin/newaliases.postfix
    mailq_path = /usr/bin/mailq.postfix
    setgid_group = postdrop
    html_directory = no
    manpage_directory = /usr/share/man
    sample_directory = /usr/share/doc/postfix-2.3.3/samples
    readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
    virtual_alias_domains = 
    virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
    virtual_mailbox_base = /var/vmail
    virtual_uid_maps = static:5000
    virtual_gid_maps = static:5000
    smtpd_sasl_auth_enable = yes
    broken_sasl_auth_clients = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, reject_unauth_destination
    smtpd_use_tls = yes
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
    virtual_create_maildirsize = yes
    virtual_maildir_extended = yes
    virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
    virtual_mailbox_limit_override = yes
    virtual_maildir_limit_message = "The user you are trying to reach is over quota."
    virtual_overquota_bounce = yes
    proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
    smtpd_tls_security_level = may
    relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
    relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
    smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf
    smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
    maildrop_destination_concurrency_limit = 1
    maildrop_destination_recipient_limit = 1
    virtual_transport = maildrop
    header_checks = regexp:/etc/postfix/header_checks
    mime_header_checks = regexp:/etc/postfix/mime_header_checks
    nested_header_checks = regexp:/etc/postfix/nested_header_checks
    body_checks = regexp:/etc/postfix/body_checks
    content_filter = amavis:[127.0.0.1]:10024
    receive_override_options = no_address_mappings
    
    /etc/postfix/master.cf
    Code:
    smtp      inet  n       -       n       -       -       smtpd
    pickup    fifo  n       -       n       60      1       pickup
    cleanup   unix  n       -       n       -       0       cleanup
    qmgr      fifo  n       -       n       300     1       qmgr
    tlsmgr    unix  -       -       n       1000?   1       tlsmgr
    rewrite   unix  -       -       n       -       -       trivial-rewrite
    bounce    unix  -       -       n       -       0       bounce
    defer     unix  -       -       n       -       0       bounce
    trace     unix  -       -       n       -       0       bounce
    verify    unix  -       -       n       -       1       verify
    flush     unix  n       -       n       1000?   0       flush
    proxymap  unix  -       -       n       -       -       proxymap
    smtp      unix  -       -       n       -       -       smtp
    relay     unix  -       -       n       -       -       smtp
    	-o fallback_relay=
    showq     unix  n       -       n       -       -       showq
    error     unix  -       -       n       -       -       error
    discard   unix  -       -       n       -       -       discard
    local     unix  -       n       n       -       -       local
    virtual   unix  -       n       n       -       -       virtual
    lmtp      unix  -       -       n       -       -       lmtp
    anvil     unix  -       -       n       -       1       anvil
    scache	  unix	-	-	n	-	1	scache
    maildrop  unix  -       n       n       -       -       pipe
      flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient} ${extension} ${recipient} ${user} ${nexthop} ${sender}
    old-cyrus unix  -       n       n       -       -       pipe
      flags=R user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -m ${extension} ${user}
    cyrus     unix  -       n       n       -       -       pipe
      user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -r ${sender} -m ${extension} ${user}
    uucp      unix  -       n       n       -       -       pipe
      flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
    ifmail    unix  -       n       n       -       -       pipe
      flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
    bsmtp     unix  -       n       n       -       -       pipe
      flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
    amavis unix - - - - 2 smtp
            -o smtp_data_done_timeout=1200
            -o smtp_send_xforward_command=yes
    127.0.0.1:10025 inet n - - - - smtpd
            -o content_filter=
            -o local_recipient_maps=
            -o relay_recipient_maps=
            -o smtpd_restriction_classes=
            -o smtpd_client_restrictions=
            -o smtpd_helo_restrictions=
            -o smtpd_sender_restrictions=
            -o smtpd_recipient_restrictions=permit_mynetworks,reject
            -o mynetworks=127.0.0.0/8
            -o strict_rfc821_envelopes=yes
            -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
            -o smtpd_bind_address=127.0.0.1
    
    Other
    # telnet localhost 25
    Code:
     telnet localhost 25
    Trying 127.0.0.1...
    Connected to localhost.localdomain (127.0.0.1).
    Escape character is '^]'.
    220 jpre.net ESMTP Postfix
    ehlo localhost
    250-jpre.net
    250-PIPELINING
    250-SIZE 10240000
    250-VRFY
    250-ETRN
    250-STARTTLS
    250-AUTH LOGIN PLAIN
    250-AUTH=LOGIN PLAIN
    250-ENHANCEDSTATUSCODES
    250-8BITMIME
    250 DSN
    
    Error log after trying a squirrelmail login
    /var/log/maillog
    Code:
    Aug 16 12:41:10 jpre imapd: Connection, ip=[::ffff:127.0.0.1]
    Aug 16 12:41:10 jpre imapd: LOGIN, [email protected], ip=[::ffff:127.0.0.1], port=[45314], protocol=IMAP
    Aug 16 12:41:10 jpre imapd: LOGOUT, [email protected], ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=30, sent=238, time=0
    Aug 16 12:41:10 jpre imapd: Connection, ip=[::ffff:127.0.0.1]
    Aug 16 12:41:10 jpre imapd: LOGIN, [email protected], ip=[::ffff:127.0.0.1], port=[45315], protocol=IMAP
    Aug 16 12:41:10 jpre imapd: Connection, ip=[::ffff:127.0.0.1]
    Aug 16 12:41:10 jpre imapd: LOGIN, [email protected], ip=[::ffff:127.0.0.1], port=[45316], protocol=IMAP
    Aug 16 12:41:10 jpre imapd: DISCONNECTED, [email protected], ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=21, sent=57, time=0
    
    The squirrelmail login screen displays:
    and
    What now ??? Thanks in advance!!
     
  10. falko

    falko Super Moderator Howtoforge Staff

    Are there any Postfix errors in your mail log? The excerpt you posted is about imap.
     

Share This Page