Ok I think I have this working,
After looking at the database and how the cron works:
note that run ID 19 is "download tickets" as below:
mysql> SELECT * FROM cron_tasks WHERE `id` = 19;
+----+--------------+-----------------+------------------+------------------------------------------------------------------------------------+---------+----------+
| id | key | plugin_dir | name | description | is_lang | type |
+----+--------------+-----------------+------------------+------------------------------------------------------------------------------------+---------+----------+
| 19 | poll_tickets | support_manager | Download Tickets | Connects to the POP3/IMAP server to download emails and convert them into tickets. | 0 | interval |
+----+--------------+-----------------+------------------+------------------------------------------------------------------------------------+---------+----------+
1 row in set (0.00 sec)
mysql>
Then I found in another thread to look for cron_logs without a finish time:
mysql> SELECT * FROM `log_cron` WHERE `run_id` !=0 AND `end_date` IS NULL ORDER BY `start_date` DESC;
+--------+-------+----------------------------------+----------------------------------------------------------+---------------------+----------+
| run_id | event | group | output | start_date | end_date |
+--------+-------+----------------------------------+----------------------------------------------------------+---------------------+----------+
| 19 | | bfcafb10b07f574e429303fd1b4f46a8 | Attempting plugin cron for support_manager poll_tickets. | 2015-02-23 09:20:02 | NULL |
| 19 | | 5706097d22923690b0d0eed4effd07dd | Attempting plugin cron for support_manager poll_tickets. | 2015-02-23 03:20:01 | NULL |
| 19 | | d9ac43b45eee404ef29fe0a03478f484 | Attempting plugin cron for support_manager poll_tickets. | 2015-02-22 20:55:01 | NULL |
| 19 | | 2aa266c0262becd70a1ea157fd6c8368 | Attempting plugin cron for support_manager poll_tickets. | 2015-02-22 10:35:02 | NULL |
| 19 | | a303667c33f8715ec85957819c00f42a | Attempting plugin cron for support_manager poll_tickets. | 2015-02-22 04:30:02 | NULL |
+--------+-------+----------------------------------+----------------------------------------------------------+---------------------+----------+
5 rows in set (0.01 sec)
mysql>
Then deleting them:
mysql> DELETE FROM `log_cron` WHERE `run_id` !=0 AND `end_date` IS NULL ORDER BY `start_date` DESC;
Query OK, 5 rows affected (0.04 sec)
mysql> SELECT * FROM `log_cron` WHERE `run_id` !=0 AND `end_date` IS NULL ORDER BY `start_date` DESC;
Empty set (0.01 sec)
Now when the cron runs I can see the connection to google imap
root@blesta:~# tcpdump -npi eth0 port 993
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
15:35:01.840128 IP 192.168.10.114.42386 > 74.125.136.109.993: Flags [S], seq 2150746609, win 29200, options [mss 1460,sackOK,TS val 2057746 ecr 0,nop,wscale 7], length 0
15:35:01.846315 IP 74.125.136.109.993 > 192.168.10.114.42386: Flags [S.], seq 2080383863, ack 2150746610, win 42540, options [mss 1380,sackOK,TS val 1611920504 ecr 2057746,nop,wscale 7], length 0
15:35:01.846361 IP 192.168.10.114.42386 > 74.125.136.109.993: Flags [.], ack 1, win 229, options [nop,nop,TS val 2057747 ecr 1611920504], length 0
15:35:01.846801 IP 192.168.10.114.42386 > 74.125.136.109.993: Flags [P.], seq 1:306, ack 1, win 229, options [nop,nop,TS val 2057748 ecr 1611920504], length 305
15:35:01.852916 IP 74.125.136.109.993 > 192.168.10.114.42386: Flags [.], ack 306, win 341, options [nop,nop,TS val 1611920511 ecr 2057748], length 0
15:35:01.854500 IP 74.125.136.109.993 > 192.168.10.114.42386: Flags [.], seq 1:2737, ack 306, win 341, options [nop,nop,TS val 1611920512 ecr 2057748], length 2736
15:35:01.854549 IP 192.168.10.114.42386 > 74.125.136.109.993: Flags [.], ack 2737, win 271, options [nop,nop,TS val 2057750 ecr 1611920512], length 0
........ output cut
77 packets captured
77 packets received by filter
0 packets dropped by kernel
root@blesta:~#
I can also see the email import is now working :-)
Please see attached / below the final working settings for google apps hosted domain IMAP, don't forget to enable IMAP support under your google account also.
Regards, Daniel