mailserver2 / mailserver

Simple and full-featured mail server using Docker
https://store.docker.com/community/images/mailserver2/mailserver
MIT License
133 stars 28 forks source link

DKIM signing another domain #57

Closed ahmetertem closed 9 months ago

ahmetertem commented 9 months ago

Classification

Reproducibility

Description

I've setup the mailserver to example.com and MAILSERVER_HOSTNAME=cust and my PTR is cust.example.com (checked and confirmed).

And added a new domain anotherdomain.com. anotherdomain.com's DNS records is contains

@     IN      MX  10    cust.example.com.
@       IN TXT "v=spf1 mx ~all"

I can send email from it but it's not DKIM signing.

When I add domain to env file ADD_DOMAINS=anotherdomain.com it's creating a new public and private keys. It's also works too but when I send email from anotherdomain.com it's signing it's own keys.

My question is how can I use same key from cust.example.com to anotherdomain.com ? Or; is it right thing the do ?

Mail systems like google or yandex is only tells you to add mx and spf record only. I don't want to add another DNS records to all other domains except main domain.

Thank you

AndrewSav commented 9 months ago

I could be wrong but I think there is no mechanism to do that, it's not designed this way. For google DKIM records are certainly created for your domain, see here I do not think there is a way around it.

ahmetertem commented 9 months ago

I wasn't sure about is it good idea or not but I'll do if I need to. Thank you @AndrewSav