Problem sending email

Aug 10 19:37:00 fred rspamd[6224]: ; map; rspamd_map_dns_callback: cannot resolve maps.rspamd.com: query timed out
Aug 10 19:37:01 fred rspamd[6224]: <7n3qic>; map; rspamd_map_dns_callback: cannot resolve maps.rspamd.com: query timed out
Aug 10 19:37:04 fred rspamd[6224]: ; map; rspamd_map_dns_callback: cannot resolve maps.rspamd.com: query timed out
Aug 10 19:37:04 fred rspamd[6224]: ; map; rspamd_map_dns_callback: cannot resolve maps.rspamd.com: query timed out
Aug 10 19:37:06 fred rspamd[6224]: ; map; rspamd_map_dns_callback: cannot resolve maps.rspamd.com: query timed out
Aug 10 19:37:09 fred rspamd[6224]: ; map; rspamd_map_dns_callback: cannot resolve maps.rspamd.com: query timed out
Aug 10 19:37:11 fred rspamd[6224]: ; map; rspamd_map_dns_callback: cannot resolve maps.rspamd.com: query timed out
Aug 10 19:37:12 fred rspamd[6224]: <7n3qic>; map; rspamd_map_dns_callback: cannot resolve maps.rspamd.com: query timed out
Aug 10 19:37:15 fred rspamd[6224]: ; map; rspamd_map_dns_callback: cannot resolve maps.rspamd.com: query timed out
Aug 10 19:37:15 fred rspamd[6224]: ; map; rspamd_map_dns_callback: cannot resolve maps.rspamd.com: query timed out
Aug 10 19:37:17 fred rspamd[6224]: ; map; rspamd_map_dns_callback: cannot resolve maps.rspamd.com: query timed out
Aug 10 19:37:19 fred rspamd[6224]: ; lua; bayes_expiry.lua:437: finished expiry step 48: 998 items checked, 221 significant (1 made persistent), 2 insignificant (0 ttls set), 0 common (0 discriminated), 775 infrequent (34 ttls set), 11 mean, 28 std
Aug 10 19:37:20 fred rspamd[6224]: ; map; rspamd_map_dns_callback: cannot resolve maps.rspamd.com: query timed out
Aug 10 19:37:22 fred rspamd[6224]: ; map; rspamd_map_dns_callback: cannot resolve maps.rspamd.com: query timed out
Aug 10 19:37:23 fred postfix/smtpd[10308]: connect from localhost[127.0.0.1]
Aug 10 19:37:23 fred rspamd[6223]: <2b15df>; proxy; proxy_accept_socket: accepted milter connection from /var/run/rspamd/worker-proxy port 0
Aug 10 19:37:23 fred postfix/smtpd[10308]: warning: connect to Milter service unix:/var/run/opendkim/milter: Permission denied
Aug 10 19:37:23 fred postfix/smtpd[10308]: NOQUEUE: milter-reject: CONNECT from localhost[127.0.0.1]: 451 4.7.1 Service unavailable - try again later; proto=SMTP
Aug 10 19:37:23 fred postfix/smtpd[10308]: NOQUEUE: milter-reject: EHLO from localhost[127.0.0.1]: 451 4.7.1 Service unavailable - try again later; proto=SMTP helo=<www.fio01.com>
Aug 10 19:37:23 fred postfix/smtpd[10308]: disconnect from localhost[127.0.0.1]
Aug 10 19:37:23 fred rspamd[6223]: <2b15df>; milter; rspamd_milter_process_command: got connection from 127.0.0.1:58310
Aug 10 19:37:23 fred rspamd[6223]: <2b15df>; proxy; proxy_milter_finish_handler: finished milter connection
Aug 10 19:37:23 fred rspamd[6224]: <7n3qic>; map; rspamd_map_dns_callback: cannot resolve maps.rspamd.com: query timed out
Aug 10 19:37:26 fred rspamd[6224]: ; map; rspamd_map_dns_callback: cannot resolve maps.rspamd.com: query timed out
Aug 10 19:37:26 fred rspamd[6224]: <>; rdns; rdns_make_request_full: cannot send DNS request: Connection refused
Aug 10 19:37:26 fred rspamd[6224]: ; map; rspamd_map_dns_callback: cannot resolve maps.rspamd.com: query timed out
Aug 10 19:37:28 fred rspamd[6224]: ; map; rspamd_map_dns_callback: cannot resolve maps.rspamd.com: query timed out

Michel-André

Thank you Michel

Frederic,

Supprime ton dernier message S.V.P.

Michel-André

1 Like

@frederic

Hi

I don’t quite agree here, NethServer and SME are very easy to use, but mail has gone much more complex in the last 20-30 years…

Not all providers handle their clients well, some think of clients still as cows for milking…

Sure spam is a global problem. But when Mail was designed, smtp had only a simple duty, move mail from one server to another server. Everyone and all admins of servers were in those days all US government employees… So there were no “rogues” in the network, and admins could be trusted.

Nowadays? All countries are on the Internet, admins don’t trust each other, and neither do countries.

