The most convenient method to automatically poll new emails on Yunohost is scheduling recurring tasks via crontab. Alternatively, the internal auto-cron feature can be activated – but it is only triggered by staff’s activity.
- SSH into your server and type the following (note you need to be using an account with sudo access):
sudo crontab -e -u www-data
- In the text editor that comes up, enter the following:
*/2 * * * * php /var/www/html/api/cron.php > /dev/null 2>&1
- Then save and exit, and in osTicket Admin > Emails > Settings ensure Email fetching is enabled, but fetch on auto-cron is not.
This will poll your mailbox every 5 minutes (change the /5
to another number if you want to change this) and the > /dev/null 2>&1
part at the end ensures you don’t get an email every time the cron job runs.
See also:
https://docs.osticket.com/en/latest/Getting%20Started/POP3-IMAP%20Settings.html