Best way to avoid delay receive/send emails

Shood

Well-Known Member
Aug 12, 2015
85
17
133
Middle East
cPanel Access Level
Root Administrator
Hello,
This is not about a specific email issue, it's about a perfect strategy for email configuration if possible.
I receive some complaints from my customers about delay of receiving or sending some messages (only customers who have a large amount of emails)

Complaints like:
"Someone (let’s say is: John) sent me an email about an urgent order from 15 hours ago, didn’t received yet"
I login his cPanel (based on his permission) to find that he receive a lot of messages correctly, and when I send him a test mail from me it arrives quickly.

What embarrasses you is that “John” has already sent his message to [email protected]_com & [email protected]_com, emp2 has received it but emp1 didn’t.
Also, emp1 has received from John yesterday, today and in the future except this message even to spam or junk folder.
In WHM ->Mail Delivery Reports I found this message is accepted with a green mark and 2 or 3 spam score, may this message arrives after 20 hours or more, and sometimes doesn’t arrive at all.

Similar when sending in some cases, the message stuck in the queue system for more than one or two days!
Sometimes I ask my customer to use his own Gmail to send or receive, of course this isn’t a professional service to provide especially for a large company that have a worldwide business.

While SpamAssassin is one, Auto delete spam: off, Spam box: enabled, what can I do more? I’ve read a ton of articles about Spam, Exim configuration on cPanel K.B or other sites but I still facing some cases like that each day.

I’m sorry for this long post but I’m wondering if there is a perfect way or even a paid plugin or service can be installed to improve email service on my server.
I contacted cloudflare.com to know if they can sell me a service to achieve that they responded with: NOT.

Any suggestion will be appreciated.
Thank you.
 

keat63

Well-Known Member
Nov 20, 2014
1,916
263
113
cPanel Access Level
Root Administrator
How was the mail sent originally.

Did John send these mails seperately, or did he send it as one message with multiple recipients.

If you can see email to emp2, but not emp1, then i'd suggest taking a look in the exim logs and see if you can determine what's going on.

Also, what about Greylisting, do you have this configured, as I found this would cause similar issues for me.
 

Shood

Well-Known Member
Aug 12, 2015
85
17
133
Middle East
cPanel Access Level
Root Administrator
How was the mail sent originally.

Did John send these mails seperately, or did he send it as one message with multiple recipients.

If you can see email to emp2, but not emp1, then i'd suggest taking a look in the exim logs and see if you can determine what's going on.

Also, what about Greylisting, do you have this configured, as I found this would cause similar issues for me.
Message sent with two recipients, but some times emp1 doesn't receive from John a message with only emp1 recipient.
I looked in the exim log "exigrep Johnxx /var/log/exim_mainlog" there is nothing strange.
About Greylisting, no I haven't configured anything before, do you suggest any configuration?

However, this is a one example out of many cases, what I'm looking for is a plugin/service can improve email service in general.
Thanks
 

keat63

Well-Known Member
Nov 20, 2014
1,916
263
113
cPanel Access Level
Root Administrator
Greylisting works by rejecting the email initially, then accepting it a little later when the sending server retries.
This is to try and reduce spam.

I've found that the resend from the other server doesn't always happen as fast as i'd like and can often create delays in delivery.
Sometimes the retry never even happens.

Personally, I'd suggest disabling greylisting if you have it configured.
However, that's only my personal opinion.
 
  • Like
Reactions: Shood

Shood

Well-Known Member
Aug 12, 2015
85
17
133
Middle East
cPanel Access Level
Root Administrator
Greylisting works by rejecting the email initially, then accepting it a little later when the sending server retries.
This is to try and reduce spam.

I've found that the resend from the other server doesn't always happen as fast as i'd like and can often create delays in delivery.
Sometimes the retry never even happens.

Personally, I'd suggest disabling greylisting if you have it configured.
However, that's only my personal opinion.
Your opinion is valued!, Greylisting is already off
Thank you @keat63
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Hello,

Could you let us know the output from the following command for one of the affected messages?

Code:
exigrep "SUBJECT" /var/log/exim_mainlog
Replace subject with the actual subject of an affeced message, and remove real domain names and IP addresses in the output.

Thank you.
 

Shood

Well-Known Member
Aug 12, 2015
85
17
133
Middle East
cPanel Access Level
Root Administrator
Thank you Michael, I'm sorry for delayed reply.
I've already added sender domain to the white list of my customer in his cPanel so, he receiving emails now.
However, this is below the output, I replaced real addresses to be similar as possible to the listed examples in my 1st post. This report is generated today.
Also, this subject is the same of the affected message was sent in 19-6 and fixed (by whiting list) ,anyway that's all thing returned by exim_mainlog
=========
Code:
root [/]# exigrep "Re: June -order -2018//PIDBOTNS180601" /var/log/exim_mainlog
2018-06-24 11:12:46 1fX2wg-0006FQ-3f <= [email protected]_com H=(GAMEBOX) [MyCus_IP]:1452 P=esmtpsa X=TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128 CV=no A=dovecot_login:[email protected]_com S=283793 id=004f01d40bac$42b6be60$c8243b20$[email protected] T="RE: June -order -2018//PIDBOTNS180601" for [email protected]_com
2018-06-24 11:12:46 1fX2wg-0006FQ-3f == |/var/run/spmtp $sender_address $recipients <system-filter> routing defer (-1): system_filter_pipe_transport is unset
2018-06-24 11:12:46 1fX2wg-0006FQ-3f Sender identification U=MyCus_cPanelUserName D=MyCusDOMAIN [email protected]_com
2018-06-24 11:12:46 1fX2wg-0006FQ-3f SMTP connection outbound 1529838766 1fX2wg-0006FQ-3f MyCusDOMAIN [email protected]
2018-06-24 11:12:51 1fX2wg-0006FQ-3f Sender identification U=MyCus_cPanelUserName D=MyCusDOMAIN [email protected]_com
2018-06-24 11:12:51 1fX2wg-0006FQ-3f SMTP connection outbound 1529838771 1fX2wg-0006FQ-3f MyCusDOMAIN [email protected]
2018-06-24 11:12:51 1fX2wg-0006FQ-3f => [email protected]_com R=virtual_user T=dovecot_virtual_delivery C="250 2.0.0 <[email protected]_com> CEuLK7N8L1v6XQAA3zlVNA Saved"
2018-06-24 11:12:59 1fX2wg-0006FQ-3f => [email protected] R=dkim_lookuphost T=dkim_remote_smtp H=mxn.mxhichina.com [SenderHostIP] C="250 Data Ok: queued as freedom"
2018-06-24 11:16:09 1fX2wg-0006FQ-3f Completed
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Hello @Shood,

In that example, the logs show the message delivery completed within a few minutes and there's no delay as reported in your original post.

Thank you.
 
  • Like
Reactions: Shood

sparek-3

Well-Known Member
Aug 10, 2002
2,042
230
368
cPanel Access Level
Root Administrator
While I agree that I don't really see anything causing issues in this log entry. But it is a bit strange that the message shows as being accepted by the remote server at 2018-06-24 11:12:59 but the message ID isn't Completed until 2018-06-24 11:16:09.

That's a little bit over 3 minutes. Not really a lot of time. And it doesn't really look like that it did anything in those 3 minutes. But just strange that there's 3 minutes before the message transaction is completely closed.
 
  • Like
Reactions: Shood