I host a few websites on my vps server - gentoo linux + postfix + php.

Each website has a dedicated user (for example to run php) called website_com (something_co_uk, address_eu, etc), so the full address of each website is website_com@hosting.com

When anybody sends mail from php, the sender is website_com@hosting.com, which is not surprising. Each mail has a proper Reply-To header, which points to something like no-reply@website.com, someone@website.com, etc.

I have dovecot lmtp configured, so each website has its own accounts separate from system accounts - that also works great.

The hosting domain (hosting.com) and all websites has SPF records allowing A and MX, so the SPF is passed.

Now the key question.

I want to configure opendkim, so all mails sent from website_com@hosting.com would be properly signed for domain website.com

Now - for which address should I configure signing? For 'From' address, or for 'Reply-To' address? Or maybe for both?

Which domain should I add the TXT record to? The hosting.com or the website.com?

And also: does opendkim somehow check incoming emails? I also have spamassasin which seems to perform the DKIM checking, I don't want them to collide.

  • ok, for the incoming emails I can set Mode to 's' which disables veryfing – peku33 Oct 24 '16 at 16:26

I've not used OpenDKIM but I know a bit about email auth so I thought I'd try to help. I think you'd want to add the TXT record to the "From" address's domain (i.e., hosting.com). You'd also want to do SPF and setup DMARC for that domain as well. My understanding is that DKIM is only part of the email authentication picture.

It looks like OPENDKIM will check incoming for DKIM if you configure it to do that. And it looks like there's a Spam Assassin plugin to check DKIM.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.