installdmarc
Install OpenDMARC and set its
AuthservIDandTrustedAuthservIDsto this server's hostname
- Command:
/go/installdmarc - Category: Mail
- Required option: None
- Output:
Installing DMARC..., followed by the package manager's own output - Last updated: 2026-11-20
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:
AuthservID— the name OpenDMARC reports itself as inAuthentication-Resultsheaders.TrustedAuthservIDs— set to this server's hostname, so OpenDMARC trusts the SPF and DKIM results Postfix already added to the message.
[!WARNING] The package is removed and reinstalled every time this command runs, which resets
/etc/opendmarc.confto 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
- Prints
Installing DMARC.... - Removes any existing
opendmarcpackage —purgeon Debian and Ubuntu (which also deletes its configuration files), plain removal on the RHEL family — with its output discarded. - Installs
opendmarcfresh, giving back the package's default/etc/opendmarc.conf. - Deletes every line containing
AuthservID(this also removes anyTrustedAuthservIDsline, since that text containsAuthservIDas a substring; the second, explicit deletion ofTrustedAuthservIDslines that follows is redundant). - Appends:
AuthservID OpenDMARC TrustedAuthservIDs <hostname>
What it doesn't do
- Does not start or enable the service. Run
systemctl enable --now opendmarcyourself, or restart it through whatever step normally applies GoAdmio's mail configuration. - Does not configure Postfix. For OpenDMARC to actually see mail, Postfix needs it added as a milter (typically
smtpd_milters/non_smtpd_milterspointing at OpenDMARC's socket). This command only edits OpenDMARC's own file. - Does not touch any other
opendmarc.confsetting, such as the socket path, PID file, or user — it relies entirely on the package's defaults for those.
Known issues
- Destructive refresh. Removing and reinstalling the package on every run, rather than editing the existing file in place, discards any other customization in
opendmarc.conf. - Redundant sed command. The first
seddeletion already removesTrustedAuthservIDslines as a side effect of matching the substringAuthservID; the second, explicit deletion never finds anything left to delete. - If the install fails, the
sed/teesteps still run.sed -ion a missing file errors, and the subsequenttee -acreates a bare two-line file at/etc/opendmarc.confeven though noopendmarcpackage or service exists — leaving a configuration file for software that isn't installed.
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 |