I need to setup SPK and DKIM record for mail.mydomain.com. I have set the following at namecheap -
For SPF -
Record type :TXT
Hostname : mail.mydomain.com
Value : v=spf1 ip4:x.x.x.x ~all
For DKIM -
Record type : TXT
Host : mailer._domainkey
Value : "v=DKIM1; k=rsa; p=LONGSTRING"
This does not work when checked with online checking tools like mail-tester, mxtoolbox etc.
[SOLVED]
Unlike one of the answers below, it is possible to setup records for subdomains as well. It is an issue with Namecheap (and likely other providers as well). You need to setup hostname like this-
SPF hostname : mail
DKIM hostname : mailer._domainkey.mail
Namecheap will automatically add the domain.com at the end. You don't need to add it. Also DNS propagation for DKIM records took over 15 hours.