I have set-up osticket on Windows Server 2003, using WAMP stack 2.2

(Apache 2.2.22, PHP 5.4.3, MySQL 5.5.23). Have installed the IMAP module for PHP, and its all running fine. Set-up the cron and that runs without errors. I am having a couple of issues though:

1. Nothing is collected from the Exchange server when the cron runs, regardless of how many emails (new or old) are there to fetch. I beleive this may be due to looking in the default folder (Inbox) which I am currently having a permission battle with. So therefore:

2. If I only want to collect a certain folder, is there functionality within osTicket to collect just a particular folder?

I wrote a small custom script in PHP (outside OsTicket) and it runs and connects fine to the server using imap functionality and returns the folders and mail etc. (also when filtering just the folder I want). Is there a way we can adjust the code manually to lookup a particular folder only without breaking the rest of the functionality?

I have found the answer to the question.

For those looking at changing the default folder to poll from (currently INBOX) find the file 'class.mailfetch.php' located in the includes folder.

Look for the code:

function open($box='INBOX') {

Change the INBOX to a variable, or set it straight there. For example, replace the above line of code, with the following 2 lines:

global $custom_box = 'Public Folders/IT/Helpdesk';

function open($box=$custom_box) {

or

function open($box='My Folder/OsTicket') {

Judging by the comments and variable placement, this appears to be functionality OsTicket will release with a more user friendly approach in the near future!

IMPORTANT NOTE:

As of Exchange 2007 and onwards, IMAP is unable to access public folders.

As a quick foot-note. The issue with the first part of my question was due to multiple mail accounts spread across a couple of servers in my environment.

While public servers replicate across all servers in the environment, the INBOX folder for the account I was using only resided on one of the folders, therefore was unable to be polled.

Again public folders are an issue with Exchange 2007 onwards so keep that in mind when using public folders.

4 days later

Thank you for the followup posts - useful info for others!

We're indeed planning on providing ability to specify fetch folder(s) in the future.

Thanks,

6 years later

I know this is a really old post ... but was this ever implemented in the codebase?

If not, does anyone know if there are any problems using the mod with GSuite?

david

Write a Reply...