GFI Software

Welcome to the GFI Software community forum! For support please open a ticket from https://support.gfi.com.

Home » GFI User Forums » Kerio Connect » Problems sending mail through Kerio - advice on using another SMTP server on the LAN?
Problems sending mail through Kerio - advice on using another SMTP server on the LAN? [message #129232] Thu, 28 April 2016 00:57 Go to next message
dave2ic is currently offline  dave2ic
Messages: 8
Registered: April 2016
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.





Re: Problems sending mail through Kerio - advice on using another SMTP server on the LAN? [message #129244 is a reply to message #129232] Thu, 28 April 2016 17:20 Go to previous messageGo to next message
freakinvibe is currently offline  freakinvibe
Messages: 593
Registered: April 2004
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 Services AG - IT Support Services in Basel, Switzerland
https://dexionag.ch
Re: Problems sending mail through Kerio - advice on using another SMTP server on the LAN? [message #129245 is a reply to message #129232] Thu, 28 April 2016 17:29 Go to previous messageGo to next message
j.a.duke is currently offline  j.a.duke
Messages: 239
Registered: October 2006
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
Re: Problems sending mail through Kerio - advice on using another SMTP server on the LAN? [message #129253 is a reply to message #129245] Thu, 28 April 2016 21:39 Go to previous messageGo to next message
dave2ic is currently offline  dave2ic
Messages: 8
Registered: April 2016
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.

Re: Problems sending mail through Kerio - advice on using another SMTP server on the LAN? [message #129256 is a reply to message #129232] Thu, 28 April 2016 22:25 Go to previous messageGo to next message
dave2ic is currently offline  dave2ic
Messages: 8
Registered: April 2016
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!
Re: Problems sending mail through Kerio - advice on using another SMTP server on the LAN? [message #129257 is a reply to message #129253] Thu, 28 April 2016 22:34 Go to previous messageGo to next message
Kerio/GFI Brian is currently offline  Kerio/GFI Brian
Messages: 852
Registered: March 2004
Location: California
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
Instructional Content Architect
Re: Problems sending mail through Kerio - advice on using another SMTP server on the LAN? [message #129259 is a reply to message #129257] Thu, 28 April 2016 22:57 Go to previous messageGo to next message
dave2ic is currently offline  dave2ic
Messages: 8
Registered: April 2016
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.
Re: Problems sending mail through Kerio - advice on using another SMTP server on the LAN? [message #129261 is a reply to message #129257] Thu, 28 April 2016 23:01 Go to previous messageGo to next message
freakinvibe is currently offline  freakinvibe
Messages: 593
Registered: April 2004
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 Services AG - IT Support Services in Basel, Switzerland
https://dexionag.ch
Re: Problems sending mail through Kerio - advice on using another SMTP server on the LAN? [message #129263 is a reply to message #129261] Thu, 28 April 2016 23:11 Go to previous messageGo to next message
Kerio/GFI Brian is currently offline  Kerio/GFI Brian
Messages: 852
Registered: March 2004
Location: California
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
Instructional Content Architect
Re: Problems sending mail through Kerio - advice on using another SMTP server on the LAN? [message #129266 is a reply to message #129261] Thu, 28 April 2016 23:30 Go to previous messageGo to next message
dave2ic is currently offline  dave2ic
Messages: 8
Registered: April 2016
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.
Re: Problems sending mail through Kerio - advice on using another SMTP server on the LAN? [message #129269 is a reply to message #129263] Thu, 28 April 2016 23:40 Go to previous messageGo to next message
dave2ic is currently offline  dave2ic
Messages: 8
Registered: April 2016
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.
Re: Problems sending mail through Kerio - advice on using another SMTP server on the LAN? [message #129270 is a reply to message #129269] Thu, 28 April 2016 23:58 Go to previous messageGo to next message
ComputerBudda is currently offline  ComputerBudda
Messages: 112
Registered: January 2013
Location: DFW - USA
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?
Re: Problems sending mail through Kerio - advice on using another SMTP server on the LAN? [message #129271 is a reply to message #129270] Fri, 29 April 2016 00:55 Go to previous messageGo to next message
dave2ic is currently offline  dave2ic
Messages: 8
Registered: April 2016
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]

Report message to a moderator

Re: Problems sending mail through Kerio - advice on using another SMTP server on the LAN? [message #129274 is a reply to message #129232] Fri, 29 April 2016 09:49 Go to previous messageGo to next message
freakinvibe is currently offline  freakinvibe
Messages: 593
Registered: April 2004
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 Services AG - IT Support Services in Basel, Switzerland
https://dexionag.ch
Re: Problems sending mail through Kerio - advice on using another SMTP server on the LAN? [message #129757 is a reply to message #129274] Wed, 18 May 2016 06:52 Go to previous message
dave2ic is currently offline  dave2ic
Messages: 8
Registered: April 2016
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:
  


Current Time: Thu Jun 08 16:37:02 CEST 2023

Total time taken to generate the page: 0.02051 seconds