[ERROR] Courier IMAP : s_connect() failed: No such file or directory

Discussion in 'Server Operation' started by xemox, Nov 13, 2011.

  1. xemox

    xemox New Member

    Guide followed : http://www.howtoforge.com/perfect-server-centos-6.0-x86_64-ispconfig-3

    testing stage:
    I. use authtest script
    Code:
    $ sudo authtest -s smtps  user@domain.tld validpassword
    
    Nov 13 08:20:39 server authdaemond: received auth request, service=smtps, authtype=login
    Nov 13 08:20:39 server authdaemond: authmysql: trying this module
    Nov 13 08:20:39 server authdaemond: SQL query: SELECT email, password, "", uid, gid, "/var/vmail", maildir, quota, "", concat('disableimap=',disableimap,',disablepop3=',disablepop3) FROM mail_user WHERE email = 'user@domain.tld'
    Nov 13 08:20:39 server authdaemond: password matches successfully
    Nov 13 08:20:39 server authdaemond: authmysql: sysusername=<null>, sysuserid=5000, sysgroupid=5000, homedir=/var/vmail, address=user@domain.tld, fullname=<null>, maildir=/var/vmail/domain.tld/admin, quota=0, options=disableimap=n,disablepop3=n
    Nov 13 08:20:39 server authdaemond: Authenticated: sysusername=<null>, sysuserid=5000, sysgroupid=5000, homedir=/var/vmail, address=user@domain.tld, fullname=<null>, maildir=/var/vmail/domain.tld/admin, quota=0, options=disableimap=n,disablepop3=n
    
    Code:
    $ sudo authtest -s pop3s  user@domain.tld validpassword
    
    Nov 13 08:20:44 server authdaemond: received auth request, service=pop3s, authtype=login
    Nov 13 08:20:44 server authdaemond: authmysql: trying this module
    Nov 13 08:20:44 server authdaemond: SQL query: SELECT email, password, "", uid, gid, "/var/vmail", maildir, quota, "", concat('disableimap=',disableimap,',disablepop3=',disablepop3) FROM mail_user WHERE email = 'user@domain.tld'
    Nov 13 08:20:44 server authdaemond: password matches successfully
    Nov 13 08:20:44 server authdaemond: authmysql: sysusername=<null>, sysuserid=5000, sysgroupid=5000, homedir=/var/vmail, address=user@domain.tld, fullname=<null>, maildir=/var/vmail/domain.tld/admin, quota=0, options=disableimap=n,disablepop3=n
    Nov 13 08:20:44 server authdaemond: Authenticated: sysusername=<null>, sysuserid=5000, sysgroupid=5000, homedir=/var/vmail, address=user@domain.tld, fullname=<null>, maildir=/var/vmail/domain.tld/admin, quota=0, options=disableimap=n,disablepop3=n
    
    Code:
    $ sudo authtest -s imaps  user@domain.tld validpassword
    
    Nov 13 08:20:54 server authdaemond: received auth request, service=imaps, authtype=login
    Nov 13 08:20:54 server authdaemond: authmysql: trying this module
    Nov 13 08:20:54 server authdaemond: SQL query: SELECT email, password, "", uid, gid, "/var/vmail", maildir, quota, "", concat('disableimap=',disableimap,',disablepop3=',disablepop3) FROM mail_user WHERE email = 'user@domain.tld'
    Nov 13 08:20:54 server authdaemond: password matches successfully
    Nov 13 08:20:54 server authdaemond: authmysql: sysusername=<null>, sysuserid=5000, sysgroupid=5000, homedir=/var/vmail, address=user@domain.tld, fullname=<null>, maildir=/var/vmail/domain.tld/admin, quota=0, options=disableimap=n,disablepop3=n
    Nov 13 08:20:54 server authdaemond: Authenticated: sysusername=<null>, sysuserid=5000, sysgroupid=5000, homedir=/var/vmail, address=user@domain.tld, fullname=<null>, maildir=/var/vmail/domain.tld/admin, quota=0, options=disableimap=n,disablepop3=n
    

    II. telnet / openssl
    Code:
    $ openssl s_client -connect 127.0.0.1:993
    a login user@domain.tld validpassword
    
    
    Nov 13 08:11:23 server imapd-ssl: Connection, ip=[::ffff:127.0.0.1]
    Nov 13 08:11:53 server imapd-ssl: authdaemon: s_connect() failed: No such file or directory
    Nov 13 08:11:53 server imapd-ssl: LOGIN FAILED, user=user@domain.tld, ip=[::ffff:127.0.0.1]
    Nov 13 08:11:53 server imapd-ssl: authentication error: No such file or directory
    

    III. Found some clue
    Code:
     
      any user run 'authtest' command will fail even a root, with 2 kind of reason:
      1. No suche file or directory
      2. Permission denied
       
    Code:
     any user run 'authtest' command using 'sudo' will succeed 

    IV. It's file permission problem and I have no idea to fix this
     
    Last edited: Nov 13, 2011
  2. falko

    falko Super Moderator

    You must send an email to a new account first before you can fetch emails. The necessary directories will be created automatically when the first mail arrives.
     
  3. xemox

    xemox New Member

    i did that too. sending an email to user@domain.tld.

    as i report on clue part, it is permission problem.
     
  4. falko

    falko Super Moderator

    Can you post an excerpt fro your mail log when you try to send a mail to that account?
     
  5. xemox

    xemox New Member

    Log (receive and auth)
    Code:
    Nov 15 17:59:06 server authdaemond: received userid lookup request: user@domain.tld
    Nov 15 17:59:06 server authdaemond: authmysql: trying this module
    Nov 15 17:59:06 server authdaemond: authmysqllib: connected. Versions: header 50152, client 50152, server 50152
    Nov 15 17:59:06 server authdaemond: SQL query: SELECT email, password, "", uid, gid, "/var/vmail", maildir, quota, "", concat('disableimap=',disableimap,',disablepop3=',disablepop3) FROM mail_user WHERE email = 'user@domain.tld'
    Nov 15 17:59:06 server authdaemond: Authenticated: sysusername=<null>, sysuserid=5000, sysgroupid=5000, homedir=/var/vmail, address=user@domain.tld, fullname=<null>, maildir=/var/vmail/domain.tld/x, quota=0, options=disableimap=n,disablepop3=n
    Nov 15 17:59:06 server postfix/pipe[7961]: 666AC14588702: to=<user@domain.tld>, relay=maildrop, delay=0.36, delays=0.06/0.02/0/0.27, dsn=2.0.0, status=sent (delivered via maildrop service)
    Nov 15 17:59:06 server postfix/qmgr[1283]: 666AC14588702: removed
    Nov 15 18:00:41 server imapd: Connection, ip=[::ffff:127.0.0.1]
    Nov 15 18:00:41 server imapd: authdaemon: s_connect() failed: No such file or directory
    Nov 15 18:00:41 server imapd: LOGIN FAILED, user=user@domain.tld, ip=[::ffff:127.0.0.1]
    Nov 15 18:00:41 server imapd: authentication error: No such file or directory
    
     
  6. falko

    falko Super Moderator

    Did you create the email account though ISPConfig?

    Is SELinux disabled?
     
  7. xemox

    xemox New Member

    Did you create the email account though ISPConfig?
    -> No
    Is SELinux disabled?
    -> No
    Code:
     
    server ~: sudo  find /etc/ -name selinux -ls
    server ~:
     
     
  8. falko

    falko Super Moderator

    But the tutorial is for preparing a server for the installation of ISPConfig, and SELinux must be disabled.
     
  9. xemox

    xemox New Member

    I can not disable selinux because no selinux installed
    Code:
    server ~: sudo  find /etc/ -name selinux -ls
    server ~:
    
     
  10. falko

    falko Super Moderator

Share This Page