The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Easy way to set up DMARC and SPF for forwarded domains

Discussion in 'E-mail Discussions' started by GoWilkes, Feb 7, 2016.

  1. GoWilkes

    GoWilkes Well-Known Member

    Joined:
    Sep 26, 2006
    Messages:
    367
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    I have 51 parked domains, and it looks like they all need to have their own SPF and DMARC.

    Other than going through WHM and setting up each one manually (which is taking forever), is there an easier way? Is there a text file somewhere on the server that I can just copy and paste the data?
     
  2. GoWilkes

    GoWilkes Well-Known Member

    Joined:
    Sep 26, 2006
    Messages:
    367
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    FWIW, the issue I'm having is that most of the emails being sent to my forwarded domains aren't being delivered. If they're sent through the server (like through a contact form) then they are delivered, but emails sent via POP or IMAP are not.

    I have a main domain, and emails to that work fine. I have one forwarded domain for which I set up an SPF and DMARC awhile back, and those emails are delivered to the main domain with no problem, too. But the other domains do not have an SPF or DMARC, and those are the ones that aren't receiving the emails. The lack of their own SPF and DMARC is the only reason I can think of.

    I added an SPF and DMARC to one of those domains about 2 hours ago, but emails still aren't being delivered. I'm assuming it takes awhile for them to propagate.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    For SPF records, you could try using a command such as:

    Code:
    for i in `ls /var/cpanel/users` ;do  /usr/local/cpanel/bin/spf_installer $i 0 1 0 ;done
    This utility is documented at:

    The /bin/spf_installer Script - Documentation - cPanel Documentation

    You will still receive the output that suggests it fails, but that's simply for the invalid users in the output. Review the zones after the command completes and they should reflect the proper SPF records. As far as the DMARC record, you may find this thread helpful:

    Dmarc authentication

    Thank you.
     
Loading...

Share This Page