Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

In Progress [CPANEL-26018] MX routing for domains without MX records will not accept email

Discussion in 'E-mail Discussion' started by bellwood, Mar 22, 2019.

  1. bellwood

    bellwood Active Member PartnerNOC

    Joined:
    Sep 25, 2012
    Messages:
    32
    Likes Received:
    5
    Trophy Points:
    8
    Location:
    New York
    cPanel Access Level:
    DataCenter Provider
    By default MX Routing on accounts chooses "Automatic" and goes based off the MX record of the domain.

    If said domain has no MX record RFC 5321 Section 5.1 states:

    ...
    If an empty list of MXs is returned,
    the address is treated as if it was associated with an implicit MX
    RR, with a preference of 0, pointing to that host.
    ...


    In this case, none of the four options in MX routing are toggled and mail simply fails to be accepted:

    550-The mail server could not deliver mail to [email protected]. The
    550-account or domain may not exist, they may be blacklisted, or missing the
    550-proper dns entries.

    MX Routing should fall back to making its' routing decision based on A/AAAA if no MX RR are available.

    This is on cPanel version 78.0.18

    P.S I know theres some opinions on whether or not "fallback" to non MX should be in place "today" but we should adhere to RFC's as much as possible.

    EDIT: Workaround is to manually set the MX routing, at which point mail will work properly either locally or externally.
     
    #1 bellwood, Mar 22, 2019
    Last edited: Mar 22, 2019
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,548
    Likes Received:
    2,182
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @bellwood,

    I believe we may already have an internal case open to address this issue, but I want to be sure the reproduction steps are the same. Can you confirm if the DNS for the affected domain is handled locally on the cPanel server, or if the domain is assigned remote name servers at the registrar?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. bellwood

    bellwood Active Member PartnerNOC

    Joined:
    Sep 25, 2012
    Messages:
    32
    Likes Received:
    5
    Trophy Points:
    8
    Location:
    New York
    cPanel Access Level:
    DataCenter Provider
    Remote nameservers / non-local DNS
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,548
    Likes Received:
    2,182
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @bellwood,

    Also, just to clarify, does the local DNS zone (e.g. /var/named/$domain.tld.db) for this domain exist on the cPanel & WHM server with the default MX records? For instance, even though the DNS is handled remotely, did you happen to remove the local DNS zone from the cPanel server?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. bellwood

    bellwood Active Member PartnerNOC

    Joined:
    Sep 25, 2012
    Messages:
    32
    Likes Received:
    5
    Trophy Points:
    8
    Location:
    New York
    cPanel Access Level:
    DataCenter Provider
    The zone exists locally and there is no MX record.

    Zones are replicated out to an authoritative cluster.

    In this case either the EU removed the MX post-migration or it didn't exist pre-migration.

    The only time this domain ever receives email is to validate SSL requests for the domain.

    Perhaps the routine check that updates the MX routing didn't know what todo when it encountered this, exited with a non-zero and as a result no option was chosen?
     
  6. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,548
    Likes Received:
    2,182
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @bellwood,

    Thanks for providing the additional information. I can confirm the issue occurs when the local zone on the cPanel server is missing the MX records. Internal case CPANEL-22390 is open to report the issue where the available email routing options in the cPanel UI are not presented properly in this scenario. An additional case, CPANEL-26018, is open to report the issue where emails are not properly routed (e.g. the domain is not moved to the /etc/remotedomains file) in this scenario.

    I'll monitor each case and update this thread with more information as it becomes available.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. bellwood

    bellwood Active Member PartnerNOC

    Joined:
    Sep 25, 2012
    Messages:
    32
    Likes Received:
    5
    Trophy Points:
    8
    Location:
    New York
    cPanel Access Level:
    DataCenter Provider
    Much obliged for the timely support and communication.
     
    cPanelMichael likes this.
  8. Hedloff

    Hedloff Well-Known Member

    Joined:
    Jun 7, 2004
    Messages:
    142
    Likes Received:
    5
    Trophy Points:
    168
    Location:
    Up north!
    cPanel Access Level:
    DataCenter Provider
    Why is there not any subdomain DNS zone templates in WHM?

    I have some issues with "Email Routing" for subdomains. It's not possible to set routing as long as there are none MX records for the subdomain. I guess it's just a bug that will be fixed in newer versions, but still should be possible to set.
    Using version v78.0.20 of cPanel now.

    I tried creating a new subdomain, but there are no MX records created.
    Here is my root_standardvirtualftp aswell:


    Code:
    ; cPanel %cpversion%
    ; Zone file for %domain%
    $TTL %ttl%
    @      %nsttl%  IN      SOA     %nameserver%. %rpemail%. (
                    %serial%        ; serial, todays date+todays
                    3600            ; refresh, seconds
                    7200            ; retry, seconds
                    1209600         ; expire, seconds
                    86400 )         ; minimum, seconds
    
    %domain%. %nsttl% IN NS %nameserver%.
    %domain%. %nsttl% IN NS %nameserver2%.
    %domain%. %nsttl% IN NS %nameserver3%.
    %domain%. %nsttl% IN NS %nameserver4%.
    
    %nameserverentry%. IN A %nameservera%
    %nameserverentry2%. IN A %nameservera2%
    %nameserverentry3%. IN A %nameservera3%
    %nameserverentry4%. IN A %nameservera4%
    
    %domain%. IN A %ip%
    %domain%. IN AAAA %ipv6%
    
    %domain%. IN MX 0 mail.%domain%.
    
    mail IN A %ip%
    www IN CNAME %domain%.
    ftp IN A %ip%
    cpanel IN A %ip%
    webmail IN A %ip%
    autoconfig IN A %ip%
    autodiscover IN A %ip%
    
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice