Skip to main content

How to change the WHM server sender address

Comments

4 comments

  • quietFinn

    Do you have correct SPF, DKIM & DMARC records for the server's hostname?

    WHM -> Email -> Email Deliverability

     

     

    1
  • Benito

    Hi @quietFinn, thanks for replying!

    Yes, SPF, DKIM, and DMARC are perfectly configured and valid for the server's hostname in WHM -> Email -> Email Deliverability.

    The issue seems to be exclusively related to Microsoft's aggressive filtering (Hotmail/Outlook). While Google receives the emails perfectly and validates all DNS records without issues, Microsoft rejects them with a generic authentication error, falsely flagging the DKIM as "Fail".

    It appears that Microsoft's SmartScreen filters are extremely hostile towards system-generated subdomains (like cpanel@server.hostname.com). Even when the DNS records are 100% correct, if the IP or the hostname lacks a massive sending reputation, Microsoft blocks it and masks the reputation block as an authentication error.

    Here is an obfuscated example of the bounce from Microsoft, where you can see SPF and DMARC pass, but it arbitrarily fails DKIM:

    Plaintext
     
    This message was created automatically by mail delivery software.
    A message that you sent could not be delivered to one or more of its
    recipients. This is a permanent error. The following address(es) failed:
    
      client@hotmail.com
        host hotmail-com.olc.protection.outlook.com [xx.xx.xx.xx]
        SMTP error from remote mail server after end of data:
        550 5.7.515 Access denied, sending domain SERVER.HOSTNAME.COM doesn't meet the required authentication level. The sender's domain in the 5322.From address doesn't meet the authentication requirements defined for the sender. To learn how to fix this see:
        https://go.microsoft.com/fwlink/p/?linkid=2319303 Spf= Pass , Dkim= Fail , DMARC= Pass [SAWPR...namprd20.prod.outlook.com]
    

    And here is the exact same automated notification (WP Toolkit) being delivered flawlessly to a Google Workspace/Gmail account, passing all checks:

    Plaintext
     
    Delivered-To: client@gmail.com
    ...
    ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@server.hostname.com header.s=default header.b=qZdX70NK; spf=pass (google.com: domain of cpanel@server.hostname.com designates 111.111.111.111 as permitted sender) smtp.mailfrom=cpanel@server.hostname.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=server.hostname.com
    Return-Path: <cpanel@server.hostname.com>
    Received: from server.hostname.com (server.hostname.com. [111.111.111.111]) by mx.google.com with ESMTPS id ... for <client@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
    Received-SPF: pass (google.com: domain of cpanel@server.hostname.com designates 111.111.111.111 as permitted sender) client-ip=111.111.111.111;
    Authentication-Results: mx.google.com; dkim=pass header.i=@server.hostname.com header.s=default header.b=qZdX70NK; spf=pass (google.com: domain of cpanel@server.hostname.com designates 111.111.111.111 as permitted sender) smtp.mailfrom=cpanel@server.hostname.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=server.hostname.com
    DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=server.hostname.com; s=default; ...
    

    Because of this behavior from Microsoft, the most reliable solution would be changing the hardcoded cpanel@server.hostname.com sender address to a regular, highly-reputable domain address (like notifications@maindomain.com), or routing it through an external SMTP relay.

    Is there any native way in WHM to achieve this change for WP Toolkit and other system alerts without having to rely on Exim rewrite rules?

    0
  • cPRex Jurassic Moderator

    It might be better to reach out to Microsoft about this than to try and change something on the server.  Since things are getting to Google just fine it doesn't seem like this is a server-level issue.

    0
  • Benito

    Haha, you are absolutely right that this is a Microsoft issue and not a server misconfiguration!

    But let's be honest... getting a hold of an actual human at Microsoft to fix their SmartScreen filters for a VPS hostname is probably harder and takes more time than rewriting cPanel's core code! 😅

    I know their SNDS program exists, but we all know how frustrating and automated their rejection walls can be. I was just hoping there was a native, simple field in WHM to change that hardcoded cpanel@ address to a regular domain email and bypass the Microsoft headache entirely.

    It looks like I'll just stick to the Exim rewrite rules for now to get around their filters. Thanks for taking the time to reply!

    0

Please sign in to leave a comment.