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

office365 shared mailbox read

Hi all,

just a sum-up about the e-mail retriving of an office365 shared mailbox. The fact is than with osTicket 1.10 I was unable to configure the good imap connection.

I wrote an hack to fix this issue based on this blog entry :
http://blog.runnane.no/2016/03/accessing-shared-mailboxes-in-office365-with-php/

to fix it, please open include/class.mailfetch.php
and replace the open function with the following code :


function open($box='INBOX') {

if ($this--->mbox)
$this->close();

/*$args = array($this->srvstr.$this->mailbox_encode($box),
$this->getUsername(), $this->getPassword());*/
$args = array('{outlook.office365.com:993/imap/ssl}Inbox',$this->getUsername()."\support", $this->getPassword(),OP_READONLY,
1,
array('DISABLE_AUTHENTICATOR' => 'PLAIN'));

// Disable Kerberos and NTLM authentication if it happens to be
// supported locally or remotely
if (version_compare(PHP_VERSION, '5.3.2', '>='))
$args += array(NULL, 0, array(
'DISABLE_AUTHENTICATOR' => array('GSSAPI', 'NTLM')));

$this->mbox = @call_user_func_array('imap_open', $args);

return $this->mbox;

}

]]>


In my case "support" is my shared mailbox name : support@company.com

It's not a perfect hack but useful !

Comments

  • I've moved this thread to Mods and Customizations.

    osTicket does not support SHARED mailboxes, but thanks for posting your mod.  Someone else may find it useful. :)

    As a side note to anyone reading this in the US:  If your organization is required to follow HIPAA, shared mailboxes violate HIPAA regs.

  • Hi, if i use this mod the whole site does not work anymore!! HTTP ERROR 500.


  • edited March 10

    Found the problem

    second line : if ($this--->mbox) should be if ($this->mbox)

    last line: ]]> should be left away..

    After that i get this in the mail settings:

    Certificate failure for 40.101.43.242: Server name does not match certificate: /C=US/ST=WASHINGTON/L=Redmond/O=Microsoft Corporation/CN=outlook.com


    We use ip adress of outlook.office365.com because there is something with the dns.

Sign In or Register to comment.