The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

IMAP problem -- Failed to write to socket: not connected (code: -1)

Discussion in 'E-mail Discussions' started by linuxChique, Jul 18, 2012.

  1. linuxChique

    linuxChique Member

    Joined:
    Aug 16, 2010
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    I'm having email problems with webmail and IMAP. When I try to send email with Horde, I get this: There was an error sending your message: Failed to set sender: user@domain.net [SMTP: Failed to write to socket: not connected (code: -1, response: )]. I have read elsewhere that this is due to SMTP being blocked in csf, but I followed the instructions to set those to allow SMTP traffic:

    Code:
    SMTP_BLOCK = "0"
    SMTP_ALLOWLOCAL = "1"
    There's also:

    Code:
    SMTP_PORTS = "25"
    SMTP_ALLOWUSER = "cpanel"
    SMTP_ALLOWGROUP = "mail,mailman"
    Anyway, stopping csf altogether doesn't fix the problem.

    When I try to send an email, I get this in /var/log/maillog:

    Code:
    Jul 18 19:30:54 hadrian imapd: LOGIN, user=user@hostname.domain.com, ip=[::ffff:127.0.0.1], port=[45588], protocol=IMAP
    Jul 18 19:30:55 hadrian imapd: LOGOUT, user=user@hostname.domain.com, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=38, sent=250, time=1
    I need to get email working. What else can I try?
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,451
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Sounds like you're logged into cPanel as the cPanel user and then went to Webmail as that user and tried to send an email. The cPanel user doesn't actually have an email account though. Create an email account properly and logout of cPanel.

    Log back into Webmail yourdomain.com/webmail using that new email account you just created. Your Webmail login would be the full email address for the username, and the password you set that new email account to have. Now try sending an email and see how it goes.
     
  3. linuxChique

    linuxChique Member

    Joined:
    Aug 16, 2010
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    No change. All of my clients are seeing this behavior, even without webmail altogether.
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,451
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    From within your WHM, top right corner is a Support Menu. On that menu a link to Contact cPanel. Us that and put in a ticket so that cPanel Technical Support can come by for a closer look.

    Please do post back what you find out.

    Thanks!
     
  5. linuxChique

    linuxChique Member

    Joined:
    Aug 16, 2010
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Thanks, ticket is #2932710. I will report back.
     
  6. santrix

    santrix Well-Known Member

    Joined:
    Nov 30, 2008
    Messages:
    223
    Likes Received:
    2
    Trophy Points:
    18
    Was there a simple fix for this?

    I am seeing the same issue on one of our servers. I setup my own mailbox in a customer's account, and then (using a different browser), logged in via domain/webmail using the mailbox address/password. Upon trying to send a message to anyone (a domain on the same server, or somewhere else entirely) using Horde I see

    There was an error sending your message: Failed to set sender: xxx@xxx [SMTP: Failed to write to socket: not connected (code: -1, response: )]
     
  7. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,451
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    When you open webmail and go to send a new message, at top of that window does it show the Identity you'll be using to send that email?

    In the ticket mentioned above, EXIM was not running for some reason. Are you able to send email out from any other accounts on the same server or no?
     
  8. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Also, if the issue is exim isn't running, check for that and restart it:

    Code:
    ps aux | grep exim
    /etc/init.d/exim restart
    After it is running, tail /var/log/exim_mainlog to see if you show any errors occurring on startup:

    Code:
    tail -fn0 /var/log/exim_mainlog
    Thanks!
     
Loading...

Share This Page