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

Fetching IMAP+SSL mail on Outlook 365

Hello,

I notice my mails get fetched from 3 to 10 minutes even though I set it to fetch every 1 minute. I did some research on your site and found quite a few posts related to this but I am incapable of putting it together, yes I have also seen the page on configuring mail fetching with cron which is what let me done the path to know that the solution lies in a) setting up cron to run as a windows task or b) setting up autocron.

OS: windows server 2012
PHP: 5.6


PHP path -> S:\wamp64\bin\php\php-5.6.36\php.exe 
osticket cron path -> S:\wamp64\www\osticket\api\cron.php

my cron.php file is edited to add ->  * * * * * nobody /bin/php/php-5.6.36 /www/osticket/api/cron.php

and is shown below:

<?php
/*********************************************************************
    cron.php

    File to handle LOCAL cron job calls.

    Peter Rotich <peter@osticket.com>
    Copyright (c)  2006-2013 osTicket

    Released under the GNU General Public License WITHOUT ANY WARRANTY.
    See LICENSE.TXT for details.

    vim: expandtab sw=4 ts=4 sts=4:
**********************************************************************/
@chdir(dirname(__FILE__).'/'); //Change dir.
require('api.inc.php');

if (!osTicket::is_cli())
    die(__('cron.php only supports local cron calls - use http -> api/tasks/cron'));

require_once(INCLUDE_DIR.'api.cron.php');
LocalCronApiController::call();
* * * * * nobody /bin/php/php-5.6.36 /www/osticket/api/cron.php
?>


Please help me to get this working



Comments

  • Version of osTicket?

    So cron is running the call once a minute.

    Go to: Admin panel -> Emails -> Emails -> your email(s) collecting email.
    What to you have the "Fetch Frequency" set to?
  • frequency is 1 minute.
    Please tell me if my config is done correctly
  • I have spent a lot of time troubleshooting this and it does not work! in fact, I don't see where in the cron.php it should call to connect to the imap server and fetch the email.
    I even try putting it in a batch file to run and it still does not work. I does not even register in wireshark to reach out to connect to anything.

    What gives - again I see lots of troubleshooting here on forum with same think and no conclusions??
    Who can help - I should be able to at least run a batch file and see connection reached out to email server, and no I do not have any firewall.
  • Is this fresh installed? Have you got to work before and stop working?
  • Not so fresh of an install; I am just tired of people emailing helpdesk and we are not seeing emails until  3 to 10 minute later - so I need to see tickets by email withing 1 to 2 min of creation... this is why I need to cron or whatever fetches the emails to be able to work by batch or task manager... never  got it to work before.
  • You still have not told us what version of osTicket you are running.

    Q: Please tell me if my config is done correctly
    A: you have not shown us your config so I am not sure how you expect us to do so.

    Q: I don't see where in the cron.php it should call to connect to the imap server and fetch the email.
    A: The calls are not in cron.php.  Cron triggers anything that has a signals::cron this includes things like collecting email, clean up routines, etc.

    Q: What gives - again I see lots of troubleshooting here on forum with same think and no conclusions??
    A: posts kinda mush together for me because I see so many of them, but I don't feel the same way.

    You should probably show us screen shots of your email settings (feel free to remove/anonymimize the email and server address if you want).
  • ntozier

    My configs are ok in OS ticket, I dont see where I can easily send you a screenshot in this thing.
    The helpdesk is working fine for some time now --- all I want to know is how I can get the mail to fetch
    every minute.
  • not that easy ramrajone, I have been there a million times.
    Fact is this osticket and cron job has had issues for years, if I run "S:\wamp64\bin\php\php-5.6.36>php S:\wamp64\www\OSTicket\api\cron.php" from the cli there is no reason why this should not fetch emails from outlook.office365.com on port 993, in fact there is no manual command I can run to make this happen BUT I do know that the fetch works from within the program, I just cant control it, whether I set it to run 1 minute or 10 minute, it just decides to run when it wants but at least autocron runs when I login.

    guys - I have been through your pages, at least 20 different threads with this same problem!!!

    If Osticket can sole this one long standing problem with fetching emails, especially with office365, it will be ace!

    Thank you for trying to assist me, you guys are a good set of guys! 
  • I've never had a problem with running cron.php for osTicket to collect mail from O365 since we migrated to them. Prior to the migration about 1.5 years ago, we ran Exchange for many years doing the same thing from most versions of osticket from 1.6+.

    We use Windows Taskscheduler to run cron.php every minute.
    We use a 2 minute Fetch Frequency in osTicket Admin panel -> Emails -> Emails -> my main email with a Emails per fetch of 10.  It collects email every 2 minutes like it should.

    Since you still haven't shown us your actual settings are or told us what version of osTicket you are running there isn't anything else that I can do to help you.

Sign In or Register to comment.