# Cannot receive email in Mail (but netcat to google smtp is reactive)

**URL:** https://syncloud.discourse.group/t/cannot-receive-email-in-mail-but-netcat-to-google-smtp-is-reactive/239
**Category:** Existing Apps
**Tags:** mail-server
**Created:** [14 September 2022 08:42 UTC](https://syncloud.discourse.group/t/cannot-receive-email-in-mail-but-netcat-to-google-smtp-is-reactive/239 "2022-09-14T08:42:27Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![SimoneBuralli](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@SimoneBuralli](https://syncloud.discourse.group/u/SimoneBuralli)
#### Post date: [14 September 2022 08:42 UTC](https://syncloud.discourse.group/t/cannot-receive-email-in-mail-but-netcat-to-google-smtp-is-reactive/239/1 "2022-09-14T08:42:27Z")

</div>

Hi @boris ,  
like [this](https://syncloud.discourse.group/t/cannot-receive-email-in-mail-app/189/7) use case (can send but cannot receive), opened port 25 (TCP only is enough?) and here follows the output of netcat:

```auto
root@syncloud:~# nc -vz gmail-smtp-in.l.google.com 25
DNS fwd/rev mismatch: gmail-smtp-in.l.google.com != rb-in-f26.1e100.net
gmail-smtp-in.l.google.com [142.250.102.26] 25 (smtp) open
root@syncloud:~#

```

Any suggestion? Thanks in advance

Simone

---

<div class="post-metadata">

### Author: ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)
#### Post date: [14 September 2022 10:39 UTC](https://syncloud.discourse.group/t/cannot-receive-email-in-mail-but-netcat-to-google-smtp-is-reactive/239/2 "2022-09-14T10:39:47Z")

</div>

We have this doc: [Mail · syncloud/platform Wiki · GitHub](https://github.com/syncloud/platform/wiki/Mail)

Did you enable external access so you device DNS is available from Internet?  
Another thing ISP can block incoming port 25, can you run the same command from a device in the internet (or phone on kobile network)?

---

<div class="post-metadata">

### Author: ![SimoneBuralli](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@SimoneBuralli](https://syncloud.discourse.group/u/SimoneBuralli)
#### Post date: [16 September 2022 10:21 UTC](https://syncloud.discourse.group/t/cannot-receive-email-in-mail-but-netcat-to-google-smtp-is-reactive/239/3 "2022-09-16T10:21:15Z")

</div>

> Did you enable external access so your device DNS is available from Internet?

external access is working, you can try it [here](https://wordpress.simoneburalli.syncloud.it/).  
In the while I have collected a new information: mail messages are bouncing back with this (signature?) error:

```auto
TLS Negotiation failed: FAILED_PRECONDITION: starttls error (71): 
6919030981960:error:04000069:RSA routines:OPENSSL_internal:BAD_SIGNATURE:third_party/openssl/boringssl/src/crypto/fipsmodule/rsa/rsa.c:634: ;
6919030981960:error:10000072:SSL routines:OPENSSL_internal:BAD_SIGNATURE:third_party/openssl/boringssl/src/ssl/handshake_client.cc:1197:

```

> We have this doc: [Mail · syncloud/platform Wiki · GitHub](https://github.com/syncloud/platform/wiki/Mail)

Yes, I started from there 😉

> Another thing ISP can block incoming port 25, can you run the same command from a device in the internet (or phone on kobile network)?

Unfortunately I don’t have any other linux OS running at home ☹ except for Android devices but it looks like _nc_ command does not work on Android consoles.  
Thanks  
Simone

---

<div class="post-metadata">

### Author: ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)
#### Post date: [22 September 2022 21:00 UTC](https://syncloud.discourse.group/t/cannot-receive-email-in-mail-but-netcat-to-google-smtp-is-reactive/239/4 "2022-09-22T21:00:58Z")

</div>

Can you send you device email to support at syncloud.it so I can test?  
Looks like port 25 is open. Not sure where TLS error is coming from.

---

<div class="post-metadata">

### Author: ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)
#### Post date: [23 September 2022 20:04 UTC](https://syncloud.discourse.group/t/cannot-receive-email-in-mail-but-netcat-to-google-smtp-is-reactive/239/5 "2022-09-23T20:04:33Z")

</div>

Sent you test mail, did not get any bounce mail back.  
Can you open mail app and see if you received it?

---

<div class="post-metadata">

### Author: ![SimoneBuralli](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@SimoneBuralli](https://syncloud.discourse.group/u/SimoneBuralli)
#### Post date: [25 September 2022 18:20 UTC](https://syncloud.discourse.group/t/cannot-receive-email-in-mail-but-netcat-to-google-smtp-is-reactive/239/6 "2022-09-25T18:20:32Z")

</div>

hi @boris ,  
your message arrived successfully. But…you wrote from a @syncloud.it address. If you try from a different domain it will bounce back after some (several!) hours. I have tried yesterday from my personal mail.

---

<div class="post-metadata">

### Author: ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)
#### Post date: [27 September 2022 05:56 UTC](https://syncloud.discourse.group/t/cannot-receive-email-in-mail-but-netcat-to-google-smtp-is-reactive/239/7 "2022-09-27T05:56:43Z")

</div>

Sent another one from gmail

---

<div class="post-metadata">

### Author: ![SimoneBuralli](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@SimoneBuralli](https://syncloud.discourse.group/u/SimoneBuralli)
#### Post date: [27 September 2022 06:07 UTC](https://syncloud.discourse.group/t/cannot-receive-email-in-mail-but-netcat-to-google-smtp-is-reactive/239/8 "2022-09-27T06:07:04Z")

</div>

not yet arrived. You should receive an error msg in the next 24+ hrs. Pls have a look at it. Thx a lot

Simone

---

<div class="post-metadata">

### Author: ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)
#### Post date: [27 September 2022 08:00 UTC](https://syncloud.discourse.group/t/cannot-receive-email-in-mail-but-netcat-to-google-smtp-is-reactive/239/9 "2022-09-27T08:00:25Z")

</div>

Ok, got it, coould you restart mail:

```auto
snap restart mail

```

And then try again?

---

<div class="post-metadata">

### Author: ![SimoneBuralli](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@SimoneBuralli](https://syncloud.discourse.group/u/SimoneBuralli)
#### Post date: [27 September 2022 10:18 UTC](https://syncloud.discourse.group/t/cannot-receive-email-in-mail-but-netcat-to-google-smtp-is-reactive/239/10 "2022-09-27T10:18:21Z")

</div>

> [@boris](#):
>
> `snap restart mail`

Done:

```auto
root@syncloud:~# snap restart mail
Restarted.
root@syncloud:~#

```

Then I have tried again to send a message. 10 mins after nothing arrived ☹

---

<div class="post-metadata">

### Author: ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)
#### Post date: [27 September 2022 17:56 UTC](https://syncloud.discourse.group/t/cannot-receive-email-in-mail-but-netcat-to-google-smtp-is-reactive/239/11 "2022-09-27T17:56:04Z")

</div>

Ok, is this a fresh install of mail or it was installed some time ago and went throught a few upgrades?  
Could you reinstall it to see if that helps?

---

<div class="post-metadata">

### Author: ![SimoneBuralli](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@SimoneBuralli](https://syncloud.discourse.group/u/SimoneBuralli)
#### Post date: [27 September 2022 18:10 UTC](https://syncloud.discourse.group/t/cannot-receive-email-in-mail-but-netcat-to-google-smtp-is-reactive/239/12 "2022-09-27T18:10:41Z")

</div>

hi Boris,  
it’s a fresh install with no upgrades. As a reference of the install you can take the date of my first post here. No upgrades were released in the while.  
I’m sorry

---

<div class="post-metadata">

### Author: ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)
#### Post date: [28 September 2022 08:28 UTC](https://syncloud.discourse.group/t/cannot-receive-email-in-mail-but-netcat-to-google-smtp-is-reactive/239/13 "2022-09-28T08:28:44Z")

</div>

Ok could you run these commands:

```auto
uname -a
lsb_release -a
snap list

```

---

<div class="post-metadata">

### Author: ![SimoneBuralli](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@SimoneBuralli](https://syncloud.discourse.group/u/SimoneBuralli)
#### Post date: [28 September 2022 09:15 UTC](https://syncloud.discourse.group/t/cannot-receive-email-in-mail-but-netcat-to-google-smtp-is-reactive/239/14 "2022-09-28T09:15:13Z")

</div>

```auto
root@syncloud:~# uname -a
Linux syncloud 4.9.236-63 #1 SMP PREEMPT Wed Dec 9 22:25:50 UTC 2020 aarch64 GNU/Linux
root@syncloud:~#

```

lsb\_release was not installed. I have installed it and the output is the following one:

```auto
root@syncloud:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 10 (buster)
Release: 10
Codename: buster
root@syncloud:~#

```

```auto
root@syncloud:~# snap list
Name Version Rev Tracking Developer Notes
jellyfin 90 90 stable syncloud -
mail 239 239 stable syncloud -
nextcloud 603 603 stable syncloud -
platform 1481 1481 stable syncloud base
plex 86 86 stable syncloud -
users 244 244 stable syncloud -
wordpress 156 156 stable syncloud -
root@syncloud:~#

```

Thanks  
Simone

---

<div class="post-metadata">

### Author: ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)
#### Post date: [29 September 2022 06:42 UTC](https://syncloud.discourse.group/t/cannot-receive-email-in-mail-but-netcat-to-google-smtp-is-reactive/239/15 "2022-09-29T06:42:08Z")

</div>

all looks good, same thing works on my intel x64 image, let me do some tests on arm64 device.  
I did not know that mail providers can do starttls on port 25.

Issue: [[mail] tls receive error · Issue #657 · syncloud/platform · GitHub](https://github.com/syncloud/platform/issues/657)

---

<div class="post-metadata">

### Author: ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)
#### Post date: [29 September 2022 07:26 UTC](https://syncloud.discourse.group/t/cannot-receive-email-in-mail-but-netcat-to-google-smtp-is-reactive/239/16 "2022-09-29T07:26:08Z")

</div>

Can you send logs from Settings - Support so I can see what is happening on server side?

---

<div class="post-metadata">

### Author: ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)
#### Post date: [29 September 2022 19:41 UTC](https://syncloud.discourse.group/t/cannot-receive-email-in-mail-but-netcat-to-google-smtp-is-reactive/239/17 "2022-09-29T19:41:46Z")

</div>

Did some more testing, here is the command:

```auto
echo "A Logout" | openssl s_client -connect [domain-name]:25 -verify 3 -starttls smtp

```

where [domain-name] has to be specified.

On your (HC4?) it returns among other things:

gmail does not like this:

```auto
281473544787840:error:04091068:rsa routines:int_rsa_verify:bad signature:../crypto/rsa/rsa_sign.c:220:
281473544787840:error:1416D07B:SSL routines:tls_process_key_exchange:bad signature:../ssl/statem/statem_clnt.c:2406:

```

also it shows this:

```auto
New, (NONE), Cipher is (NONE)

```

while should be showing this:

```auto
New, TLSv1.2, Cipher is ECDHE-RSA-AES256-GCM-SHA384

```

I have tested both hc4 arm63 and nuc intel, both produce correct result.

Is it possible to rewrite the latest image on your device and test again?

---

<div class="post-metadata">

### Author: ![SimoneBuralli](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@SimoneBuralli](https://syncloud.discourse.group/u/SimoneBuralli)
#### Post date: [29 September 2022 20:26 UTC](https://syncloud.discourse.group/t/cannot-receive-email-in-mail-but-netcat-to-google-smtp-is-reactive/239/18 "2022-09-29T20:26:07Z")

</div>

> [@boris](#):
>
> Is it possible to rewrite the latest image on your device and test again?

yes, I’m going to do that also to exploit the latest image because I’m still on an old release (you can refer to the thread about Rocket.chat). It will take some time, I’ll be back to you as soon as I’ll have it tested.  
Thanks a lot for your great support
