Mail not synchronising

#1

Hi
Trudesk v1.0.5
CentOs 7.6

I have mailer pointing to Office365 which is working but the incident tickets are only appearing when I restart trudesk.

Log is showing the mails are being read

1/18 19:20:20 [8797] - ‘[[34mdebug’[[39m: Processed 2 Mail > Ticket

Mail server is showing the incoming mails as being read but no new tickets are raised.

Any ideas?

Kind regards

#2

Trudesk polls the IMAP server every 10 minutes. This will be configurable to a desired interval in the next release.

#3

I am able to see the poling interval of 10 minutes. After a restart of trudesk the mails are synced OK for the first interval. Further checks see the logs updating with “Processed x mail > Ticket” but no new tickets are actually raised.

#4

There are a couple of things to note here:

  • If Create Account is not enabled under MailCheck settings, the from address must match a trudesk user email address. If it is enabled, an account will get created for the user with the from address as the username.
  • If for any reason the parser fails to parse the body of the email, it will mark the email as read and drop processing it. (I do not see this as the case if the first interval is processing the mail)

There were some event leaks prior to v1.0.5, some of these changes may cause the issues you’re experiencing. I will try to reproduce tonight and push a fix if need be.

Error in mail server
#5

I have confirmed it is working correctly with an on-premise exchange server and zoho mail. What mail provider are you using, so I can test with that as well?

#6

Resolved. Not sure of the exact remedy but we rebuilt on a new AWS instance and we can now sync emails.

kind regards

#7

hi i am facing the same issue on Raspberry PI3, Nodejs v10.15.3
I ve debuged the
mailCheck.js
and discovered that
129 …mailCheck.Imap.on(‘end’, function () …
and
203 f.on(‘end’, function () {

are never called.

So with this patch it s ok now :

i replaced the line 197 : mailCheck.messages.push(message)

With


if (_.size(results) === mailCheck.messages.length){
handleMessages(mailCheck.messages)
mailCheck.Imap.destroy()
}


kind regards

1 Like
#8

it s possible you get also this kind of error :
TCP.onStreamRead (internal/stream_base_commons.js:94:17), code=DEPTH_ZERO_SELF_SIGNED_CERT,

because your imap server use a self signed cert

There is a lot of discussion about this solution, but for me it s ok :
insert after line 30 mailCheck.inbox = []
process.env.NODE_TLS_REJECT_UNAUTHORIZED = “0”;

and restart the trudesk service

kind regards