Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Add DKIM/DMARC Configuration #92

Closed
kayvanaarssen opened this issue Oct 20, 2021 · 4 comments
Closed

Feature Request: Add DKIM/DMARC Configuration #92

kayvanaarssen opened this issue Oct 20, 2021 · 4 comments
Labels
enhancement New feature or request Planned

Comments

@kayvanaarssen
Copy link
Sponsor

Standard; Enable DKIM/DMARC

Script we use;
Would be nice to have an option for this in the portal under domains / standards


# Get list of existing DKIM configs (using Exchange Online PowerShell).
Get-DkimSigningConfig

# Get all SMTP domains actually used in Exchange Online.
$Domains = Get-Mailbox -ResultSize Unlimited | Select-Object EmailAddresses -ExpandProperty EmailAddresses | Where-Object { $_ -like "smtp*"} | ForEach-Object { ($_ -split "@")[1] } | Sort-Object -Unique
$Domains

# Create order text for DKIM and DMARC records.
$TenantName = "DOMAIN.onmicrosoft.com"
$ReportMailbox = "dmarcreports@DOMAIN.COM"

$Result = "Protection`tDomain`tTyp`tHost name`tValue`tTTL`n"

foreach ($Domain in $Domains) {
    $Result += "SPF`t$Domain`tTXT`t@`tv=spf1 include:spf.protection.outlook.com -all`t3600`n"
    $Result += "DKIM`t$Domain`tCNAME`tselector1._domainkey`tselector1-$($Domain -replace "\.", "-")._domainkey.$TenantName`t3600`n"
    $Result += "DKIM`t$Domain`tCNAME`tselector2._domainkey`tselector2-$($Domain -replace "\.", "-")._domainkey.$TenantName`t3600`n"
    $Result += "DMARC`t$Domain`tTXT`t_dmarc`tv=DMARC1; p=none; pct=100; rua=mailto:$ReportMailbox; ruf=mailto:$ReportMailbox; fo=1`t3600`n"
}

$Result | Clip

# Enable new DKIM (using Exchange Online PowerShell).
foreach ($Domain in $Domains) {
    Write-Verbose -Verbose -Message "Enabling DKIM for $Domain..."
    New-DkimSigningConfig -DomainName $Domain -Enabled $true
}

# Set existing DKIM (using Exchange Online PowerShell).
foreach ($Domain in $Domains) {
    Write-Verbose -Verbose -Message "Enabling DKIM for $Domain..."
    Set-DkimSigningConfig -Identity $Domain -Enabled $true
}
@KelvinTegelaar KelvinTegelaar added the enhancement New feature or request label Oct 20, 2021
@KelvinTegelaar
Copy link
Owner

Planned for v1.3.0

@KelvinTegelaar KelvinTegelaar changed the title Feature Request Feature Request: Add DKIM/DMARC Configuration Oct 20, 2021
@KelvinTegelaar
Copy link
Owner

Dev contains reporting for DKIM/DMARC and more.

@kayvanaarssen
Copy link
Sponsor Author

Might look over it, but where is this feature in the latest version?

@kayvanaarssen
Copy link
Sponsor Author

@KelvinTegelaar Know this is an old issue. But it would be nice to enable https://security.microsoft.com/dkimv2 this option in CIPP.
So you get back the records you need to add to the DNS and after that enable DKIM for the domains needed.
You said it was planned for 1.3.0, but either i'm missing something or its still not in the latest version?

KelvinTegelaar pushed a commit that referenced this issue Jun 20, 2024
[pull] dev from KelvinTegelaar:dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Planned
Projects
None yet
Development

No branches or pull requests

2 participants