DMARC records with email compliance

castris

Verified User
Joined
Apr 16, 2021
Messages
96
Location
Arcenillas
Hi

After reading Adding DMARC I get a question.

In fact, it is best to have a dedicated address for this purpose, or even better, an alias like abuse@ or postmaster@ for domain creation.

I see the following.

Bash:
echo '_dmarc="v=DMARC1; p=none; sp=none; rua=mailto:spam-reports@|DOMAIN|"' >> dns_txt.conf

In fact, if we use the main email, we save ourselves a lot of hassle.

Is it possible or is there a USER variable for this question? -> mailto:|USER|@|DOMAIN"

The other question I see is about the Tool that will run custom scripts for base features: https://docs.directadmin.com/change...hat-will-run-custom-scripts-for-base-features.


Best regards
 
Hello,

The default location of the template file is /usr/local/directadmin/data/templates/
The default content of dns_txt.conf is the following:

Code:
|DOMAIN|.="v=spf1 a mx ip4:|SERVER_IP||EXTRA_SPF||SPF_IPV6| ~all"

If you want to customize it, you will need first to create the folder /usr/local/directadmin/data/templates/custom/, then copy the mentioned file there /usr/local/directadmin/data/templates/custom/dns_txt.conf and customzie there.

But directadmin does not allow using |USER| token in DNS templates. It won't be parsed. In this case you have two options:

1. use a remote script to get an owner of a DNS zone
2. post a feature request to DirectAdmin

If you want to use PHP for example, take this as an example:

PHP:
|$/usr/local/bin/php
<?php
echo '|DOMAIN|.="Here is something from PHP added"';
?>
DONE|

Please note, that's up to you to expand the example to find a real domain owner. I just posted an idea, you can either ignore it or develop further.
 
Back
Top