I have setup DKIM for my custom domain in Exchange Online and it shows pass when sending a test email and inspecting the headers:
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=mydomain.net; dmarc=pass action=none
header.from=mydomain.net; dkim=pass header.d=mydomain.net; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=mydomain.onmicrosoft.com; s=selector2-mydomain-onmicrosoft-com;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=DelGf+gWPEhOvltwPFOouDoJUz05MJ7aNGn/c7H8Dro=;
b=FF7o+GdJEn3iwuwslLI+FzxA8zlUPoVwwvRHIEbQpIrmOc5tPOtAjKYR6E8OD1ZEqJ7aj7q2Qpw4DZPFm8i5iTg/WLwv9vWBTW/2Z8haVXJ9OuJLCdZ91pLscP36byQPzDJ4QPIoWQlCRqrjwyawoBiz0c5YWAmOp321GU0LLh8=
My question is this, I have an application sending email as mydomain.net using IIS SMTP and I have accounted for this IP in my SPF record so it looks something like this:
v=spf1 ip4:1.2.3.4 include:spf.protection.outlook.com -all
If email is sent from 1.2.3.4 for mydomain.net will it still pass DKIM? How do I account for that IP in my DKIM setup?
Your IP will be checked in SPF not in DKIM.
For DKIM singing receiving server will not check your IP. It will check the DKIM signing and your DNS records.