GoAdmio

installdmarc

Install OpenDMARC and set its AuthservID and TrustedAuthservIDs to this server's hostname

On this page: Overview · Quick start · Syntax · Options · Output · Examples · Troubleshooting · Details · See also


Overview

/go/installdmarc installs OpenDMARC, the service that evaluates incoming mail's DMARC alignment, and sets two directives in its configuration:

[!WARNING] The package is removed and reinstalled every time this command runs, which resets /etc/opendmarc.conf to its packaged default before the two directives are written back. Any other manual changes to that file are lost on every run.

The command does not start, enable, or restart the opendmarc service, and does not wire OpenDMARC into Postfix as a milter — see Details. The call is appended to /var/log/go/installdmarc.log.


Quick start

/go/installdmarc
systemctl enable --now opendmarc

Syntax

/go/installdmarc

The command takes no arguments.


Options

None. Everything is derived from the server itself:

Input Where it comes from
Operating system /usr/local/goadmio/linux/os.db
Hostname used as TrustedAuthservIDs /etc/hostname

Output

Installing DMARC...

followed by whatever dnf or apt print for the install step. The removal step's output is discarded.


Examples

# Install and configure OpenDMARC, then start it
/go/installdmarc
systemctl enable --now opendmarc
# Check what was written
grep -E "AuthservID|TrustedAuthservIDs" /etc/opendmarc.conf

Troubleshooting

Symptom Likely cause Fix
/etc/opendmarc.conf doesn't exist after running The install step failed (missing repository, no network access). The removal step's errors are hidden, and the install step's own errors should show. Check the package manager's output, or install opendmarc manually and run the command again.
Custom settings you'd made to opendmarc.conf are gone The package is purged and reinstalled on every run, resetting the file to its default before the two directives are reapplied. Reapply other custom settings after each run, or edit the file directly instead of re-running this command.
DMARC results never appear in mail headers The service was never started, or isn't wired into Postfix. See Details: start the service and check your Postfix milter configuration.
OpenDMARC ignores the authentication results Postfix adds TrustedAuthservIDs doesn't match the hostname Postfix actually reports in its Authentication-Results header (myhostname in Postfix's main.cf). Make sure Postfix's myhostname matches /etc/hostname, or edit TrustedAuthservIDs to match what Postfix sends.

Details

What it does

  1. Prints Installing DMARC....
  2. Removes any existing opendmarc package — purge on Debian and Ubuntu (which also deletes its configuration files), plain removal on the RHEL family — with its output discarded.
  3. Installs opendmarc fresh, giving back the package's default /etc/opendmarc.conf.
  4. Deletes every line containing AuthservID (this also removes any TrustedAuthservIDs line, since that text contains AuthservID as a substring; the second, explicit deletion of TrustedAuthservIDs lines that follows is redundant).
  5. Appends:
    AuthservID OpenDMARC
    TrustedAuthservIDs <hostname>
    

What it doesn't do

Known issues


See also

Command Description
installdkim Install and configure OpenDKIM
dmarc Add a DMARC TXT record to a domain's Cloudflare DNS (auto-generated or custom value)
dkim Add a DKIM TXT record to a domain's Cloudflare DNS (auto-generated or custom value)
spf Add or refresh the SPF TXT record via Cloudflare
installmail Install and configure webmail services (Postfix and Dovecot)
troubleshoot Troubleshoot email problems in GoAdmio