Skip to main content

Ensuring appropriate SPF record exists

Comments

8 comments

  • cPanelMichael
    Hello, There's no supported method of changing the default SPF record configured when SPF is enabled for accounts. Here's the link to the feature request for this functionality (in-case others viewing this thread would like to vote for it): Configurable SPF default template + automatically include assigned IP to SPF (not just main shared IP) As a workaround, you could setup an entry in the DNS template. Here's a user-submitted comment about this: Configurable SPF default template + automatically include assigned IP to SPF (not just main shared IP) If you choose to use this workaround, you'd likely want to disable the "Email Authentication" feature via "WHM >> Feature Manager" to prevent cPanel users from manually setting up different records. Thank you.
    0
  • Haym
    Thanks Michael. Using the zone templates actually works fine, cPanel even recognises this during the account creation process (see screenshot). So for anybody else doing this, zone templates are your friend.
    0
  • Haym
    I've just realised that resellers have their own zone templates which don't default to the system zone templates. How can we configure default reseller zone templates, please?
    0
  • Haym
    I found the following advice in this thread from 2005: Reseller dns zone template Each time you modify the zone templates in WHM. cPanel will create a new tempalte file called username_simple, username_standard etc. i.e. If you as root modify your DNS zone templates it will create new files called: root_simple root_standard root_standardvirtualftp To avoid having to do this for every reseller in WHM edit these files with your favourite text editor in SSH as root i.e.: * Backup these prior to editing if your not 100% sure !!! nano /var/cpanel/zonetemplates/simple nano /var/cpanel/zonetemplates/standard nano /var/cpanel/zonetemplates/standardvirtualftp
    The same directory appears to be in use today. Is this behaviour supported by cPanel? I have noticed the files don't exist by default, so not sure if they are even still used at this point (the non root_ ones).
    0
  • Haym
    Okay, my testing indicates this works fine, but the files don't exist by default. So you should copy the root versions into place:
    $ cp /var/cpanel/zonetemplates/root_simple /var/cpanel/zonetemplates/simple $ cp /var/cpanel/zonetemplates/root_standard /var/cpanel/zonetemplates/standard $ cp /var/cpanel/zonetemplates/root_standardvirtualftp /var/cpanel/zonetemplates/standardvirtualftp
    So my final question for @cPanelMichael - is this supported or may cPanel drop the behaviour at any time? Thanks!
    0
  • cPanelMichael
    Hello, The officially supported method to modify the zone templates for resellers is to access WHM as the reseller and use the "Edit Zone Templates" option (it's available with the standard reseller privileges). Or, copy the saved root zone templates with commands like this for each reseller username:
    cp -a /var/cpanel/zonetemplates/root_simple /var/cpanel/zonetemplates/reselleruser_simple
    This will ensure the changes are preserved through updates. The method you mentioned may not always work in the future. Thank you.
    0
  • Haym
    The officially supported method to modify the zone templates for resellers is to access WHM as the reseller and use the "Edit Zone Templates" option (it's available with the standard reseller privileges).

    So to clarify, there is no supported method to configure the default templates for all resellers rather than altering the reseller's templates individually each time you need to change them or a new reseller is created? As it would be common for every user, including those belonging to a reseller, to require the same default DNS records on the same server (e.g. for SPF record purposes). Perhaps something for you to consider implementing officially (especially since the behaviour is already there :-p)
    0
  • cPanelMichael
    Hello, That's correct. There's no functionality to automatically apply root zone template changes to existing or new resellers. The following feature request would likely address this issue: Ability to select zone template upon account creation in WHM There's an additional feature request here that would also help: DNS Templates per Package I encourage you to vote and add feedback to these requests if you'd like to see them implemented. Thanks!
    0

Please sign in to leave a comment.