Skip to main content

DNS Zone templates and cpanel injecting wrong include in SPF Records

Comments

8 comments

  • JIKOmetrix
    I opened a ticket for this issue. It turns out that cPanel has decided they know better what my SFP should be for any new account created, instead of using my settings in the /var/cpanel/zonetemplates folder set for root or resellers. They issue this override with a Perl module /usr/local/cpanel/Cpanel/SPF.pm. Not only does it add the '+' to the front of entries in the SPF, it also creates an include for the MX host. I don't mind the '+' syntax as it is implied without it and adding it is explicit. However, Assuming the MX host has an include is going to far. In my case this assumption breaks the users SPF function for receiving servers due to the SPF being too long and we do not want the MX host included only the MX as authorized indicated in the SPF. I'm waiting on help with an override to stop this action. IT NEVER DID THIS before some version update. It used use my entries in the /var/cpanel/zonetemplates for SPF.
    0
  • JIKOmetrix
    I wrong about the Perl module /usr/local/cpanel/Cpanel/SPF.pm. There are multiple Perl modules involved there is no subroutine that for SPF includes however /usr/local/cpanel/Cpanel/SPF/Include.pm is used. When reviewing this module it obtains the include based upon configured smarthosts. We do user smart hosts so we are getting closer to a fix here.
    0
  • JIKOmetrix
    I think the mystery is figured out. Exim config -> Mail -> Autodiscovery SPF include hosts from the smarthost route list This is on by default. I think turning this off will fix my issue.
    0
  • JIKOmetrix
    I can firm this corrected my SPF include issue. It was related to the Exim config -> Mail -> Autodiscovery SPF include hosts from the smarthost route list
    0
  • cPRex Jurassic Moderator
    I was going to say we would need a ticket to see this one in action, so I'm glad you did that. Let us know the final chapter once you have it!
    0
  • JIKOmetrix
    So two things. 1) Exim config -> Mail -> Autodiscovery SPF include hosts from the smarthost route list - Default is 'On' Turn this off to stop cpanel from added a smarthost include. 2) you can add your own in include as need by enabling 'SPF include hosts for all domains on this system' and putting in your SPF host there. This is used on all zones created. Done and fix. Now to fix all of the accounts since this was turned on by default.
    0
  • cPRex Jurassic Moderator
    I'm glad we were able to help track that down with you!
    0
  • JIKOmetrix
    Yeah, If the support guy had not mentioned smarthosts, it would have been a lot harder.
    0

Please sign in to leave a comment.