Kulturmensch
Regular Pleskian
- Server operating system version
- Ubuntu 22.04.2 LTS
- Plesk version and microupdate number
- Plesk Obsidian v18.0.53_build1800230619.12 os_Ubuntu 22.04
Checking the configuration with Plesk E-Mail security I receive this message:
Is there also an example configuration for systemd-resolved available?
Currently I have bind installed and the files resolv.conf and stub-resolve.conf are managed by systemd-resolved and
/etc/resolv.conf is symlinked to /run/systemd/resolve/stub-resolv.conf. The file stub-resolv.conf is every 60 second overwritten with the content:
nameserver 127.0.0.53
options edns0 trust-ad
search
To have 127.0.0.1 on top of this what satisfies the needs of Plesk-E-Mail security is lost again every 60 seconds
My last attempt to solve this (https://wiki.ubuntuusers.de/DNS-Konfiguration/) :
1. sudo systemctl stop systemd-resolved
2, sudo systemctl disable systemd-resolved
3. modify /run/systemd/resolve/sub-resolv.conf as
nameserver 127.0.0.1
nameserver 127.0.0.53
options edns0 trust-ad
search
4. restart postfix /dovecot
Now the configuration checked by Plesk EMail-Security does not show the DNS Caching warning, the resolver tests in the bash work fine and eventually the files resolv.conf and stub-resolv.conf do not get overwritten again and again.
But now the following proglem comes up - I cannot receive E-Mails any longer because the following errors:
and a test E-Mail from outside is not delivered beacause:
(For the last one my first idea was that it could belong to the nameserver by cloudflare and I replaced 1.1.1.1 with 8.8.8.8 (google) but the same problems happend again - incoming E-Mails got blocked
So, my question is does anyone has a recipe how to configure the systemd-resolver to work with Plesk-E-Mail security? I.e. to have permanent the entry 127.0.0.1 on top of the resolv.conf file?
The configuration /etc/systemd/resolved.conf is proably the key to the solution:
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (at your option)
# any later version.
#
# Entries in this file show the compile time defaults. Local configuration
# should be created by either modifying this file, or by creating "drop-ins" in
# the resolved.conf.d/ subdirectory. The latter is generally recommended.
# Defaults can be restored by simply deleting this file and all drop-ins.
#
# Use 'systemd-analyze cat-config systemd/resolved.conf' to display the full config.
#
# See resolved.conf(5) for details.
[Resolve]
# Some examples of DNS servers which may be used for DNS= and FallbackDNS=:
# Cloudflare: 1.1.1.1#cloudflare-dns.com 1.0.0.1#cloudflare-dns.com 2606:4700:4700::1111#cloudflare-dns.com 2606:4700:4700::1001#cloudflare-dns.com
# Google: 8.8.8.8#dns.google 8.8.4.4#dns.google 2001:4860:4860::8888#dns.google 2001:4860:4860::8844#dns.google
# Quad9: 9.9.9.9#dns.quad9.net 149.112.112.112#dns.quad9.net 2620:fe::fe#dns.quad9.net 2620:fe::9#dns.quad9.net
DNS=8.8.8.8
FallbackDNS=8.8.4.4
#Domains=
#DNSSEC=no
#DNSOverTLS=no
#MulticastDNS=no
#LLMNR=no
#Cache=no-negative
#CacheFromLocalhost=no
#DNSStubListener=yes
#DNSStubListenerExtra=
#ReadEtcHosts=yes
#ResolveUnicastSingleLabel=no
Is there a Plesk example how to configure it in an optimal manner to solve the problems mentioned above?
DNS-Caching ist deaktiviert. Verwenden Sie einen lokalen DNS-Server, um die SPAM-Erkennung über Blockierungslisten zu verbessern (zum Beisiel Plesks DNS-Bind-Server oder systemd-resolved). Anleitung für den DNS-BIND-Server (Englisch)
Is there also an example configuration for systemd-resolved available?
Currently I have bind installed and the files resolv.conf and stub-resolve.conf are managed by systemd-resolved and
/etc/resolv.conf is symlinked to /run/systemd/resolve/stub-resolv.conf. The file stub-resolv.conf is every 60 second overwritten with the content:
nameserver 127.0.0.53
options edns0 trust-ad
search
To have 127.0.0.1 on top of this what satisfies the needs of Plesk-E-Mail security is lost again every 60 seconds
My last attempt to solve this (https://wiki.ubuntuusers.de/DNS-Konfiguration/) :
1. sudo systemctl stop systemd-resolved
2, sudo systemctl disable systemd-resolved
3. modify /run/systemd/resolve/sub-resolv.conf as
nameserver 127.0.0.1
nameserver 127.0.0.53
options edns0 trust-ad
search
4. restart postfix /dovecot
Now the configuration checked by Plesk EMail-Security does not show the DNS Caching warning, the resolver tests in the bash work fine and eventually the files resolv.conf and stub-resolv.conf do not get overwritten again and again.
But now the following proglem comes up - I cannot receive E-Mails any longer because the following errors:
network unreachable resolving 'rub.de.dbl.spamhaus.org/A/IN': 2001:1470:8000:c::39#53 (and all other spam-lists)
and a test E-Mail from outside is not delivered beacause:
Client host [194.25.134.20] blocked using
zen.spamhaus.org; Error: open resolver;
DNSBL Error Code - Open/public resolver - The Spamhaus Project (in reply to RCPT TO
command)
(For the last one my first idea was that it could belong to the nameserver by cloudflare and I replaced 1.1.1.1 with 8.8.8.8 (google) but the same problems happend again - incoming E-Mails got blocked
So, my question is does anyone has a recipe how to configure the systemd-resolver to work with Plesk-E-Mail security? I.e. to have permanent the entry 127.0.0.1 on top of the resolv.conf file?
The configuration /etc/systemd/resolved.conf is proably the key to the solution:
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (at your option)
# any later version.
#
# Entries in this file show the compile time defaults. Local configuration
# should be created by either modifying this file, or by creating "drop-ins" in
# the resolved.conf.d/ subdirectory. The latter is generally recommended.
# Defaults can be restored by simply deleting this file and all drop-ins.
#
# Use 'systemd-analyze cat-config systemd/resolved.conf' to display the full config.
#
# See resolved.conf(5) for details.
[Resolve]
# Some examples of DNS servers which may be used for DNS= and FallbackDNS=:
# Cloudflare: 1.1.1.1#cloudflare-dns.com 1.0.0.1#cloudflare-dns.com 2606:4700:4700::1111#cloudflare-dns.com 2606:4700:4700::1001#cloudflare-dns.com
# Google: 8.8.8.8#dns.google 8.8.4.4#dns.google 2001:4860:4860::8888#dns.google 2001:4860:4860::8844#dns.google
# Quad9: 9.9.9.9#dns.quad9.net 149.112.112.112#dns.quad9.net 2620:fe::fe#dns.quad9.net 2620:fe::9#dns.quad9.net
DNS=8.8.8.8
FallbackDNS=8.8.4.4
#Domains=
#DNSSEC=no
#DNSOverTLS=no
#MulticastDNS=no
#LLMNR=no
#Cache=no-negative
#CacheFromLocalhost=no
#DNSStubListener=yes
#DNSStubListenerExtra=
#ReadEtcHosts=yes
#ResolveUnicastSingleLabel=no
Is there a Plesk example how to configure it in an optimal manner to solve the problems mentioned above?