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

Configuring SMTP to work with exchange 2013

osTicket Version v1.10.1 (9ae093d)
Web Server Software Apache/2.4.10 (Debian) 
MySQL Version 5.5.58 
PHP 5.6.30-0+deb8u1

We're using a few different mail accounts with our instance and we've got inbound mail working using imap and outbound mail using port 25 and no authentication. This is fine for the emails that are internal mails on mail domains managed by our server. Where it has to relay to other addresses we get the following error
Mailer Error
Unable to email via SMTP:%servername%:25 [%accountname%] Failed to add recipient: %externalmail% [SMTP: Invalid response code received from server (code: 550, response: 5.7.1 Unable to relay)]

If I change one of the mail accounts SMTP settings to port 587 and authentication required, I'm getting 
Unable to login. Check SMTP settings
authentication failure [SMTP: STARTTLS failed (code: 220, response:2.0.0. SMTP server ready)]

If I try telnet in to exchange on 587 from the osticket server I get
Connected to %servername%
Escape character is '^] '.
220 %servername% Microsoft ESMTP MAIL Service ready
%servername% Hello
SIZE 26214400

Anyone give me a clue how to get this working?


  • I've looked through the thread but it relates to an older version and the bits about socket options are already in our version. Changing the 'version_compare(php_version' gives the error
    authentication failure [SMTP: No supported authentication methods (code:250 response: 
    %servername% Hello
    SIZE 26214400
  • Please provide the settings that you are using. 
    Version of Exchange?
    Is it your Exchange server or hosted?

  • Please advise as to what setting you need to know
    We're running exchange 2013 fully patched
    It's our exchange server
    It's in a different network segment from our ticket server but the firewall between both has the required ports open. This has been tested with telnet.
  • Your email settings.  We used Exchange 2013 for several years before we migrated to ExchangeOnline with no issues.

    Have you enabled IMAP on the server and for the user?
  • The imap is working fine as are the credentials for reading the mail account. The system is raising between 30-40 tickets a day from incoming mails to the mailbox.

    The smtp is working fine on port 25 without authorization for internal addresses managed by our exchange server. We support several companies who have their own mail servers or use hosted mail and it's them we have the problem with. With the unauthorized smtp we get

    [SMTP: Invalid response code received from server (code: 550, response: 5.7.1 Unable to relay)] 

    I'd rather not configure exchange for relaying if I can help it which is why I want to get the smtp auth working.  

  • So email settings? (feel free to chnage the actual domain to faux.tld)
  • From within OS ticket

    Email Login

    Username: domain\username

    Fetching Email

    Status: enable

    hostname: mail.domain.local

    port: 143

    Mailbox protocol: IMAP

    Fetch Frequency: 5 mins

    Email per Fetch: 50

    Fetched Emails: Move to Folder: tickets

    Send Email vis SMTP

    Status: Enable

    Hostname: mail.domain.local

    Port :25

    Auth required: No

    Header spoofing: No

    Am just on the exchange server now digging out any setting from there

  • I'm going to say that it looks good and that you will either have to enable relaying for the domains that are being used, or use a different mail server to send email outside of your organization.
  • Drowning in a sea of exchange data...

    SMTP is enabled for the account

    From within exchange,

    We have a client frontend transport using TLS, Basic Auth only after starting TLS + Integrated Windows auth

    Permission groups set to exchange users only

    The default frontend transport uses TLS + Mutual Auth TLS, Basic Auth only after starting TLS + Integrated Windows auth, Exchange Server auth

    Permission groups set to Exchange servers Legacy Exchange Servers and anonymous

    The outbound proxy transport uses same settings as default frontend except permission groups set to exchange servers only

    Let me know what other info you need if that's not what you're looking for

  • I'd just figured out something similar after seeing what one of my colleagues had setup for printers to do scan to email.

    I've setup a very tight and limited relay on port 25 and will see if that cures the problem. Can check the logs tomorrow night as I'm in an all day meeting tomorrow (kill me now please)!

    Thanks for you help, I'll let you know if that cured it or not.

  • Your very welcome. :)  I think that we setup a transport rule allowing the web server to relay personally.
Sign In or Register to comment.