Koozali.org: home of the SME Server

kmail "early talker" to SME on external connection only

Offline leonp

  • **
  • 43
  • +0/-0
kmail "early talker" to SME on external connection only
« on: January 25, 2020, 03:19:31 PM »
Hello, all.
I have SME server v9.2  and my client laptop with Fedora 30 KDE last updates installed.
When I run kmail (standard Fedora provided) from within the local (to server) network everything works fine - both Rx and Tx.
Receiving mails from outside network (via ISP) works fine too.
When I try to send a message from outside world, sending fails and kmail reports "Failed to transport message. Mailbox unavailable. The server said: Connecting host started transmitting before SMTP greeting".
Looking at the log files I see:
2020-01-22 22:05:46.141887500 20683 Accepted connection 0/10 from 192.168.255.2 / Unknown
2020-01-22 22:05:46.142222500 20683 Connection from Unknown [192.168.255.2]
2020-01-22 22:05:46.537767500 20683 (connect) tls: pass, connect via SMTPS
2020-01-22 22:05:46.572545500 20683 (connect) earlytalker: karma -1 (-1)
2020-01-22 22:05:46.572678500 20683 (connect) earlytalker: fail, remote started talking before we said hello
2020-01-22 22:05:46.573069500 20683 (deny) logging::logterse: ` 192.168.255.2 Unknown earlytalker 901 Connecting host started transmitting before SMTP greeting msg denied before queued
2020-01-22 22:05:46.573264500 20683 550 Connecting host started transmitting before SMTP greeting
2020-01-22 22:05:46.575005500 20683 click, disconnecting
2020-01-22 22:05:47.129568500 1896 cleaning up after 20683
----------------------------------------------------------------------------------
I tried to use Thunderbird client - worked fine.
I tried to use Evolution client - worked fine.
So, only sending from kmail while outside fails. But from withing local network works.
This looks like kmail problem, but how kmail behavior may differ dependent on IP address? Can't imagine...
 
Any help will be highly appreciated.

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: kmail "early talker" to SME on external connection only
« Reply #1 on: January 25, 2020, 07:03:31 PM »
leonp

Looks like you asked this previously, in May 2018.
https://forums.contribs.org/index.php?topic=53616.0
One suggestion then was that your mail client was not compatible.

You can change the earlytalker plugin delay time, maybe make it very small eg 0 (zero) & see what happens.
Obviously you would loose the benefit of the plugin delay then, but it will prove whether your mail client then talks to SME server OK.

See
https://wiki.contribs.org/Qpsmtpd_check_earlytalker

Also see the second paragraph here (for a brief explanation):
https://en.wikipedia.org/wiki/Qpsmtpd

Please keep in mind that Google is your friend, you can search just as well as I can, eg on earlytalker.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline mmccarn

  • *
  • 2,626
  • +10/-0
Re: kmail "early talker" to SME on external connection only
« Reply #2 on: January 26, 2020, 12:54:21 PM »
Your difficulty is being caused by the earlytalker plugin, which is enabled by default for remote connections and disabled by default for local connections.

Here are some ideas -

Use SSL on port 465
First I would try re-configuring kmail to use ssl on port 465 instead of tls on port 25.  I use ssl/465 for smtp out of habit due to a problem I ran into long ago, and find (for me, on my server) that it solves some problems.

Disable earlytalker
You can disable 'earlytalker' on your external interface, but that may result in an increase in spam emails, dictionary attacks, or other issues -

Code: [Select]
mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0
echo '# earlytalker disabled by custom template' > 10earlytalker
signal-event email-update

verify earlytalker reconfiguration:
Code: [Select]
grep earlytalker /var/service/qpsmtpd/config/peers/0

disable this change:
Code: [Select]
'rm' earlytalker /var/service/qpsmtpd/config/peers/0/10earlytalker
signal-event email-update

Use a VPN
I have never used a VPN contrib on SME, but they should work:
* OpenVPN_Bridge - I think this would be considered the 'standard' SME VPN contrib -- but it has always looked pretty complicated to setup (to me)

* SoftEther_VPN - I found this looking for an answer to your question; I know nothing about it. 

Use an SSH tunnel
If you enable remote ssh access to your SME server you can create an ssh tunnel for port 25 or port 465, then create a second SMTP server in kmail talking to 'localhost'.  This tunneled smtp server would work from outside your network.

Fix/reconfigure kmail
Work with KDE to learn how to get kmail to stop talking out of turn.  If there is no configuration option for this, they may feel they have a bug worth fixing.

EXPERIMENTAL - See if kmail supports ActiveSync or EWS with SOGo

I use SOGo on my home SME.  It looks enough like an exchange server to fool my iphone and outlook 2016.

* Install SOGo (sadly, the wiki page has not been updated since Sogo 4 was released in 2018...)
* See if kmail will let you setup your email as an exchange server account

Offline leonp

  • **
  • 43
  • +0/-0
Re: kmail "early talker" to SME on external connection only
« Reply #3 on: January 26, 2020, 06:50:42 PM »
Janet, mmccam - thank you both very much!
Today while in the office I changed earlytalker delay time to zero - this solved the issue!
Now, I will return it back to 1s and will try your, mmccam advises.
Will report tomorrow.
Many thanks!!!!

Online ReetP

  • *
  • 3,722
  • +5/-0
Re: kmail "early talker" to SME on external connection only
« Reply #4 on: January 26, 2020, 09:38:08 PM »
If TB & Evolution work then it strongly suggests an issue with Kmail.

FWIW, SSL on 465 should really be default IMHO. Definitely worth setting that up.

Is your collection via POP3 or IMAP?

Just thinking maybe some sort of POP before/after SMTP issue?

What other Send settings do you have set up?
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline leonp

  • **
  • 43
  • +0/-0
Re: kmail "early talker" to SME on external connection only
« Reply #5 on: January 28, 2020, 05:00:02 PM »
Thanks to all for the help!
The results - kmail with SSL port 465 and non-zero earlytalker - doesn't work.
So, although it looks unbelievable to me, but the bug is in kmail.
Again, many thanks to helpers - at least I solved the issue and now go to report the bug to kmail.
« Last Edit: January 29, 2020, 10:18:34 AM by leonp »

Online ReetP

  • *
  • 3,722
  • +5/-0
Re: kmail "early talker" to SME on external connection only
« Reply #6 on: January 28, 2020, 07:14:26 PM »
Thanks to all for the help!
The results - kmail with SSL port 465 and zero earlytalker - doesn't work.

What do the logs show when Kmail tries to connect without the early talker plugin?

Quote
So, although it looks unbelievable to me, but the bug is in kmail.

Story of my life :-(

...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline leonp

  • **
  • 43
  • +0/-0
Re: kmail "early talker" to SME on external connection only
« Reply #7 on: January 29, 2020, 10:19:29 AM »
Sorry!!! Typo error - NON-zero earlytalker. SORRY!!!