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

[resolved] Using Office 365 Mail Validated in OsTicket but is not fetching the mail at all.

This is a new install on CentOS 7

Originally I had some issues with SELinux blocking my attempts to authenticate mail. I have resolved those and verified that the firewall is not my issue by testing with it off and on in Centos.

This is behind a simple router using port forwarding to get to the server. Ports for http and sql are forwarded.

I typically will rule out all things before looking for help but, this has me stumped. I will start looking at my version to see if I need to  change my PHP version or something.

This is my system Info:

osTicket Versionv1.10 (901e5ea) Up to date
Web Server SoftwareApache/2.4.6 (CentOS) PHP/5.4.16
MySQL Version5.5.52
PHP Version5.4.16
PHP Extensions
gdlib Used for image manipulation and PDF printing
imap

Used for email fetching       

xml XML API
xml-dom Used for HTML email processing
json Improves performance creating and processing JSON
mbstring Highly recommended for non western european language content
phar Highly recommended for plugins and language packs
intl Highly recommended for non western european language content
fileinfo Used to detect file types for uploads
APCu Improves overall performance
Zend Opcache Improves overall performance
PHP Settings
cgi.fix_pathinfo "1" is recommended if AJAX is not working
date.timezone Setting default timezone is highly recommended
Database Information and Usage
Schemaosticket1 (localhost)
Schema Signature98ad7d550c26ac44340350912296e673
Space Used2.45 MiB
Space for Attachments0.06 MiB
TimezoneCST (Interpreted as America/Chicago)

Comments

  • Try upgrading your PHP to 5.6. I had a similar fetch issue until I upgraded my PHP
  • Upgraded. still no luck

    About this osTicket Installation

    Server Information
    osTicket Versionv1.10 (901e5ea) Up to date
    Web Server SoftwareApache/2.4.6 (CentOS) PHP/5.6.30
    MySQL Version5.5.52
    PHP Version5.6.30
    PHP Extensions
    gdlib Used for image manipulation and PDF printing
    imap Used for email fetching
    xml XML API
    xml-dom Used for HTML email processing
    json Improves performance creating and processing JSON
    mbstring Highly recommended for non western european language content
    phar Highly recommended for plugins and language packs
    intl Highly recommended for non western european language content
    fileinfo Used to detect file types for uploads
    APCu Improves overall performance
    Zend Opcache Improves overall performance
    PHP Settings
    cgi.fix_pathinfo "1" is recommended if AJAX is not working
    date.timezone America.Chicago
    Database Information and Usage
    Schemaosticket1 (localhost)
    Schema Signature98ad7d550c26ac44340350912296e673
    Space Used2.49 MiB
    Space for Attachments0.06 MiB
    TimezoneCST (Interpreted as America/Chicago)
  • How are you attempting to collect mail?  POP?  IMAP?
    Have you enabled that on the account in Exchange?  
    I don't know about O365 but in 2008+ you have to enable either in Exchange as they are not on by default. (It should be something like login into ECP and go to the account.  Click on Mailbox Features.  Scroll down to IMAP and POP3)

  • Imap and Pop are enable and verified. I have also logged into the account. I am the exchange admin and have verified them from the Office365 console. IMAP4 and Pop. TLS is used.

  • Is there a way I can turn up logging to see if it is attempting to get mail? I guess I will also try wireshark and tap the network.


  • Admin panel -> Settings -> System
    Default Log Level:

    I don know if it shows attempts to connect to the mail server... but it might.
  • http://osticket.com/forum/discussion/comment/110099/#Comment_110099

    Not sure it will help but I searched for forums and this one may point you in the right direction.
  • No luck so far. it can use SMTP over the account with no issue. I am downgrading to php 5.5 and will test there. I think the Main issue is SSL and TLS. But I should not have to install a cert to fetch mail on a dedicated account. There is no TLS option either. So I will try here.  If this does not work then I will make an SMTP relay server but, I think that is a silly solution for 1 server.
  • Can you provide a screenshot of your settings but blocking out personal details? 
  • Are you using ssl:\\ in the host name?

    Also see this:
  • This is what I get when I try that.

    Can't open mailbox {ssl:\\outlook.office365.com:993/imap/ssl/novalidate-cert}INBOX: invalid remote specification

  • My issue is getting mail from the account. I also created a gmail account and lowered the security on it to allow pop. This account is not getting the mail either. I do not have an issue sending mail.
    OSmail.png
    1536 x 1110 - 77K
  • edited February 10
    Not sure how much help I would be as this is not my field of expertise but from reading the link ntozier sent, I see at the bottom where there is a link that someone posted a work around. It seems from reading what everyone is saying is that peer name verification is either a new addition or is now active in a certain edition of PHP (Sorry I do not recall exact number) and because of that it causes an issue. Now, I cannot say this is your fix, but what I can say is start there. Read the whole thread on github per Ntozier's link and then look at this link below (which is at the bottom of the thread.).

    https://github.com/osTicket/osTicket/commit/4f68aeb3fd746a18c598689b8b428db49faa7613

    As for your issue with can't open mailbox, invalid remote specification, maybe a setting is incorrect? Maybe try // instead of \\ - I am only offering troubleshooting steps so forgive me if I am not helpful in this area.
  • I resolved this. it turned out to be my ISP blocking some traffic inbound. I did not see it originally because it was outside my router. after that I went and restored my VM to when I had the most up to date packages, turned on the cron fetch setting and it all works now.

    Thank you everyone for your support. I do feel really confident about my build now. I also learned a lot since I am not a Linux developer.

  • Next is looking into the need to always have a user logged in.

  • Great.  Glad to hear it.  I'll close this up and mark it resolved.
This discussion has been closed.