Question
How can I configure SpamAssassin to use a custom DNS resolver?
Answer
This can be done by creating a custom configuration file for SpamAssassin where a custom dns_server directive is added. This allows SpamAssassin to use a different DNS resolver then the configured system level resolvers.
- Access the server's command line as the root user via SSH or Terminal in WHM.
Create a customization file, in this example we will use as resolv.cf, in the /etc/mail/spamassassin folder:
# touch /etc/mail/spamassassin/resolv.cf
Add the desired
dns_serverconfiguration to the file using your preferred text editor.CONFIG_TEXT: dns_server 4.2.2.1
Check the rule syntax for errors.
# /usr/local/cpanel/3rdparty/bin/spamassassin --lint
Restart the spamd service to apply the change:
# /usr/local/cpanel/scripts/restartsrv_spamd
Comments
0 comments
Please sign in to leave a comment.