ERROR: Connection dropped by IMAP server

Discussion in 'Server Operation' started by satimis, Feb 13, 2008.

  1. satimis

    satimis New Member

    Hi folks,


    Ubuntu 7.04 server amd64
    Postfix 2.3.8
    SquirrelMail version 1.4.11


    The Mail Server has been running for sometimes. Previously whenever a new account is created the Maildir including its subdirectories will be automatically created upon receipt of the 1st mail.


    Just created a new account and sent a new mail to it. But no Maildir was created automatically. On starting SM and login the new account a warning "ERROR: Connection dropped by IMAP server" popup, unable to login. Other users login w/o problem.


    Please advise where shall I check and how to fix the problem. TIA


    B.R.
    satimis
     
  2. falko

    falko Super Moderator

    Any errors in your mail log?
     
  3. satimis

    satimis New Member

    I found the fix, to comment out
    Code:
    #mailbox_command = procmail -a "$EXTENSION"
    
    I tried changing it as;
    Code:
    mailbox_command = /usr/local/bin/procmail -Y -a $DOMAIN
    
    still failed.


    $ tail /var/log/mail.log
    Code:
    Feb 14 22:52:30 mail postfix/smtpd[6050]: connect from
    hanghau.pacific.net.hk[202.64.33.147]
    Feb 14 22:52:30 mail postfix/smtpd[6050]: warning: support for
    restriction "reject_maps_rbl" wi
    ll be removed from Postfix; use "reject_rbl_client domain-name" instead
    Feb 14 22:52:30 mail postfix/smtpd[6050]: 396CADF00ED:
    client=hanghau.pacific.net.hk[202.64.33.
    147]
    Feb 14 22:52:30 mail postfix/cleanup[6055]: 396CADF00ED:
    message-id=<200802141444.m1EEi4A201126
    8@hanghau.pacific.net.hk>
    Feb 14 22:52:30 mail postfix/qmgr[6047]: 396CADF00ED:
    from=<satimis@pacific.net.hk>, size=843, 
    nrcpt=3 (queue active)
    Feb 14 22:52:30 mail postfix/smtpd[6050]: disconnect from
    hanghau.pacific.net.hk[202.64.33.147]
    Feb 14 22:52:30 mail postfix/local[6057]: 396CADF00ED:
    to=<satimis@satimis.com>, relay=local, d
    elay=0.24, delays=0.19/0.01/0/0.03, dsn=2.0.0, status=sent (delivered
    to command: /usr/bin/proc
    mail -Y -a $DOMAIN)
    Feb 14 22:52:30 mail postfix/local[6060]: 396CADF00ED:
    to=<stephen@satimis.com>, relay=local, d
    elay=0.24, delays=0.19/0.01/0/0.03, dsn=2.0.0, status=sent (delivered
    to command: /usr/bin/proc
    mail -Y -a $DOMAIN)
    Feb 14 22:52:30 mail postfix/local[6056]: 396CADF00ED:
    to=<reynoldliu@satimis.com>, relay=local
    , delay=0.24, delays=0.19/0.01/0/0.05, dsn=2.0.0, status=sent
    (delivered to command: /usr/bin/p
    rocmail -Y -a $DOMAIN)
    Feb 14 22:52:30 mail postfix/qmgr[6047]: 396CADF00ED: removed
    You have new mail in /var/mail/satimis
    
    Incoming mail never rejected but did not arrive their destination.


    Furthermore I found following funny thing. Mail directores were created on /var/mail additional to $HOME/Maildir


    # ls /var/mail/
    Maildir user1 user2 user3 etc.
    (however not all users' accounts are found here, only some of them. I have no idea how they came. I did not create them)


    # ls /var/mail/Maildir/
    cur new tmp


    # ls /var/mail/Maildir/new
    Code:
    1194227046.Vfe00Ide0039M703212.ubuntu
    1194228316.Vfe00Ide003cM795094.ubuntu  
    .....
    ...
    1197012418.Vfe00Ide00d6M170292.mail
    1197055821.Vfe00Ide0102M909864.mail
    ....
    
    There are mails there, almost all spam.


    # ls /var/mail/Maildir/cur
    # ls /var/mail/Maildir/tmp
    both w/o printout


    # ls /var/mail/user1 /user2/user3/etc.
    No printout.


    The abovementioned problem and/or discovery were found after following;

    14 Postfix With SMTP-AUTH And TLS
    http://www.howtoforge.com/perfect_server_ubuntu7.10_p5

    to continue the test. I did not re-install the packages recommended there. Because all of them have already been installed. I just ran;

    $ sudo dpkg-reconfigure postfix

    to reconfigure postfix.


    After finish I discovered that other workstations can't download mails on this Mail Server to their mail clients (Evolution and KMail) but can send mails via it on mail clients w/o problem. I'm still trying to fix the problem.


    B.R.
    satimis
     
  4. satimis

    satimis New Member

    Hi folks,


    I discovered the cause of the non-arrival of incoming mails to users. The mails were not rejected.

    Users have their mailbox on $HOME/Maildir. Addtionally they have another mail_files on;

    $ ls /var/mail/
    Maildir user1 user2 user3 user4 etc.

    $ ls /var/mail/Maildir/
    cur new tmp

    /var/mail/Maildir/cur and /tmp are empty
    /var/mail/Maildir/new having spam mails


    Each time when new mails arrive the same will be added on their mail-files on /var/mail. For such a reason the new mails never arrive on $HOME/Maildir.


    When creating a new account with;

    $ sudo useradd -m -s /bin/bash user100

    New mail box will be created on user's $HOME/Maildir automatically. However the first new mail to user100 will create a new mail_file on /var/mail/user100. All later mails to user100 will be added on /var/mail/user100 (the mail_file)


    Please advise where shall I check and how to fix this problem. I don't need mail_files. I need all incoming mails delivered on respective $HOME/Maildir. TIA



    Edit: (PROBLEM SOLVED)

    # nano /etc/procmailrc

    copying following lines on it;
    Code:
    DROPPRIVS=YES
    ORGMAIL=$HOME/Maildir/
    DEFAULT=$ORGMAIL
    

    Keeping the line;
    Code:
    mailbox_command = procmail -a "$EXTENSION"
    
    on /etc/postfix/main.cf


    All incoming mails are now delivered to the respective $HOME/Maildir


    B.R.
    satimis
     
    Last edited: Feb 16, 2008

Share This Page