Hi Andrew
Hope this adds some color to greyworld!
I had the same issue as you, (multiple domains hosted on the one installation of MIAB with “MTA-STS policy is missing…” errors being reported on the System -> Status Check page, for all of the domains except the one hosting the MIAB install).
I am now in the position where everything is green on the admin -> System -> Status Check page summary page. I did the following three things, but suspect you might be able to get away with doing just items 1 & 3.
- Issue TLS (SSL) certificates for all of the new autocreated “mta.sts.yourdomain-dot-com” sites.
You made the observation that it doesn’t automatically install certificates as part of the upgrade, that’s correct, but it does automatically do the certificate creation, you just have give it a nudge by pressing the blue “Provision” button on the admin -> System -> TLS (SSL) Certificates page. This will then run through the process of engaging with the certbot to obtain and install the certificate for each site that doesn’t yet have a Lets Encrypt certificate installed.
Note: Make sure that any virtual firewalls protecting your MIAB server at your hosting company (linode, DigitalOcean etc), are configured as per the Firewall settings in the MIAB set up guide,… specifically port 80 needs to be open for Lets Encrypt servers to talk with the MIAB installation).
Pressing the “System -> TLS (SSL) Certificate -> Provision” button once, should result in ALL of the listed Domains showing they have a signed and valid certificate status ,… no need to manually configure each one.
- Add an “mta-sts.txt” policy document for each site.
With regards to the red error messages about “MTA-STS policy missing” that are listed on the System -> Status Check page. I am unsure whether doing the following might be overkill, but if you do it, it will remove the error messages.
My understanding of implementing the MTA-STS policy is that for each domain hosted by the MIAB installation, there needs to be a subdomain called “mta-sts.of-whatever-listed-domain-dot-com”. And each of these subdomain sites hosts a text file stored in a hidden sub-directory which is your mta-sts policy file for that site. My assumption was that each of the sites listed needed its own own policy file stored in the hidden sub directory for that site, … but now I am not so sure as I made some edits to the txt files stored in one of my subdomains and could not get the damn thing to reflect my changes when I tried to read it using a web browser. Turns out that the actual mta-sts.txt policy file being accessed for ANY of the domains hosted on the MIAB server was the same mta-sts.txt file sourced from /var/lib/mailinabox and not from the hidden directory (./well-known) located under each subdomain website (/home/user-data/www/"mta-sts.whatever-listed-domain-dot-com).
Probably OK to do as each website serves up the same mta-sts policy content.
- Create and host two DNS TXT records for each of the auto created “mta-sts” subdomain websites
System => Custom DNS => set custom DNS records
Name : [ _mta-sts ] . [ “domain name” from pull down menu ]
Type : [ “TXT” from pull down menu ]
Value : [ v=STSv1; id=yyyymmdd-anyblahblah ] … where I believe the id string can be anything
Press the “Set Record” button to add the custom DNS record
Repeat the above process to add the second custom DNS record for the chosen domain
Name : [ _mta-sts ] . [ “domain name” from pull down menu ]
Type : [ “TXT” from pull down menu ]
Value : [ v=TLSRPTv1; rua=mailto:tlsrpt@yourdomain.com]
Press the “Set Record” button to add the custom DNS record
(Note if the email address “tlsrpt@yourdomain-dot-com” doesn’t exist, create an alias and map it to an address that does.)
Repeat step 2 for each domain available in the pull down menu (System => Custom DNS => Set custom DNS records => Name = [ ] . [ pull down menu ] )
After doing all of the above and rebooting the machine my “System -> Status Checks” page was all green.
If you ignore the error and missing certificates?.. not sure. … but a its safe to assume that something will get rejected at some point in the (…far distant?) future.
Hope this helped.