Page 1 of 1

Missing Emails in Pop3 Fetching Process

Posted: Tue May 24, 2016 6:42 pm
by rconstant
Hi

We have deployed a hesk enviroment in an internal Windows 2012 Server, using IIS, and MySql, also we have an office 365 Email account created for the Fetching process.

the configuration is :

pop3 Fetching: ON
Pop3 host: Outlook.office365.com
pop3 port: 995
TLS Protocol ON
Keep a Copy OFF
Pop3 Username: email@mydomain.com
Pop3 Password: ********

The test pop3 conection on the Email Tab, works properly.

But, we have realized that not all the emails are being loaded into a tickect table, also, all the Emails are being erased in the Fetching process on the Office Account.

Re: Missing Emails in Pop3 Fetching Process

Posted: Tue May 24, 2016 8:29 pm
by Klemen
Hesk will ignore emails in the following cases:

1. sender email address is missing ("From:" header); this shouldn't be an issue

2. emails with no message (body) if you have "Require message" option CHECKED in Admin > Settings > Email tab > Other (uncheck to allow emails with no message)

3. if it detects a returned or "do not reply" email, for example emails from "noreply@example.com", "Delivery Status Notification" subjects etc.

To prevent this you will need to delete this code from file inc/pipe_functions.inc.php

Code: Select all

	if ( hesk_isReturnedEmail($tmpvar) )
	{
		return hesk_cleanExit();
	}
4. if it detects a duplicate email (email with the same subject and message within 5 minutes)

To prevent this you will need to delete this code from file inc/pipe_functions.inc.php

Code: Select all

	if ( hesk_isEmailLoop($tmpvar['email'], $message_hash) )
	{
		return hesk_cleanExit();
	}


What I recommend is to have two email accounts setup with your email provider:

1. your main account: support@example.com
2. your copy account: support-copy@example.com
3. setup your main account to automatically copy all emails sent to support@ to support-copy@
4. have HESK fetch emails from one account: support@example.com

This way you have a copy of every email sent at support-copy@ to make sure nothing is missing. Also, the copy email can then be used to troubleshoot and detect exactly why Hesk ignored it.

Re: Missing Emails in Pop3 Fetching Process

Posted: Wed May 25, 2016 3:26 pm
by rconstant
Hi, the problem has been solved, with the recomendations #3 and #4 .

The recomendations #1 and #2 doesn't apply in our case.

We didn't know about the 5 minutes policy for duplicated emails.

thus, we were making test with the same subject, in less than 5 minutes.

Thankyou for your quick response!!!!!!!!!


We recomend a message warning, on the options settings, about the pop3 fetching 5 minutes policy.

Re: Missing Emails in Pop3 Fetching Process

Posted: Wed May 25, 2016 3:48 pm
by Klemen
#4 is actually set in Settings Email tab under "Email Loops".

I will work on improving logging of reasons why emails are discarded so this is easier to troubleshoot in the future.