Email Test not work in basic setup (AIO Docker)

But are we scanning local ports, aren’t that?

How can it be provider side if email is working properly out of Nextcloud?

Yes they are. But you need open ports on there —> smtp.webcenter.com.br
Let’s explain all later?

So is this working:
/usr/bin/nmap -dd smtp.webcenter.com.br 587,465

and are you inside a container?

What you get from:
nslookup smtp.webcenter.com.br

Deleted

And then:

Server:         127.0.0.53
Address:        127.0.0.53#53

Non-authoritative answer:
smtp.webcenter.com.br   canonical name = avestruz.birdsnet.com.br.
Name:   avestruz.birdsnet.com.br
Address: 189.91.32.41

sorry it should be:
/usr/bin/nmap -dd smtp.webcenter.com.br -p587,465

Starting Nmap 7.80 ( https://nmap.org ) at 2024-02-05 00:26 UTC
Fetchfile found /usr/bin/../share/nmap/nmap-services
Fetchfile found /usr/bin/../share/nmap/nmap.xsl
The max # of sockets we are using is: 0
--------------- Timing report ---------------
  hostgroups: min 1, max 100000
  rtt-timeouts: init 1000, min 100, max 10000
  max-scan-delay: TCP 1000, UDP 1000, SCTP 1000
  parallelism: min 0, max 0
  max-retries: 10, host-timeout: 0
  min-rate: 0, max-rate: 0
---------------------------------------------
Fetchfile found /usr/bin/../share/nmap/nmap-payloads
Initiating Ping Scan at 00:26
Scanning smtp.webcenter.com.br (189.91.32.41) [4 ports]
Packet capture filter (device enp0s7): dst host 167.88.171.30 and (icmp or icmp6 or ((tcp or udp or sctp) and (src host 189.91.32.41)))
We got a ping packet back from 189.91.32.41: id = 5380 seq = 0 checksum = 60155
ultrascan_host_probe_update called for machine 189.91.32.41 state UNKNOWN -> HOST_UP (trynum 0 time: 137142)
Changing ping technique for 189.91.32.41 to icmp type 8 code 0
Changing global ping host to 189.91.32.41.
Completed Ping Scan at 00:26, 0.16s elapsed (1 total hosts)
Overall sending rates: 25.53 packets / s, 970.04 bytes / s.
mass_rdns: Using DNS server 127.0.0.53
NSOCK INFO [0.2340s] nsock_iod_new2(): nsock_iod_new (IOD #1)
NSOCK INFO [0.2340s] nsock_connect_udp(): UDP connection requested to 127.0.0.53:53 (IOD #1) EID 8
NSOCK INFO [0.2350s] nsock_read(): Read request from IOD #1 [127.0.0.53:53] (timeout: -1ms) EID 18
Initiating Parallel DNS resolution of 1 host. at 00:26
NSOCK INFO [0.2350s] nsock_write(): Write request for 43 bytes to IOD #1 EID 27 [127.0.0.53:53]
NSOCK INFO [0.2350s] nsock_trace_handler_callback(): Callback: CONNECT SUCCESS for EID 8 [127.0.0.53:53]
NSOCK INFO [0.2350s] nsock_trace_handler_callback(): Callback: WRITE SUCCESS for EID 27 [127.0.0.53:53]
NSOCK INFO [0.2350s] nsock_trace_handler_callback(): Callback: READ SUCCESS for EID 18 [127.0.0.53:53] (81 bytes)
NSOCK INFO [0.2350s] nsock_read(): Read request from IOD #1 [127.0.0.53:53] (timeout: -1ms) EID 34
NSOCK INFO [0.2350s] nsock_iod_delete(): nsock_iod_delete (IOD #1)
NSOCK INFO [0.2350s] nevent_delete(): nevent_delete on event #34 (type READ)
mass_rdns: 0.00s 0/1 [#: 1, OK: 0, NX: 0, DR: 0, SF: 0, TR: 1]
Completed Parallel DNS resolution of 1 host. at 00:26, 0.00s elapsed
DNS resolution of 1 IPs took 0.00s. Mode: Async [#: 1, OK: 1, NX: 0, DR: 0, SF: 0, TR: 1, CN: 0]
Initiating SYN Stealth Scan at 00:26
189.91.32.41 pingprobe type ICMP is inappropriate for this scan type; resetting.
Scanning smtp.webcenter.com.br (189.91.32.41) [2 ports]
Packet capture filter (device enp0s7): dst host 167.88.171.30 and (icmp or icmp6 or ((tcp or udp or sctp) and (src host 189.91.32.41)))
Completed SYN Stealth Scan at 00:26, 2.38s elapsed (2 total ports)
Overall sending rates: 1.68 packets / s, 73.82 bytes / s.
Nmap scan report for smtp.webcenter.com.br (189.91.32.41)
Host is up, received echo-reply ttl 53 (0.14s latency).
rDNS record for 189.91.32.41: avestruz.birdsnet.com.br
Scanned at 2024-02-05 00:26:06 UTC for 3s

PORT    STATE    SERVICE    REASON
465/tcp filtered smtps      no-response
587/tcp filtered submission no-response
Final times for host: srtt: 136631 rttvar: 136631  to: 683155

Read from /usr/bin/../share/nmap: nmap-payloads nmap-services.
Nmap done: 1 IP address (1 host up) scanned in 2.65 seconds
           Raw packets sent: 8 (328B) | Rcvd: 11 (388B)

Please:
/usr/bin/nmap --dns-servers 1.1.1.1 -dd smtp.webcenter.com.br -p587,465

No “please”… you are helping me. Your say, I do! :slight_smile:

Starting Nmap 7.80 ( https://nmap.org ) at 2024-02-05 00:36 UTC
Fetchfile found /usr/bin/../share/nmap/nmap-services
Fetchfile found /usr/bin/../share/nmap/nmap.xsl
The max # of sockets we are using is: 0
--------------- Timing report ---------------
  hostgroups: min 1, max 100000
  rtt-timeouts: init 1000, min 100, max 10000
  max-scan-delay: TCP 1000, UDP 1000, SCTP 1000
  parallelism: min 0, max 0
  max-retries: 10, host-timeout: 0
  min-rate: 0, max-rate: 0
---------------------------------------------
Fetchfile found /usr/bin/../share/nmap/nmap-payloads
Initiating Ping Scan at 00:36
Scanning smtp.webcenter.com.br (189.91.32.41) [4 ports]
Packet capture filter (device enp0s7): dst host 167.88.171.30 and (icmp or icmp6 or ((tcp or udp or sctp) and (src host 189.91.32.41)))
We got a ping packet back from 189.91.32.41: id = 56288 seq = 0 checksum = 9247
ultrascan_host_probe_update called for machine 189.91.32.41 state UNKNOWN -> HOST_UP (trynum 0 time: 156196)
Changing ping technique for 189.91.32.41 to icmp type 8 code 0
Changing global ping host to 189.91.32.41.
Completed Ping Scan at 00:36, 0.17s elapsed (1 total hosts)
Overall sending rates: 22.77 packets / s, 865.38 bytes / s.
mass_rdns: Using DNS server 1.1.1.1
NSOCK INFO [0.3150s] nsock_iod_new2(): nsock_iod_new (IOD #1)
NSOCK INFO [0.3150s] nsock_connect_udp(): UDP connection requested to 1.1.1.1:53 (IOD #1) EID 8
NSOCK INFO [0.3150s] nsock_read(): Read request from IOD #1 [1.1.1.1:53] (timeout: -1ms) EID 18
Initiating Parallel DNS resolution of 1 host. at 00:36
NSOCK INFO [0.3150s] nsock_write(): Write request for 43 bytes to IOD #1 EID 27 [1.1.1.1:53]
NSOCK INFO [0.3150s] nsock_trace_handler_callback(): Callback: CONNECT SUCCESS for EID 8 [1.1.1.1:53]
NSOCK INFO [0.3150s] nsock_trace_handler_callback(): Callback: WRITE SUCCESS for EID 27 [1.1.1.1:53]
NSOCK INFO [0.7840s] nsock_trace_handler_callback(): Callback: READ SUCCESS for EID 18 [1.1.1.1:53] (81 bytes)
NSOCK INFO [0.7840s] nsock_read(): Read request from IOD #1 [1.1.1.1:53] (timeout: -1ms) EID 34
NSOCK INFO [0.7840s] nsock_iod_delete(): nsock_iod_delete (IOD #1)
NSOCK INFO [0.7840s] nevent_delete(): nevent_delete on event #34 (type READ)
mass_rdns: 0.47s 0/1 [#: 1, OK: 0, NX: 0, DR: 0, SF: 0, TR: 1]
Completed Parallel DNS resolution of 1 host. at 00:36, 0.47s elapsed
DNS resolution of 1 IPs took 0.47s. Mode: Async [#: 1, OK: 1, NX: 0, DR: 0, SF: 0, TR: 1, CN: 0]
Initiating SYN Stealth Scan at 00:36
189.91.32.41 pingprobe type ICMP is inappropriate for this scan type; resetting.
Scanning smtp.webcenter.com.br (189.91.32.41) [2 ports]
Packet capture filter (device enp0s7): dst host 167.88.171.30 and (icmp or icmp6 or ((tcp or udp or sctp) and (src host 189.91.32.41)))
Completed SYN Stealth Scan at 00:36, 2.58s elapsed (2 total ports)
Overall sending rates: 1.55 packets / s, 68.22 bytes / s.
Nmap scan report for smtp.webcenter.com.br (189.91.32.41)
Host is up, received echo-reply ttl 53 (0.16s latency).
rDNS record for 189.91.32.41: avestruz.birdsnet.com.br
Scanned at 2024-02-05 00:36:05 UTC for 3s

PORT    STATE    SERVICE    REASON
465/tcp filtered smtps      no-response
587/tcp filtered submission no-response
Final times for host: srtt: 155984 rttvar: 155984  to: 779920

Read from /usr/bin/../share/nmap: nmap-payloads nmap-services.
Nmap done: 1 IP address (1 host up) scanned in 3.41 seconds
           Raw packets sent: 8 (328B) | Rcvd: 5 (172B)

ok :slight_smile:

Last nmap:
/usr/bin/nmap --dns-servers 1.1.1.1 -dd smtp.gmail.com -p587,465

Starting Nmap 7.80 ( https://nmap.org ) at 2024-02-05 00:40 UTC
Fetchfile found /usr/bin/../share/nmap/nmap-services
Fetchfile found /usr/bin/../share/nmap/nmap.xsl
The max # of sockets we are using is: 0
--------------- Timing report ---------------
  hostgroups: min 1, max 100000
  rtt-timeouts: init 1000, min 100, max 10000
  max-scan-delay: TCP 1000, UDP 1000, SCTP 1000
  parallelism: min 0, max 0
  max-retries: 10, host-timeout: 0
  min-rate: 0, max-rate: 0
---------------------------------------------
Warning: Hostname smtp.gmail.com resolves to 2 IPs. Using 142.251.116.109.
Fetchfile found /usr/bin/../share/nmap/nmap-payloads
Initiating Ping Scan at 00:40
Scanning smtp.gmail.com (142.251.116.109) [4 ports]
Packet capture filter (device enp0s7): dst host 167.88.171.30 and (icmp or icmp6 or ((tcp or udp or sctp) and (src host 142.251.116.109)))
We got a ping packet back from 142.251.116.109: id = 26476 seq = 0 checksum = 39059
ultrascan_host_probe_update called for machine 142.251.116.109 state UNKNOWN -> HOST_UP (trynum 0 time: 2164)
Changing ping technique for 142.251.116.109 to icmp type 8 code 0
Changing global ping host to 142.251.116.109.
Completed Ping Scan at 00:40, 0.02s elapsed (1 total hosts)
Overall sending rates: 169.57 packets / s, 6443.68 bytes / s.
mass_rdns: Using DNS server 1.1.1.1
NSOCK INFO [0.1090s] nsock_iod_new2(): nsock_iod_new (IOD #1)
NSOCK INFO [0.1090s] nsock_connect_udp(): UDP connection requested to 1.1.1.1:53 (IOD #1) EID 8
NSOCK INFO [0.1090s] nsock_read(): Read request from IOD #1 [1.1.1.1:53] (timeout: -1ms) EID 18
Initiating Parallel DNS resolution of 1 host. at 00:40
NSOCK INFO [0.1090s] nsock_write(): Write request for 46 bytes to IOD #1 EID 27 [1.1.1.1:53]
NSOCK INFO [0.1090s] nsock_trace_handler_callback(): Callback: CONNECT SUCCESS for EID 8 [1.1.1.1:53]
NSOCK INFO [0.1090s] nsock_trace_handler_callback(): Callback: WRITE SUCCESS for EID 27 [1.1.1.1:53]
NSOCK INFO [0.1120s] nsock_trace_handler_callback(): Callback: READ SUCCESS for EID 18 [1.1.1.1:53] (80 bytes)
NSOCK INFO [0.1120s] nsock_read(): Read request from IOD #1 [1.1.1.1:53] (timeout: -1ms) EID 34
NSOCK INFO [0.1120s] nsock_iod_delete(): nsock_iod_delete (IOD #1)
NSOCK INFO [0.1120s] nevent_delete(): nevent_delete on event #34 (type READ)
mass_rdns: 0.00s 0/1 [#: 1, OK: 0, NX: 0, DR: 0, SF: 0, TR: 1]
Completed Parallel DNS resolution of 1 host. at 00:40, 0.00s elapsed
DNS resolution of 1 IPs took 0.00s. Mode: Async [#: 1, OK: 1, NX: 0, DR: 0, SF: 0, TR: 1, CN: 0]
Initiating SYN Stealth Scan at 00:40
142.251.116.109 pingprobe type ICMP is inappropriate for this scan type; resetting.
Scanning smtp.gmail.com (142.251.116.109) [2 ports]
Packet capture filter (device enp0s7): dst host 167.88.171.30 and (icmp or icmp6 or ((tcp or udp or sctp) and (src host 142.251.116.109)))
Completed SYN Stealth Scan at 00:40, 1.23s elapsed (2 total ports)
Overall sending rates: 3.26 packets / s, 143.55 bytes / s.
Nmap scan report for smtp.gmail.com (142.251.116.109)
Host is up, received echo-reply ttl 106 (0.0021s latency).
Other addresses for smtp.gmail.com (not scanned): 2607:f8b0:4023:1009::6d
rDNS record for 142.251.116.109: rt-in-f109.1e100.net
Scanned at 2024-02-05 00:40:26 UTC for 1s

PORT    STATE    SERVICE    REASON
465/tcp filtered smtps      no-response
587/tcp filtered submission no-response
Final times for host: srtt: 2076 rttvar: 5000  to: 100000

Read from /usr/bin/../share/nmap: nmap-payloads nmap-services.
Nmap done: 1 IP address (1 host up) scanned in 1.37 seconds
           Raw packets sent: 8 (328B) | Rcvd: 4 (136B)

You need something called a application password which bypasses the web-login for Google services. Set up the application password and your username/password will work. The password will be ONLY for your server.

You also need to enable IMAP from Google if you want to see your google account emails on NextCloud.

Under “All Settings|Forwarding and POP3/IMAP”

This is how you use Google with an app like K9Mail. Think of NextCloud as just another app. In order to use 3rd party email applications with Gmail, you have to do the above. Same with NextCloud.

Your other alternative is to use a full blown mail server.

Thank you, but it doesn’t work. I done what you described, but it doesn’t set a server email sender.

Any other idea?

Did you update this screen? Also, you will need to enable either the Mail app or the Rainloop or the Snappy app to see the IMAP emails from the server. This is only for sending. And finally, if you want to RECEIVE emails IN the SERVER to TRIGGER an action, that’s something else altogether.

1 Like

apppass
imap

Hi, thank you… Yes, I updated the screen before and after apply the settings you recommended.

But the message Nextcloud still cannot send the test email is there.

I attached screenshots of what you said to do.

Missing one update:

https://myaccount.google.com/apppasswords

You need to create an app-password here and use that created password as your password in NextCloud. Google will give you a 16 character password (no spaces required in NextCloud - just the characters).

VPS provider blocked SMTP for security reasons by default. Just needed to ask them to release SMTP and everything is working.


Thank you everyone!

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.