Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Unable to email via SMTP

I've been seeing errors in the osTicket log sporadically throughout the day and saw a similar thread which was unanswered. Here are a few errors.

  1. Unable to email via SMTP:mail.xxxxxx.com:26 [support@xxxxxx.com] Failed to send data [SMTP: Invalid response code received from server (code: -1, response: )]
  2. Unable to email via SMTP:mail.xxxxxx.com:26 [support@xxxxxx.com] Failed to set sender: support@xxxxxx.com [SMTP: Invalid response code received from server (code: -1, response: )]
  3. Unable to email via SMTP:mail.xxxxx.com:26 [careers@xxxxx.com] Failed to send data [SMTP: Invalid response code received from server (code: -1, response: )]
What could be the issue? It seems that the emails are going though.

Comments

  • Did a bit more research and it seems that it might be due to SPF records. Why is osTicket using my IP to send the email instead of the server's IP address where osTicket is installed? Am I missing a setting somewhere?
  • i have the same issue, did you manage to get this resolved in the end?
  • This seems to be caused from bad SMTP settings or your server have issue on sending email for something missconfigured? My OsTicket use SMTP to send email and no issue are present.
    What version of PHP are you using?

    SPF record should be correct or maybe you will have also issue with email delivery or SPAM. You can check your SPF here:
  • Hi,

    I have the same problem, already try gmail but does not work, i received the error code:

    Failed to connect to smtp.gmail.com:587 [SMTP:
    Failed to connect socket: An attempt was made to access a socket in a
    way forbidden by its access permissions.
    (code: -1, response: )]

    Failed to connect to smtp.gmail.com:465 [SMTP:
    Failed to connect socket: A connection attempt failed because the
    connected party did not properly respond after a period of time, or
    established connection failed because connected host has failed to
    respond.
    (code: -1, response: )]


  • No luck so far. I have 500+ logs related to this in the past 5 days now. What's weird is that it still seems to only happen sometimes while other tickets / emails do not result in any issues. Is osTicket actually using the user's IP address while sending the email or does it use the IP address of the server it's installed on?

    PHP 5.6.23

    SMTP settings are confirmed to be correct and the SPF records seem to be fine since I can send mail using the php mail() function just fine using my other scripts.

    Unable to email via SMTP:mail.myhost.com:26 [system@myhost.com] Failed to set sender: system@myhost.com [SMTP: Invalid response code received from server (code: -1, response


    And these seem to be a new type..

    Unable to email via SMTP:mail.myhost.com:26 [support@myhost.com] Failed to set sender: support@myhost.com [SMTP: Invalid response code received from server (code: 554, response: Security failure)]

    Unable to email via SMTP:mail.myhost.com:26 [careers@myhost.com] Failed to set sender: careers@myhost.com [SMTP: Invalid response code received from server (code: -1, response: NԀӻ
  • I've looked into it further and so far everything is pointing me towards the agents' actual IP being used when an email is sent. That would render the system unusable as they're on dynamic IPs and I use SPF (and soon adding DKIM).

    Is there a setting I'm missing such that the email is sent from the server's IP address and passes the SPF record requirements rather than using the agent's IP address, if that is indeed what's happening?

    I'd really like to get this resolved this weekend. Any assistance would be truly appreciated.

    Mailer Error

    Unable to email via SMTP:mail.xxxxxx.com:26 [help@xxxxxx.com] Failed to set sender: help@xxxxxx.com [SMTP: Invalid response code received from server (code: 554, response: Security failure)]

  • I had the same issue posted already a couple of weeks before you did.
    http://osticket.com/forum/discussion/comment/105801

    Still no answer/fix to this. I had a look at the logs and it seems an SSL issue again.
  • The best way to test this would to be setting up something like mailjet or mailchimp and test sending emails from there with the same SMTP credentials. If it works through them look through your SMTP server settings and report back to us.
Sign In or Register to comment.