Connect. Communicate. Collaborate. Securely.

Home » Kerio User Forums » Kerio Connect » Problems sending mail through Kerio - advice on using another SMTP server on the LAN?
  •  
dave2ic

Messages: 8
Karma: 0
Send a private message to this user
We are running Kerio Connect on a Windows Server 2012 Essentials Server and been having problems for some time now with "4.4.2 Connection lost" timeouts sending email. This is not only using DNS - we have tried relaying through our ISP and even setup a free SendGrid account but experience similar problems with both.

We have logged a case with Kerio support and have even had them remotely looking at our server, but they have been upable to offer any help.

The problem in the main is with large-ish email attachment, and obviously a contributing factor here is we are on ADSL which has a slow upstream speed (around 800kbps). However, the old Exchange Server we previously used on the same connection has no problems. And while emails with attachments 10MB+ are a particular problem, often much smaller emails experience the same problems.

There are no problems with receiving email.

I'm at a point now of thinking I need to bypass Kerio's SMTP server and try an alternative SMTP server on the LAN for Kerio to relay through, and was just looking for some advice on doing this.

I'm inclined to think I should setup another SMTP server on another PC on the LAN - or could I install another SMTP server on the server and use a different port than port 25?

I see there are a number of free SMTP server options available for Windows. Does anyone have any recommendations for my purposes - just to act an outgoing relay server? Or should I just use the Windows SMTP service and set it up for relay?

Thanks for any advice.





  •  
freakinvibe

Messages: 1467
Karma: 54
Send a private message to this user
Is there a firewall between your Kerio Connect server and the Internet? Many firewalls nowadays offer "SMTP" proxy functionality which is nothing else than a mail relay and some checks. So you could use that one.

It would still be interesting to solve the underlying problem. Do you have any debug logs with "SMTP Client" switched on? These could show why and where you get the timeouts.

Dexion AG - The Blackberry Specialists in Switzerland
http://www.dexionag.ch
  •  
j.a.duke

Messages: 337
Karma: 10
Send a private message to this user
It has been a while since I've used a connection with that slow an upstream speed, however, I don't think that Kerio is at fault. I've found the SMTP implementation to be solid and standards-compliant.

Could it be that the upstream DSL channel is having trouble? I've seen that occur and it isn't until there's a load put on that channel that things surface. Might be worth having that looked at, but do that after posting a snapshot of your debug log (as freakinvibe suggested) with the SMTP logging turned on.

As for why the Exchange server worked and Kerio doesn't, I'd suspect something "unique" in the Exchange SMTP implementation.

Post that info, we'll look at it and hopefully have some suggestions regarding how to fix the problem.

Cheers,
Jon
  •  
dave2ic

Messages: 8
Karma: 0
Send a private message to this user
One thing I forgot to mention is that often when we get these '4.4.2. Connection Lost' errors, the recipient actually still receives the email. But because Kerio thinks it hasn't been delivered, the email stays in the queue and can be delivered multiple times.

This is what happened when I did a test with the SMTP Client turned on in the Debug logs, as you advised.

The first email had a 9MB attachment and was delivered with no problems. Then I tried 15MB attachment, and while the message was delivered we got the '4.4.2. Connection Lost' error in the queue. This was the debug log (I've changed the email addresses):

29/Apr/2016 07:21:27][18400] {smtpc} Sending email to SMTP server aspmx.l.google.com, delivering mail from <Sender<_at_>SenderDomain.co.nz>
[29/Apr/2016 07:21:27][18400] {smtpc} Connecting to server aspmx.l.google.com (64.233.189.26:25) using local interface 0.0.0.0 ...
[29/Apr/2016 07:21:27][18400] {smtpc} Connected to SMTP server aspmx.l.google.com
[29/Apr/2016 07:21:28][18400] {smtpc} Received greeting: 220 mx.google.com ESMTP ua9si17474453pab.25 - gsmtp
[29/Apr/2016 07:21:28][18400] {smtpc} Sending EHLO
[29/Apr/2016 07:21:28][18400] {smtpc} Switching connection to TLS
[29/Apr/2016 07:21:29][18400] {smtpc} Sending EHLO
[29/Apr/2016 07:21:29][18400] {smtpc} Sent MAIL command
[29/Apr/2016 07:21:29][18400] {smtpc} Got reply: 250 2.1.0 OK ua9si17474453pab.25 - gsmtp
[29/Apr/2016 07:21:29][18400] {smtpc} Sent RCPT TO: <Recipient<_at_>RecipientDomain.co.nz>
[29/Apr/2016 07:21:30][18400] {smtpc} Got reply: 250 2.1.5 OK ua9si17474453pab.25 - gsmtp
[29/Apr/2016 07:21:30][18400] {smtpc} Sent DATA command
[29/Apr/2016 07:21:30][18400] {smtpc} Got reply: 354 Go ahead ua9si17474453pab.25 - gsmtp
[29/Apr/2016 07:21:30][18400] {smtpc} Sending message body...
[29/Apr/2016 07:23:34][18400] {smtpc} SMTP connection closed while reading SMTP reply
[29/Apr/2016 07:23:34][18400] {smtpc} Connection lost with server aspmx.l.google.com: Connection lost
[29/Apr/2016 07:23:34][18400] {smtpc} Delivery to other mx servers was skipped.

  •  
