I have osTicket installed on one server and mail defined into another server. Both are Linux Debian 10 servers.
In osTicket, mails settings are configured for Fetch and Auto-Cron.

I have read the guide, but I admit I did not understand how to configure it to fetch mails.
Should I start the script with cron? Which?
osTicket/upload/api/cron.php ?

I'm running it every 5 minutes, but the emails aren't coming in yet.
Obviously the credentials are correct and I can access the mailboxes with a webmail.

  • RBGE replied to this.

    WhiteTiger Once you've got all the correct settings in the Admin config of osTicket, you just need to get the cron job to run at a specified interval. Assuming you're using a Linux server of some sort, the easiest way to do this is to run the script as the user the webserver runs as. Assuming this is www-data:

    sudo crontab -e -u www-data

    Will allow you to edit the crontab for the user (replace www-data with the username your webserver runs as if it's something different). Simply enter the following and save it:

    */2 * * * * php [path to osticket directory]/api/cron.php > /dev/null 2>&1

    (replace the first 2 with the frequency in minutes you want email to be polled). If you're using Windows, you'd want to set up a scheduled task to run the same.

    Nothing!

    • 1. osTicket (v1.15.1 (fe1d1f8) )
    • 2. Debian 10 Server.
    • 3. Web Server Software Apache/2.4.38 (Debian)
    • 4. Versione MySQL 10.3.27 (MariaDB)
    • 5. Versione PHP 7.4.14

    These are the two configurations.

    The email are managed into another server Debian from Plesk + Postfix + Dovecot.
    This is the command in cron (www-data)

    */1 * * * * php /var/www/html/support.MYDOMAIN.TLD/public_html/osTicket/upload/api/cron.php > /dev/null 2>&1 #Fetch email da osTicket

    ntozier
    The problem is not with GMAIL which I only use for sending and it works.
    The other mailboxes, as I wrote, are on a Debian 10 server, managed with Plesk, Postfix and Dovecot.

    ntozier
    No, the credentials are correct.
    In my opinion it cannot fetch mail from another server if it is managed with Plesk, but I don't know how to diagnose it without even having the logs.
    Now I am trying to install Postfix on this server.
    For oSTicket is there any difference if the mailboxes are in MBox or Maildir format?

    Plesk is a web control panel product that lets you add in modules for controlling certain parts of a server. Saying that osTicket cannot connect to a mail server if someone is using Plesk to allow simple users configuration is sort of like saying that you cannot connect to a linux server if it is running a desktop UI. (In English Plesk is a web UI, as opposed to a desktop UI.)

    Your choices for getting email into osTicket are clearly outlined in the documentation here:
    https://docs.osticket.com/en/latest/Getting%20Started/Email%20Settings.html

    To summarize your choices are: Piping or Polling.

    If you use Polling then you would use the POP or IMAP protocol with a scheduled cron.php call.
    The format you choose to use for your mailserver to store mail [mbox or maildir] is largely irrelevant to osTicket.

    Write a Reply...