Mail retrieval - connection intentionally closed by the server

Discussion in 'Installation/Configuration' started by vincentthe, Jan 2, 2007.

  1. vincentthe

    vincentthe New Member

    Hello,

    This happens on 2 domains only, the configuration was working smoothly but now (without any changes that I know of) the following error occurs when trying to fetch mail from either imap or pop3:

    - The connection was intentionally closed by the server before the session was completed.

    This is after the user/passwd check is completed.

    How do I fix this?
     
  2. vincentthe

    vincentthe New Member

    Well, the cause of the problem is still unknown but somehow it disappeared...
     
  3. vincentthe

    vincentthe New Member

    And the problem is back again, this time on another domain and with extra complications.

    When you send a message to this domain postfix wil return this:

    Final-Recipient: rfc822; [email protected]
    Original-Recipient: rfc822; [email protected]
    Action: failed
    Status: 5.0.0
    Diagnostic-Code: X-Postfix; maildir delivery failed: create
    /var/www/web27/Maildir/tmp/1167817327.P9625.ds2.adsl.utwente.nl: Permission
    denied

    * another question on the side, the hostname for this server during install was ds2.adsl.utwente.nl but that was temporary, postfix/spamassassin still use this but I can't find it in the config files. Where should I look to change this?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the output of::

    ls -la /var/www/web27/Maildir
    ls -la /var/www/web27/Maildir/tmp
     
  5. vincentthe

    vincentthe New Member

    [email protected]:/var/www/web27# ls -al Maildir
    lrwxrwxrwx 1 root root 43 2007-01-03 11:07 Maildir -> /var/www/web27/user/ds2_w27_kresten/Maildir
    [email protected]:/var/www/web27# ls -al Maildir/tmp
    total 8
    drwx------ 2 ds2_w27_kresten web27 4096 2007-01-03 11:06 .
    drwx------ 5 ds2_w27_kresten web27 4096 2007-01-03 11:06 ..
    [email protected]:/var/www/web27#
     
  6. vincentthe

    vincentthe New Member

    Restarting courier/postfix, changing permissions on the directory's won't work. Adding another user and/or deleting and creating the mailusers from scratch don't give anything either.

    I can't see any related entry's in /var/log/mail.err or /var/log/mail.info or /var/log/mail.log
     
  7. falko

    falko Super Moderator ISPConfig Developer

    What's the output of
    Code:
    ls -la /var/www/web27/user/ds2_w27_kresten/Maildir
    ?
     
  8. vincentthe

    vincentthe New Member

    [email protected]:/var/www/web27/user/ds2_w27_kresten/Maildir# ls -al
    total 20
    drwx------ 5 ds2_w27_kresten web27 4096 2007-01-04 11:14 .
    drwxr-xr-x 4 ds2_w27_kresten web27 4096 2007-01-04 11:14 ..
    drwx------ 2 ds2_w27_kresten web27 4096 2007-01-04 11:14 cur
    drwx------ 2 ds2_w27_kresten web27 4096 2007-01-04 11:14 new
    drwx------ 2 ds2_w27_kresten web27 4096 2007-01-04 11:14 tmp

    I "solved" the problem by deleting the site and creating it again. However another site suddenly gave the same (failed create: permission denied) error which also worked fine before. This time the site only had 1 mailuser which forwarded all mail to another domain without storing it in the user mailbox or doing any spam/mailscan activities. Here the "solution" also was to remove and re-create from scratch.
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Is the ls output above before or after you recreated the site?
     
  10. vincentthe

    vincentthe New Member

    This above output is before.

    The output beneath is after:
    [email protected]:/var/www/web29/user/ds2_w29_kresten# ls -al Maildir/
    total 32
    drwx------ 5 ds2_w29_kresten web29 4096 2007-01-03 12:22 .
    drwxr-xr-x 5 ds2_w29_kresten web29 4096 2007-01-03 13:06 ..
    -rw-r--r-- 1 ds2_w29_kresten web29 5540 2007-01-03 13:24 courierpop3dsizelist
    drwx------ 2 ds2_w29_kresten web29 8192 2007-01-03 13:24 cur
    drwx------ 2 ds2_w29_kresten web29 4096 2007-01-05 10:39 new
    drwx------ 2 ds2_w29_kresten web29 4096 2007-01-05 10:39 tmp

    And the new output from the other site.
    [email protected]:/var/www/web40/user/ds2_w40_info# ls -al Maildir/
    total 20
    drwx------ 5 ds2_w40_info web40 4096 2007-01-04 11:14 .
    drwxr-xr-x 4 ds2_w40_info web40 4096 2007-01-04 11:14 ..
    drwx------ 2 ds2_w40_info web40 4096 2007-01-04 11:14 cur
    drwx------ 2 ds2_w40_info web40 4096 2007-01-04 11:14 new
    drwx------ 2 ds2_w40_info web40 4096 2007-01-04 11:14 tmp


    The most problematic thing is that I can't see or predict when these things are happening. Luckily both the sites with problems so far were e-mail (with very few users) only, so it was easy to delete/recreate. I don't even want to think about what is going to happen if one of the larger sites/domains is being struck with this problem.
     
  11. falko

    falko Super Moderator ISPConfig Developer

    Which distribution are you using?
    What's in the mail log when this happens?
     
  12. vincentthe

    vincentthe New Member

    Ubuntu 6.06 LTS

    In the maillogs nothing referring to the domain for which mail is rejected can be found. Neither is there any information present on the "connection intentionally closed" error...
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    PLease try to set the hostname of your server as IMAP / POP3 server in the settings of the mail client. Are you sure that you really get not a single line added to the mail.log when you fetch emails for these domains?
     
  14. vincentthe

    vincentthe New Member

    There are 2 problems:
    The intentionally closed connection happens for these accounts on all methods of connection without any log entry (for as far as I can see at least). Connection via telnet to either pop or imap from the server itself or outside, or connections via different client programs all result in the same error, the connection is terminated after the password control (wrong password gives a password error - and gets logged - though). This only occurred for some accounts, but if it occurs always for all accounts on 1 domain. It doesn't matter to the client if you give in the FQDN, the ip-address or any of the sub-domains directed to the ip of the server.

    I did find an entry on the permission problems in the logs:
    Jan 3 10:51:18 ds2 postfix/local[9758]: warning: maildir access problem for UID/GID=10065/10027: create /var/www/web27/Maildir/tmp/1167817878.P9758.ds2.adsl.utwente.nl: Permission denied
    Jan 3 10:51:18 ds2 postfix/local[9758]: warning: perhaps you need to create the maildirs in advance

    For as far as I could see (ls -al output posted before) there were no apparent problems in the permission settings.

    The thing that puzzles me most is the way these errors appear, nobody besides me has shell access to this box, so all accounts are being controlled through the control panel. All accounts worked, and suddenly there's a problem without a simple solution.
     
    Last edited: Jan 7, 2007
  15. falko

    falko Super Moderator ISPConfig Developer

    What's the output of
    Code:
    grep 10065 /etc/passwd
    and
    Code:
    grep 10027 /etc/group
    ?
     
  16. vincentthe

    vincentthe New Member

    Nothing, the "solution" to the problem was to remove the site (and its users) and recreate.

    If I go on the currently available information in /etc/passwd and /etc/group it should have been:
    ds2_w27_kresten:x:10065:10027:Kresten van Leeuwen:/var/www/web23/user/ds2_w27_kresten:/bin/false
    web24:x:10027:admispconfig,ds2_w27_kresten
     
  17. falko

    falko Super Moderator ISPConfig Developer

    Did you or someone else remove the user and group from /etc/passwd and /etc/group?
     
  18. vincentthe

    vincentthe New Member

    Well I guess ISPConfig is responsible for that? At least I guess that's what happens if a site is completely removed and recreated (with a new webid etc.)
     
  19. falko

    falko Super Moderator ISPConfig Developer

    I don't know. I never had such a problem... :confused:
     
  20. vincentthe

    vincentthe New Member

    Well thanks for the help anyway. Hope these problems won't repeat themselve anymore...
     

Share This Page