And it still has to work…

So a lot of stuff was attached to the old protocolls… (SPF, DMARC, etc).

And it still has to work…
So it makes for more work to setup a good mail server, and the environment a mail server needs, like fix IPs and correct DNS.

I think even with a Microsoft SBS you would be having great problems, with your provider / router!

Yet we’re still motivated to make this a better place! :slight_smile:

My 2 cents
Andy

My 2 cents
Andy

4 Likes

check if unbound is up and try to understand why it does’t resolve the dns queries

this is probably why you cannot send email, on my server

[root@prometheus ~]# ll /var/run/opendkim/milter
srwxrwx--- 1 opendkim mail 0 Jun 29 18:44 /var/run/opendkim/milter

Hi Stéphane,

I think you have a hint:

[root@fred vmail]# systemctl status unbound
● unbound.service - Unbound recursive Domain Name Server
Loaded: loaded (/usr/lib/systemd/system/unbound.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2020-08-10 21:19:16 CEST; 30s ago
Process: 26055 ExecStart=/usr/sbin/unbound -d $UNBOUND_OPTIONS (code=exited, status=1/FAILURE)
Process: 26052 ExecStartPre=/usr/sbin/unbound-anchor -a /var/lib/unbound/root.key -c /etc/unbound/icannbundle.pem (code=exited, status=0/SUCCESS)
Process: 26049 ExecStartPre=/usr/sbin/unbound-checkconf (code=exited, status=0/SUCCESS)
Main PID: 26055 (code=exited, status=1/FAILURE)

Aug 10 21:19:16 fred.fio01.com systemd[1]: Starting Unbound recursive Domain Name Server…
Aug 10 21:19:16 fred.fio01.com unbound-checkconf[26049]: unbound-checkconf: no errors in /etc/unbound/unbound.conf
Aug 10 21:19:16 fred.fio01.com systemd[1]: Started Unbound recursive Domain Name Server.
Aug 10 21:19:16 fred.fio01.com unbound[26055]: Aug 10 21:19:16 unbound[26055:0] error: can’t bind socket: Cannot assign requested address for ::1
Aug 10 21:19:16 fred.fio01.com unbound[26055]: Aug 10 21:19:16 unbound[26055:0] error: cannot open control interface ::1 8953
Aug 10 21:19:16 fred.fio01.com unbound[26055]: Aug 10 21:19:16 unbound[26055:0] fatal error: could not open ports
Aug 10 21:19:16 fred.fio01.com systemd[1]: unbound.service: main process exited, code=exited, status=1/FAILURE
Aug 10 21:19:16 fred.fio01.com systemd[1]: Unit unbound.service entered failed state.
Aug 10 21:19:16 fred.fio01.com systemd[1]: unbound.service failed.
[root@fred vmail]#

Michel-André

signal-event nethserver-unbound-update

it should reconfigure and start the service

check if you have no valid configuration in /etc/unbound/conf.d/

Same error.

But:

[root@fred vmail]# ls -als /etc/unbound/conf.d/
total 4
0 drwxr-xr-x. 2 root unbound 30 Jun 24 07:59 .
0 drwxr-xr-x. 5 root root 237 Aug 10 21:24 …
4 -rw-rw-r-- 1 root unbound 601 Nov 27 2019 example.com.conf
[root@fred vmail]#

Is that normal?

Michel-André

same at home

Same on my main server also.

Michel-André

unbound write to /var/log/messages, check if you have something when you trigger nethserver-unbound-update

check if opendkim is up, probably it block you to send email

systemctl status opendkim

Thank you so much for your replies, I was loosing hope.

Aug 10 21:30:36 fred esmith::event[26819]: Action: /etc/e-smith/events/nethserver-unbound-update/S00initialize-default-databases SUCCESS [0.344155]
Aug 10 21:30:37 fred esmith::event[26819]: expanding /etc/unbound/unbound.conf
Aug 10 21:30:37 fred esmith::event[26819]: Action: /etc/e-smith/events/actions/generic_template_expand SUCCESS [0.165305]
Aug 10 21:30:37 fred systemd: Reloading.
Aug 10 21:30:37 fred systemd: Starting Unbound recursive Domain Name Server…
Aug 10 21:30:37 fred unbound-checkconf: unbound-checkconf: no errors in /etc/unbound/unbound.conf
Aug 10 21:30:37 fred systemd: Started Unbound recursive Domain Name Server.
Aug 10 21:30:37 fred esmith::event[26819]: [INFO] unbound has been started
Aug 10 21:30:37 fred esmith::event[26819]: Action: /etc/e-smith/events/actions/adjust-services SUCCESS [0.430707]
Aug 10 21:30:37 fred esmith::event[26819]: Event: nethserver-unbound-update SUCCESS
Aug 10 21:30:37 fred unbound: Aug 10 21:30:37 unbound[26856:0] error: can’t bind socket: Cannot assign requested address for ::1
Aug 10 21:30:37 fred unbound: Aug 10 21:30:37 unbound[26856:0] error: cannot open control interface ::1 8953
Aug 10 21:30:37 fred unbound: Aug 10 21:30:37 unbound[26856:0] fatal error: could not open ports
Aug 10 21:30:37 fred systemd: unbound.service: main process exited, code=exited, status=1/FAILURE
Aug 10 21:30:37 fred systemd: Unit unbound.service entered failed state.
Aug 10 21:30:37 fred systemd: unbound.service failed.
Aug 10 21:30:51 fred systemd: Started Session c66 of user root.

fatal error: could not open ports

For DKIM, all looks OK.

[root@fred ~]# systemctl status opendkim
● opendkim.service - DomainKeys Identified Mail (DKIM) Milter
Loaded: loaded (/usr/lib/systemd/system/opendkim.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/opendkim.service.d
└─nethserver.conf
Active: active (running) since Mon 2020-08-10 18:26:58 CEST; 3h 5min ago
Docs: man:opendkim(8)
man:opendkim.conf(5)
man:opendkim-genkey(8)
man:opendkim-genzone(8)
man:opendkim-testadsp(8)
man:opendkim-testkey
OpenDKIM
Main PID: 3596 (opendkim)
CGroup: /system.slice/opendkim.service
└─3596 /usr/sbin/opendkim -x /etc/opendkim.conf -P /var/run/opendkim/opendkim.pid

Aug 10 18:26:58 fred.fio01.com systemd[1]: Starting DomainKeys Identified Mail (DKIM) Milter…
Aug 10 18:26:58 fred.fio01.com systemd[1]: Started DomainKeys Identified Mail (DKIM) Milter.
Aug 10 18:26:58 fred.fio01.com opendkim[3596]: OpenDKIM Filter v2.11.0 starting (args: -x /etc/opendkim.conf -P /var/run/opendkim/opendkim.pid)
[root@fred ~]#

Michel-André

check [Solved] Unbound service problem: service doesn't start

it looks like ipv6 is disabled

[root@fred ~]# ip a | grep inet6
[root@fred ~]#

[root@fred ~]# sysctl -a | grep disable_ipv6
sysctl: reading key “net.ipv6.conf.all.stable_secret”
net.ipv6.conf.all.disable_ipv6 = 1
sysctl: net.ipv6.conf.default.disable_ipv6 = 1
reading key “net.ipv6.conf.default.stable_secret”
sysctl: reading key "net.ipv6.conf.enp31s0.stable_secret"net.ipv6.conf.enp31s0.disable_ipv6 = 1

sysctl: net.ipv6.conf.ens2.disable_ipv6 = 1
reading key “net.ipv6.conf.ens2.stable_secret”
sysctl: net.ipv6.conf.lo.disable_ipv6 = 1
reading key “net.ipv6.conf.lo.stable_secret”
[root@fred ~]#

It looks OK but I do not unserstand the Solution by dnutan…

I will look more closely at messages.

Michel-André

[root@prometheus ~]# sysctl -a | grep disable_ipv6
sysctl: reading key "net.ipv6.conf.all.stable_secret"
net.ipv6.conf.all.disable_ipv6 = 0
sysctl: reading key "net.ipv6.conf.br0.stable_secret"
net.ipv6.conf.br0.disable_ipv6 = 0
sysctl: reading key "net.ipv6.conf.default.stable_secret"
net.ipv6.conf.default.disable_ipv6 = 0
sysctl: reading key "net.ipv6.conf.ens19.stable_secret"
net.ipv6.conf.ens19.disable_ipv6 = 0
sysctl: reading key "net.ipv6.conf.eth0.stable_secret"
net.ipv6.conf.eth0.disable_ipv6 = 0
sysctl: reading key "net.ipv6.conf.lo.stable_secret"
net.ipv6.conf.lo.disable_ipv6 = 0
sysctl: reading key "net.ipv6.conf.tap0.stable_secret"
net.ipv6.conf.tap0.disable_ipv6 = 0
sysctl: reading key "net.ipv6.conf.vb-nsdc.stable_secret"
net.ipv6.conf.vb-nsdc.disable_ipv6 = 0

you have ipV6 disabled on your server…that not good

from dnutan

I think you are close to a solution.

I never played with IPv6, How can I enable it ?

Michel-André

what is the content of /etc/sysctl.conf and /etc/sysctl.d/

[root@fred ~]# cat /etc/sysctl.conf
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
[root@fred ~]#

[root@fred ~]# ls -als  /etc/sysctl.d/
total 16
 0 drwxr-xr-x.   2 root root   52 Aug  6 19:30 .
12 drwxr-xr-x. 130 root root 8192 Aug 10 20:48 ..
 0 lrwxrwxrwx    1 root root   14 May 19 08:35 99-sysctl.conf -> ../sysctl.conf
 4 -rw-r--r--    1 root root   74 Aug  2 14:44 disableipv6.conf
[root@fred ~]#


[root@fred ~]# cat /etc/sysctl.d/disableipv6.conf
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
[root@fred ~]#

Michel-André

rpm -qf /etc/sysctl.d/disableipv6.conf

I think this fragment is the culprit