dave2ic

Messages: 8
Karma: 0
Send a private message to this user
A further note: As I said in my previous post, often we get these '4.4.2 Connection Lost' errors even though the email has been delivered.

We had a 16MB email sent last night that recipients have received many times (one reported 9 times). I've had to reduce amount of retries, but when we get these '4.4.2 Connection Lost' errors the recipient may have in fact received the email - but we have no way of knowing. This seems bizarre!
  •  
Brian Carmichael (Kerio)

Messages: 559
Karma: 55
Send a private message to this user
Do you have any antivirus software on your server? See this post http://forums.kerio.com/t/9180/result-delayed-status-4-4-2-c onnection-lost/

Brian Carmichael
Senior Technical Marketing Engineer | Kerio
Stay Connected Anytime, Anywhere. Discover Kerio Cloud!
  •  
dave2ic

Messages: 8
Karma: 0
Send a private message to this user
Brian Carmichael (Kerio) wrote on Thu, 28 April 2016 22:34
Do you have any antivirus software on your server?


We have Trend Micro Worry Free Business Security on the server, but have the Kerio\MailServer\Store\ folder Excluded from scanning. That was one of the first recommendations from Kerio support but it hasn't made any difference.
  •  
freakinvibe

Messages: 1467
Karma: 54
Send a private message to this user
It seems like something cuts the connection after 2 minutes. Is there any firewall, proxy etc. between your KC server and the Internet?

If you have Fortinet or Cisco, try to switch off "SMTP Inspection". This can cause issue like this.

Dexion AG - The Blackberry Specialists in Switzerland
http://www.dexionag.ch
  •  
Brian Carmichael (Kerio)

Messages: 559
Karma: 55
Send a private message to this user
I suspect it is related to your AV software. According to their documentation it's performing a significant amount of scanning of email. Excluding the directory is file system only. This connection error is related to network scanning, probably the "real time" security related features. http://docs.trendmicro.com/all/smb/wfbs-s/v9.0/en-us/wfbs_9. 0_olhsrv/ch_intro_basic_msa.html#id1273B90J05Z

Brian Carmichael
Senior Technical Marketing Engineer | Kerio
Stay Connected Anytime, Anywhere. Discover Kerio Cloud!
  •  
dave2ic

Messages: 8
Karma: 0
Send a private message to this user
freakinvibe wrote on Thu, 28 April 2016 23:01
It seems like something cuts the connection after 2 minutes. Is there any firewall, proxy etc. between your KC server and the Internet?

If you have Fortinet or Cisco, try to switch off "SMTP Inspection". This can cause issue like this.


The connection cutting after 2 minutes sounds about right. At the ADSL upload speed, 2 minutes would be enough to send about 10-12MB, which is about what we get before getting these timeout errors.

There is no firewall/proxy - the gateway for the server is the ADSL modem, which has nothing blocked outgoing. We even changed the modem from a TP-Link to a Zyxel recently and it has made no difference.
  •  
dave2ic

