Skip to main content

cPanel 138 / CloudLinux 8 – KAM_DMARC_QUARANTINE false positives on local Exim delivery

Comments

1 comment

  • cPRex Jurassic Moderator

    Hey there!  You always post the most interesting things!  I've got a 4 part answer to this one.

    1. Why local mail isn’t DKIM-signed

    cPanel’s Exim only DKIM-signs in the remote_smtp transport. Mail between accounts on the same server goes through the local delivery transports (local_delivery, virtual user, etc.) and never touches remote_smtp. So no signature is added. Nothing is misconfigured.

    SPF is also not meaningfully evaluated for these messages. The sender is the server itself or an authenticated user, so SPF is skipped or there is no Received-SPF header.

    2. Why KAM_DMARC_QUARANTINE fires

    check_dmarc_quarantine() comes from SpamAssassin’s DMARC plugin. It sees:

    • No DKIM signature, so DKIM is none/fail.
    • No usable SPF result, since the hop is trusted and SPF is skipped.
    • The From domain publishes p=quarantine.

    So it concludes “DMARC would quarantine this.” The plugin has no concept of “this never left the server.” ALL_TRUSTED (-1.0) in the same report confirms the message is internal.

    3. DKIM-signing local mail

    There is no supported cPanel option for this. I suppose there is always a way to modify things to make this work, but I don't have any recommended options here.

    4. Supported way to exempt internal mail without touching KAM.cf

    Offset the score with a meta rule in a file that KAM updates (sa-update) won’t overwrite. Use /etc/mail/spamassassin/local.cf, or MailScanner’s /etc/MailScanner/spam.assassin.prefs.conf if that’s the file your MSFE install reads:

     
    meta     LOCAL_INTERNAL_DMARC_OFFSET  KAM_DMARC_QUARANTINE && ALL_TRUSTED
    describe LOCAL_INTERNAL_DMARC_OFFSET  Cancel KAM DMARC quarantine score on internal mail
    score    LOCAL_INTERNAL_DMARC_OFFSET  -1.5

    Match the offset to the current KAM_DMARC_QUARANTINE score. The rule stays active for external mail, and ALL_TRUSTED only fires when every hop is in your trusted_networks/internal_networks. Check that the server’s own IPs are listed there. Then run spamassassin --lint and restart MailScanner.

    For the simplest approach, use sa-update-proof local score overrides. For something per-direction, you can also use a MailScanner ruleset (From:/To: matching local domains) to raise the required score or skip scanning for local-to-local mail. I’d skip that, because a compromised internal account is a real spam source.

    cPanel doesn’t ship or support KAM.cf (it’s from the McGrail channel).  And, as you said earlier, MSFE is also being removed. After migrating to cPanel’s native Exim/SpamAssassin setup, the same local.cf override approach applies.

    0

Please sign in to leave a comment.