Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Page 1 of 3 1 2 3 LastLast
Results 1 to 15 of 37
  1. #1
    Member
    Join Date
    Nov 2001
    Posts
    492

    Question How to enable SPF and DomainKeys by default?

    Hello,

    Anyone know how to do this?

    Both SPF and DomainKeys are disabled by default for new cpanel accounts, but we'd like them to be enabled.

    Is there a reason they are disabled by default? (ie: Any "gotchas" or something that we should be concerned about or aware of?)

    Thanks.
    I am an eNom ETP.
    Sign up today if you want an eNom.com domain reseller account from a reliable provider.
    * We now provide support and service to over 3250 happy resellers!

  2. #2
    Member viraj's Avatar
    Join Date
    Sep 2006
    Location
    India
    Posts
    209
    cPanel/Enkompass Access Level

    DataCenter Provider

    Smile

    You can setup SPF records in the DNS zone templates from WHM, such that any new accounts created will have those included..

  3. #3
    Member
    Join Date
    Nov 2001
    Posts
    492

    Default

    Quote Originally Posted by viraj View Post
    You can setup SPF records in the DNS zone templates from WHM, such that any new accounts created will have those included..
    What are the DNS records supposed to look like that will work automatically?

    Also, how do we switch "on" the checkboxes in the cpanel page so the customers sees these are enabled?
    I am an eNom ETP.
    Sign up today if you want an eNom.com domain reseller account from a reliable provider.
    * We now provide support and service to over 3250 happy resellers!

  4. #4
    Member
    Join Date
    Dec 2003
    Location
    France
    Posts
    300
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    For the SPF record, you would add something like this in your DNs templates :

    Code:
    %domain%. IN TXT "v=spf1 a mx ptr ~all"
    Now, for the Domainkeys, I think your best option would be to write a /scripts/postwwwacct that would grab the username of the account that is being created and run /usr/local/cpanel/bin/domain_keys_installer <<username>>
    Marie - Co-Owner
    Need Further Assistance ? Here you go !
    English, french and spanish support

  5. #5
    Member
    Join Date
    May 2003
    Location
    Tiznit (Morocco)
    Posts
    178

    Question SPF records and Ip aditional

    Hello.

    I'm using a diferent Ip of hostname for shared IP.

    Exim use Ip of hostname for sending messages, and DNS records point MX to shared IP.

    It's confusing for DNS zones, and hotmail.com and anohter email systems, dont' work.

    I use this on templates.
    %domain%. IN TXT “v=spf1 a mx -all”

    This put
    domain.extension. IN TXT "v=spf1 a mx ip4:XXX.XXX.XXX.XXX ?all"

    XXX.XXX.XXX.XXX it's primary IP forn netcard interface, and not IP for shared or dedicated hosting.

    How can add IP for domain also tu DNS zone on templates?

    Also if any solution for modify all records.

    Thanks for help

  6. #6
    Member
    Join Date
    Jun 2007
    Posts
    43

    Default

    Quote Originally Posted by yapluka View Post
    For the SPF record, you would add something like this in your DNs templates :

    Code:
    %domain%. IN TXT "v=spf1 a mx ptr ~all"
    Now, for the Domainkeys, I think your best option would be to write a /scripts/postwwwacct that would grab the username of the account that is being created and run /usr/local/cpanel/bin/domain_keys_installer <<username>>
    Ok the SPF was easy, but I am stuck with the Domainkeys.

    How do you "write a /scripts/postwwwacct that would grap the username of account that is being created and run /run/local/cpanel/bin/domain_keys_install <<username>>

    I dont have a file called postwwwacct in my /scripts folder, I do however have a wwwacct file in the /scripts folder

  7. #7
    Member
    Join Date
    Oct 2005
    Posts
    125

    Default

    Here is a way to turn all domain keys on... it writes stuff and deletes stuff with -rf, use at your own risk:

    Code:
    #!/bin/sh
    cd /root
    rm -rf users
    mkdir users
    cd users
    
    ls -A /var/cpanel/users/ > users
    
    for account in `cat /root/users/users`
    do
    
    echo "$account creating domainkeys.."
    /usr/local/cpanel/bin/domain_keys_installer $account
    echo done
    
    done
    The directory /root/users should not exist. (or if it does, it's toast.)

    The cpanel script seems to be smart enough to ignore domains with domain keys already on, at least that is my experience.

    Let me know if anyone sees a problem.

  8. #8
    Member
    Join Date
    Apr 2007
    Posts
    7

    Default

    And if you modify the script a little bit you can also turn on SPF for all accounts:

    Code:
    #!/bin/sh
    cd /root
    rm -rf users
    mkdir users
    cd users
    
    ls -A /var/cpanel/users/ > users
    
    for account in `cat /root/users/users`
    do
    
    echo "$account Enabling SPF record.."
    /usr/local/cpanel/bin/spf_installer $account
    echo done
    
    done
    Use at own risk of course.

  9. #9
    Member
    Join Date
    Jan 2005
    Location
    London, UK
    Posts
    187

    Default

    Why doesn't cPanel have this as an easily enable/disable option in WHM?

    - Vince

  10. #10
    Member viraj's Avatar
    Join Date
    Sep 2006
    Location
    India
    Posts
    209
    cPanel/Enkompass Access Level

    DataCenter Provider

    Smile

    Quote Originally Posted by mambovince View Post
    Why doesn't cPanel have this as an easily enable/disable option in WHM?

    - Vince
    Thank you for your input.. I hope they develop something similar soon..

  11. #11
    Member
    Join Date
    Nov 2007
    Posts
    865

    Arrow

    Quote Originally Posted by johneve View Post
    And if you modify the script a little bit you can also turn on SPF for all accounts:

    Code:
    #!/bin/sh
    cd /root
    rm -rf users
    mkdir users
    cd users
    
    ls -A /var/cpanel/users/ > users
    
    for account in `cat /root/users/users`
    do
    
    echo "$account Enabling SPF record.."
    /usr/local/cpanel/bin/spf_installer $account
    echo done
    
    done
    Use at own risk of course.
    where do i save this script

  12. #12
    Member
    Join Date
    Nov 2007
    Posts
    865

    Arrow

    Quote Originally Posted by viraj View Post
    You can setup SPF records in the DNS zone templates from WHM, such that any new accounts created will have those included..
    how is it possible ??????

    i am doing this manually after create account & login to cPanel then i enable DK & SPF

    it would be such a great if this added automatically whenever i create new account

    let me know how to do this ????

  13. #13
    Registered User
    Join Date
    Jul 2007
    Posts
    2

    Default

    This article might help you,

    http://www.sohailriaz.com/how-to-add...panel-servers/

    Regards,

  14. #14
    Member
    Join Date
    Nov 2007
    Posts
    865

    Arrow

    Quote Originally Posted by sohaileo View Post
    This article might help you,

    http://www.sohailriaz.com/how-to-add...panel-servers/

    Regards,
    did you tried it .

  15. #15
    Member
    Join Date
    Nov 2007
    Posts
    865

    Arrow

    i tried but it does not works

    i have added this code

    #!/usr/bin/perl

    my %OPTS = @ARGV;
    $ENV{USER} = “$OPTS{’user’}”;
    system q(/usr/local/cpanel/bin/domain_keys_installer $USER);
    system q(/usr/local/cpanel/bin/spf_installer $USER);
    then created new account but A new account doesn't add SPF & DK as per the code

    i attached jpg for your further reference
    Last edited by crazyaboutlinux; 05-01-2009 at 10:05 AM.

Similar Threads & Tags
Similar threads

  1. SPF and DomainKeys Assitance Needed
    By pmcnallyhealer in forum E-mail Discussions
    Replies: 3
    Last Post: 11-17-2009, 08:01 AM
  2. How to enable SPF and DomainKeys by default?
    By electric in forum E-mail Discussions
    Replies: 29
    Last Post: 08-17-2009, 01:13 AM
  3. Enabling SPF/Domainkeys
    By wgalafassijr in forum E-mail Discussions
    Replies: 2
    Last Post: 01-10-2009, 07:38 PM
  4. DomainKeys and SPF - Do you set them "on" by default?
    By electric in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 08-29-2008, 12:50 PM
  5. DomainKeys and SPF
    By minotauro in forum cPanel and WHM Discussions
    Replies: 34
    Last Post: 02-16-2008, 03:02 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube