Home

Third party email vendors and DKIM

%3CLINGO-SUB%20id%3D%22lingo-sub-684796%22%20slang%3D%22en-US%22%3EThird%20party%20email%20vendors%20and%20DKIM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-684796%22%20slang%3D%22en-US%22%3E%3CP%3EOur%20group%20supports%20many%20agencies%20with%20in%20one%20tenant%20and%20with%20one%20sending%20domain.%20That%20said%20there%20are%20many%20outside%20vendors%20that%20send%20as%20%22ourdomain.com%22.%20Is%20there%20a%20limit%20to%20the%20number%20of%20DKIM%20entries%20and%20keys%20that%20I%20could%20add%20to%20our%20DNS%3F%20Without%20compiling%20all%20the%20research%20I%20am%20guessing%20we%20have%20over%2040%20different%20vendors%20sending%20email%20as%20%22ourdomain.com%22%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-684796%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExchange%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-684890%22%20slang%3D%22en-US%22%3ERe%3A%20Third%20party%20email%20vendors%20and%20DKIM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-684890%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F176676%22%20target%3D%22_blank%22%3E%40Michael%20Wehking%3C%2FA%3E%26nbsp%3BYou%20can%20only%20have%20one%20DKIM%20per%20domain.%20If%20external%20vendors%20are%20spoofing%20your%20domain%2C%20DKIM%20will%20not%20work%20for%20you.%20You%20will%20need%20to%20use%20just%20SPF%20records.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-684916%22%20slang%3D%22en-US%22%3ERe%3A%20Third%20party%20email%20vendors%20and%20DKIM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-684916%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F347578%22%20target%3D%22_blank%22%3E%40Juan_CUMC%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESPF%20records%20have%20a%20limit%20of%20256%20characters.%20Not%20near%20enough%20for%20all%20the%20vendors%20we%20have.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-686852%22%20slang%3D%22en-US%22%3ERe%3A%20Third%20party%20email%20vendors%20and%20DKIM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-686852%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F347578%22%20target%3D%22_blank%22%3E%40Juan_CUMC%3C%2FA%3E%26nbsp%3B%20Thats%20not%20really%20true.%20DKIM%20is%20governed%20by%20selectors.%20Each%20third%20party%20sender%20could%20use%20a%20unique%20selector%20for%20the%20same%20domain%20and%20that%20would%20work.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-686855%22%20slang%3D%22en-US%22%3ERe%3A%20Third%20party%20email%20vendors%20and%20DKIM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-686855%22%20slang%3D%22en-US%22%3E%3CP%3EThats%20what%20SPF%20macros%20are%20for%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F176676%22%20target%3D%22_blank%22%3E%40Michael%20Wehking%3C%2FA%3E%26nbsp%3B.%3C%2FP%3E%3CP%3EBut%20really%20you%20arent%20hostage%20to%20that%20limit.%20The%20RFCs%20allow%20multiple%20strings%20in%20the%20SPF%20record%26nbsp%3B%3C%2FP%3E%3CP%3EExample%3A%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fkb.isc.org%2Fdocs%2Faa-00356%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fkb.isc.org%2Fdocs%2Faa-00356%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-686941%22%20slang%3D%22en-US%22%3ERe%3A%20Third%20party%20email%20vendors%20and%20DKIM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-686941%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F37938%22%20target%3D%22_blank%22%3E%40A%20D%3C%2FA%3ETrue%20but%20I%20don't%20believe%20SPF%20is%20going%20to%20check%2040%20to%2050%20addresses.%20I%20think%2010%20is%20the%20limit.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-687136%22%20slang%3D%22en-US%22%3ERe%3A%20Third%20party%20email%20vendors%20and%20DKIM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-687136%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F176676%22%20target%3D%22_blank%22%3E%40Michael%20Wehking%3C%2FA%3E%26nbsp%3B%2010%20DNS%20lookups.%20You%20mitigate%20that%20by%20not%20doing%20includes.%20Instead%20expand%20out%20all%20the%20allowed%20sending%20IPs%20and%20add%20those%20to%20the%20SPF%20record%20instead.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-691208%22%20slang%3D%22en-US%22%3ERe%3A%20Third%20party%20email%20vendors%20and%20DKIM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-691208%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F37938%22%20target%3D%22_blank%22%3E%40A%20D%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20correct%2C%20we%20do%20it%20constantly.%26nbsp%3B%20We%20created%20a%20subdomain%20off%20our%20main%20domain%20to%20keep%20things%20organized%20like%26nbsp%3B%20email.yourdomain.com.%20This%20does%20not%20affect%20the%20header%20from%20value%20on%20the%20message%20which%20would%20stay%20as%20yourdomain.com.%20(alignment%20for%20dmarc%20compliance).%26nbsp%3B%20Each%20vendor%20would%20be%20given%20their%20own%20selector%20value.%20s%3Dvendor1%20vendor2...%20etc%20by%20you.%26nbsp%3B%20It%20has%20to%20be%20unique%20for%20each%20vendor%20but%20is%20an%20arbitrary%20value%20you%20can%20make%20up.%3C%2FP%3E%3CP%3EWhen%20THE%20VENDOR%20generates%20the%20dkim%20key%2C%20THE%20VENDOR%20would%20specify%20the%20values%20you%20give%20them%3A%20s%3Dvendor1%20d%3Demail.yourdomain.com.%3C%2FP%3E%3CP%3Ethe%20dns%20record%20you%20create%20in%20your%20dns%20becomes%20vendor1._domainkey.email.yourdomain.com.%26nbsp%3B%20You%20would%20then%20take%20the%20dkim%20key%20that%20they%20generate%20and%20then%20sent%20back%20to%20you%20and%20import%20it%20into%20your%20domain%20record%20in%20your%20dns.%26nbsp%3B%20When%20the%20message%20are%20sent%20from%20the%20vendor%2C%20the%20dkim%20key%20contains%20the%20s%3Dvalue%20d%3Dvalue%20you%20told%20them%20to%20use%20when%20they%20generate%20the%20key.%26nbsp%3B%20The%20recipient%20of%20the%20email%20looks%20up%20the%20value%20after%20the%20d%3D%20to%20get%20to%20the%20doman%20and%20the%20the%20txt%20record%20using%20the%20s%3D%20value.%26nbsp%3B%20The%20key%20pairs%20are%20verified%20and%20the%20mail%20is%20accepted.%3C%2FP%3E%3CP%3E**Note%20you%20can%20simplify%20the%20management%20of%20the%20dkim%20key%20by%20letting%20the%20vendor%20host%20the%20key%20in%20their%20own%20dns%20instead%20of%20you%20hosting%20it%20in%20your%20dns.%26nbsp%3B%20You%20would%20get%20from%20the%20Vendor%20the%20cname%20value%20of%20where%20they%20are%20storing%20the%20key%20in%20their%20dns%2C%20then%20you%20would%20add%20that%20as%20a%20cname%20to%20your%20dns%20record%20as%20a%20cname%20instead%20of%20the%20key.%26nbsp%3B%20I%20would%20recommend%20the%20second%20scenario%20if%20possible.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-691217%22%20slang%3D%22en-US%22%3ERe%3A%20Third%20party%20email%20vendors%20and%20DKIM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-691217%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F222382%22%20target%3D%22_blank%22%3E%40john%20nixon%3C%2FA%3E%26nbsp%3BAgree.%20CNAME%20is%20the%20best%20option.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-691239%22%20slang%3D%22en-US%22%3ERe%3A%20Third%20party%20email%20vendors%20and%20DKIM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-691239%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20Andy.%20That%20answers%20my%20question.%20One%20other%20item%20that%20crossed%20out%20mind%20is%20if%20we%20go%20down%20this%20road%20then%20we%20will%20be%20relying%20on%20the%20Vendors%20to%20have%20messaging%20Hygiene.%20The%20other%20option%20we%20are%20considering%20is%20to%20create%20sub%20address%20in%20DNS%20vendor1.yourdomain.com%2C%20vendor2.yourdomain.com%2C%20etc.%20then%20have%20the%20mail%20routed%20back%20through%20O365%20EOP%20for%20hygiene.%3C%2FP%3E%3CP%3EMichael%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-693205%22%20slang%3D%22en-US%22%3ERe%3A%20Third%20party%20email%20vendors%20and%20DKIM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-693205%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F176676%22%20target%3D%22_blank%22%3E%40Michael%20Wehking%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWith%20the%20possibility%20of%20showing%20off%20my%20ignorance.%26nbsp%3B%20Usually%20dkim%20is%20for%20external%20to%20external%20impersonation%20of%20your%20domain%20or%20authentication.%26nbsp%3B%20How%20would%20you%20get%20the%20mail%20to%20route%20through%20o365%20when%20it%20originates%20from%20an%20external%20sender%20and%20is%20going%20to%20an%20external%20sender.%26nbsp%3B%20Assuming%20that%20you%20can%2C%20does%20o365%20put%20a%20limit%20on%20the%20number%20of%20messages%20you%20can%20route%20through%20their%20system%20per%20day%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-694063%22%20slang%3D%22en-US%22%3ERe%3A%20Third%20party%20email%20vendors%20and%20DKIM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-694063%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F222382%22%20target%3D%22_blank%22%3E%40john%20nixon%3C%2FA%3E%26nbsp%3BI%20do%20believe%20that%20if%20it%20routes%20through%20MS%20then%20it%20will%20hit%20the%2010K%20external%20cap%20for%20externally%20sending.%20If%20its%20the%20same%20sender.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-706724%22%20slang%3D%22en-US%22%3ERe%3A%20Third%20party%20email%20vendors%20and%20DKIM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-706724%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F222382%22%20target%3D%22_blank%22%3E%40john%20nixon%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20have%20a%20few%203rd%20parties%20that%20send%20info%20internal%2C%20those%20would%20be%20the%20ones%20I%20was%20thinking%20of.%20You%20are%20right%20about%20the%20external%20sending%20however.%20Also%20agree%20with%20the%2010%2C000%20cap.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-706734%22%20slang%3D%22en-US%22%3ERe%3A%20Third%20party%20email%20vendors%20and%20DKIM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-706734%22%20slang%3D%22en-US%22%3E%3CP%3EDo%20or%20should%20SPF%20records%20need%20to%20be%20created%20for%20all%20these%20sub%20domians%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Michael Wehking
Occasional Contributor

Our group supports many agencies with in one tenant and with one sending domain. That said there are many outside vendors that send as "ourdomain.com". Is there a limit to the number of DKIM entries and keys that I could add to our DNS? Without compiling all the research I am guessing we have over 40 different vendors sending email as "ourdomain.com"

13 Replies

@Michael Wehking You can only have one DKIM per domain. If external vendors are spoofing your domain, DKIM will not work for you. You will need to use just SPF records.

@Juan_CUMC 

 

SPF records have a limit of 256 characters. Not near enough for all the vendors we have.

@Juan_CUMC  Thats not really true. DKIM is governed by selectors. Each third party sender could use a unique selector for the same domain and that would work.

Thats what SPF macros are for @Michael Wehking .

But really you arent hostage to that limit. The RFCs allow multiple strings in the SPF record 

Example:

https://kb.isc.org/docs/aa-00356

@A DTrue but I don't believe SPF is going to check 40 to 50 addresses. I think 10 is the limit. 

@Michael Wehking  10 DNS lookups. You mitigate that by not doing includes. Instead expand out all the allowed sending IPs and add those to the SPF record instead.

@A D 

 

This is correct, we do it constantly.  We created a subdomain off our main domain to keep things organized like  email.yourdomain.com. This does not affect the header from value on the message which would stay as yourdomain.com. (alignment for dmarc compliance).  Each vendor would be given their own selector value. s=vendor1 vendor2... etc by you.  It has to be unique for each vendor but is an arbitrary value you can make up.

When THE VENDOR generates the dkim key, THE VENDOR would specify the values you give them: s=vendor1 d=email.yourdomain.com.

the dns record you create in your dns becomes vendor1._domainkey.email.yourdomain.com.  You would then take the dkim key that they generate and then sent back to you and import it into your domain record in your dns.  When the message are sent from the vendor, the dkim key contains the s=value d=value you told them to use when they generate the key.  The recipient of the email looks up the value after the d= to get to the doman and the the txt record using the s= value.  The key pairs are verified and the mail is accepted.

**Note you can simplify the management of the dkim key by letting the vendor host the key in their own dns instead of you hosting it in your dns.  You would get from the Vendor the cname value of where they are storing the key in their dns, then you would add that as a cname to your dns record as a cname instead of the key.  I would recommend the second scenario if possible. 

 

@john nixon Agree. CNAME is the best option. 

Thanks Andy. That answers my question. One other item that crossed out mind is if we go down this road then we will be relying on the Vendors to have messaging Hygiene. The other option we are considering is to create sub address in DNS vendor1.yourdomain.com, vendor2.yourdomain.com, etc. then have the mail routed back through O365 EOP for hygiene.

Michael

 

@Michael Wehking 

With the possibility of showing off my ignorance.  Usually dkim is for external to external impersonation of your domain or authentication.  How would you get the mail to route through o365 when it originates from an external sender and is going to an external sender.  Assuming that you can, does o365 put a limit on the number of messages you can route through their system per day?

@john nixon I do believe that if it routes through MS then it will hit the 10K external cap for externally sending. If its the same sender.

@john nixon 

We have a few 3rd parties that send info internal, those would be the ones I was thinking of. You are right about the external sending however. Also agree with the 10,000 cap.

 

Do or should SPF records need to be created for all these sub domians?

Related Conversations
Migrated to O365. Emails going to GMAIL Spam.
Griffe Youngleson in Office 365 on
9 Replies
Email Domain for Posts to a Channel
Jim Hill in Microsoft Teams on
17 Replies
iOS Native VS Outlook
Daniel Schmidt in Microsoft Intune on
7 Replies
Receiving emails is delayed
Kristen_100 in Microsoft Teams on
1 Replies
Use Out of Office without sending email
Ed Leeuwen van in Outlook on
2 Replies