• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Input How To enable DNS caching for Plesk Email Security with bind9, netplan and systemd-resolved

obendev

Basic Pleskian
Hey, I've read the following support article. Plesk Email Security: DNS caching is disabled! Please use a local DNS server to improve SPAM recognition via blocklists (for instance systemd-resolved) because I get the following warning:
DNS caching is disabled! Please use a local DNS server to improve SPAM recognition via blocklists (for instance with Plesk's DNS BIND server component or systemd-resolved).
It says that I should edit the file /etc/resolv.conf. However, I think that this is wrong. You shouldn't manually update your resolv.conf file, because all changes will be overwritten after restarting your system or systemd-resolve.

My /etc/resolv.conf
Code:
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "systemd-resolve --status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53
options edns0

It even says
Do not edit.
in the file.

The correct way of enabling DNS caching:
  1. Make sure there are no nameservers set in your netplan .yaml file (/etc/netplan)
  2. Edit nano /etc/systemd/resolved.conf, where you have to set DNS=127.0.0.1.
    You don't have to set the Cache option since it will be disabld for localhost anyways (Makes no sense to cache it twice).
    /etc/resolv.conf should be a symlink and if there has been no changes to the system, the content should look like the following:
    Code:
    nameserver 127.0.0.53
    options edns0
  3. Restart systemd-resolved: service systemd-resolved restart
  4. Verify your changes by checking systemd-resolve --status
My output:
Code:
Global
         DNS Servers: 127.0.0.1
...
If the output of host -tTXT 2.0.0.127.multi.uribl.com is 2.0.0.127.multi.uribl.com descriptive text "permanent testpoint" you are good to go.

You don't need NetworkManager or resolveconf.

Showed exmaples based on Ubuntu 18.04, Plesk Obsidian Version 18.0.29 and Plesk Email Security 1.1.1
 
Last edited:
Back
Top