I'm setting up an EC2/AWS instance to send email, currently on mail-tester it is reporting that my email is not signed with DKIM. I think I may have set up DKIM incorrectly. I used the following tutorial: https://www.linuxbabe.com/mail-server/postfix-send-only-multiple-domains-ubuntu
I have some confusions in the section "Create signing table, key table and trusted hosts file" (you may want to search this heading to jump to it)
To add context of my webserver, we can call the domain "mydomain.com", and I'm sending email from "smtp.mydomain.com", these are the directions where I'm uncertain if I'm supposed to substitute example.com with mydomain.com or smtp.mydomain.com
From the tutorial:
Add the following line to the file. This means that if the From:
header in an email contains example.com, then use the sendonly DKIM
selector. You can change sendonly to your preferred DKIM selector name
and it should be unique in your DNS.
*@example.com sendonly._domainkey.example.com Save and close the file. Then create the key table.
sudo nano /etc/opendkim/key.table Add the following line. This means
that for the sendonly DKIM selector, use the private key saved in
/etc/opendkim/keys/example.com/sendonly.private to sign the email.
sendonly._domainkey.example.com
example.com:sendonly:/etc/opendkim/keys/example.com/sendonly.private
Save and close the file. Next, create the trusted hosts file.
sudo nano /etc/opendkim/trusted.hosts Add the following lines to the
newly created file.
127.0.0.1 localhost
*.example.com
not only here, but further in the tutorial it continues to reference example.com, and I'm not sure if I should be using smtp.mydomain.com or just mydomain.com...
Any help would be appreciated!