Messages: 8
Karma: 0
Send a private message to this user
Brian Carmichael (Kerio) wrote on Thu, 28 April 2016 23:11
I suspect it is related to your AV software. According to their documentation it's performing a significant amount of scanning of email. Excluding the directory is file system only. This connection error is related to network scanning, probably the "real time" security related features. http://docs.trendmicro.com/all/smb/wfbs-s/v9.0/en-us/wfbs_9. 0_olhsrv/ch_intro_basic_msa.html#id1273B90J05Z


We don't have the Messaging Security component of Worry-Free Business Security installed on the server though. And we aren't using the Trend Firewall - so I can't see anything else I can turn off other than the Exclusion folder we have already added to Realtime Antivirus/Antispyware.

I will try turning off completely Realtime Antivirus/Antispyware though temporarily to test if this makes a difference.
  •  
ComputerBudda

Messages: 88
Karma: 5
Send a private message to this user
Back in day, any call to tech support required total disabling of antivirus on the server or they wouldn't talk to you. If all the WS have good AV on them....like Trend....what is the need for active AV on the server. Wouldn't a nightly scan of the data partition suffice?
  •  
dave2ic

Messages: 8
Karma: 0
Send a private message to this user
Thanks very much to everyone for your feedback - the pushes in the direction of the antivirus being the cause has resulted in me resolving the issue. It wasn't as simple as I would have thought, though.

Turning off the antivirus didn't help, so I tried disabling all Trend Micro services that were running:

Trend Micro Common Client Solution Framework
Trend Micro Security Agent Listener
Trend Micro Security Agent Realtime Scan
Trend Micro Security Server Master Service

After this I went through each service individually and found that it was the 'Trend Micro Security Agent Listener' that was causing the problem. If I have this disabled and all the other services enabled email seems to work fine. (Of course I still have my exclusion for the MailServer\Store\Queue\ folder).

I guess I'll have to check with Trend Micro the implications of leaving this service disabled, but at the moment I'm just delighted to have everything working.

Thanks again for everyone's help.

[Updated on: Fri, 29 April 2016 00:56]

  •  
freakinvibe

Messages: 1467
Karma: 54
Send a private message to this user
I am glad to hear that you found a solution.

If Trend Micro gets back to you with an explanation, please post it here to help others with the same issue.

Thanks.

Dexion AG - The Blackberry Specialists in Switzerland
http://www.dexionag.ch
  •  
dave2ic

Messages: 8
Karma: 0
Send a private message to this user
freakinvibe wrote on Fri, 29 April 2016 09:49
I am glad to hear that you found a solution.

If Trend Micro gets back to you with an explanation, please post it here to help others with the same issue.

In corresponding with Trend Micro over the issue I found that disabling the Trend Micro Security Agent Listener service is not a good idea. To quote them:

Quote:
Trend Micro Agent Listenter is the service who checks communication between the agent and the server. If you turn off the agent listener service, agents will not be able to get updates from the server.

They recommended re-enabling the service and try turning off URL Filtering or Web Reputation on the Security Server to see if that helped.

What I found is disabling both BOTH the 'Web Reputation - In Office' AND 'URL Filtering' features is required to avoid getting the SMTP connection problems in Kerio.

As the server is not used for browsing, this is satisfactory solution. Trend Micro did offer some further troubleshooting advice, but I haven't had the need to take it any further:

Quote:
Another thing we can try is to IP whitelist the IP address of the machine then whitelist the executable file for Kerio. Please refer to the link below:

http://esupport.trendmicro.com/solution/en-US/1101683.aspx

I hope this helps anyone else who may come across this problem.
Previous Topic: "Not Responding" on Outlook with KOFF Clients
Next Topic: Switching from OD to AD
Goto Forum:
  


Disclaimer:
Kerio discussion forums are intended for open communication between forum members and may contain information and material posted by members which may be useful in learning about Kerio products. The discussion forums are not intended to provide technical support for any specific product. Any information implied or expressed in the discussion forums is that of the posting member. Kerio is in no way responsible for the information posted in the forums, or its accuracy. Kerio employees may participate in the discussions, but their postings do not represent an offical position of the company on any issues raised or discussed. Kerio reserves the right to monitor and maintain the forums to promote free and accurate exchange of information.

Current Time: Sun Dec 11 14:49:09 CET 2016

Total time taken to generate the page: 0.06386 seconds
.:: Contact :: Home ::.
Powered by: FUDforum 3.0.4.