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.

Automated cPanel emails marked as spam

Discussion in 'E-mail Discussions' started by Daniel15, Nov 4, 2011.

  1. Daniel15

    Daniel15 Well-Known Member

    Joined:
    Oct 7, 2006
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    Automated emails from my cPanel server (for example, the "Backup complete" and "/scripts/upcp" emails) are being marked as spam by Gmail. My server's domain does have SPF records. Any way to resolve this? Can I set it up so these automated emails are signed with DomainKeys? How do I do that?
     
  2. Eric

    Eric Administrator
    Staff Member

    Joined:
    Nov 25, 2007
    Messages:
    746
    Likes Received:
    11
    Trophy Points:
    18
    Location:
    Texas
    cPanel Access Level:
    Root Administrator
    Howdy,

    You should open a ticket with the full message (with headers). There could be several reasons the message is marked as spam. All of which I doubt you would like posted in the forums.

    Thanks!
     
  3. Daniel15

    Daniel15 Well-Known Member

    Joined:
    Oct 7, 2006
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    I don't mind posting it on the forum. I'd rather not use tickets as I license cPanel through the data centre, so I don't think I can even create a ticket directly.

    Here's the full headers from an upcp email that was marked as spam by Gmail. I've obfuscated the email addresses a bit and removed the message IDs, but the rest of it is exactly as I got it.
    One thing I noticed is that I have SPF records for the domain itself (youareaninja.com) but not for cPanel's hostname (quimby.youareaninja.com). Should I add these?
     
    #3 Daniel15, Nov 7, 2011
    Last edited: Nov 7, 2011
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Is the server's hostname a subdomain off a main domain that you have on the machine (as in does it exist in /var/named/maindomain.com.db file as a subdomain) or is it in a separate zone itself (as in /var/named/hostname.db file)? I ask as it depends on which it happens to be for how you might go about getting SPF and DomainKeys set up for that hostname.
     
  5. Daniel15

    Daniel15 Well-Known Member

    Joined:
    Oct 7, 2006
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    I thought it was just a subdomain, but I checked and it looks like it's a separate zone.
     
  6. minosjl

    minosjl Well-Known Member

    Joined:
    Jun 4, 2011
    Messages:
    168
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    cPanel Access Level:
    Root Administrator
    most probably your server name is a sub domain of your main domain.So i think you can add the spf and domain keys for your host name in the zone file of your main domain itself.
     
  7. SrvAdmin

    SrvAdmin Registered

    Joined:
    Nov 9, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    quimby.youareaninja.com is pointed to the IP 66.232.109.157 and the PTR/RDNS record of the IP is emptly. You need to contact your datacentre techs and ask them to set the PTR/RDNS record to quimby.youareaninja.com. It should solve the problem.
     
  8. Daniel15

    Daniel15 Well-Known Member

    Joined:
    Oct 7, 2006
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    Huh, that is interesting. It definitely used to be set, but something must have changed recently. Some of my IPs (eg. 66.232.109.159) have the reverse DNS set, but the main IP does not. I'll contact them and get them to fix it.

    Even so, this issue has been occuring for quite a while now, even back when the reverse DNS was set correctly.
     
  9. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    I would suggest moving the hostname's separate zone file into the main domain file instead so it isn't a separate zone, then setting the SPF records for it in that file instead. It is typically preferred to have the hostname off the main domain in the same DNS zone file as the main domain over a separate zone file.
     
  10. Daniel15

    Daniel15 Well-Known Member

    Joined:
    Oct 7, 2006
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    Thanks Tristan. How do I enable DomainKeys on the server's subdomain (quimby.youareaninja.com)? I do have a cPanel account for the domain itself (youareaninja.com) and tried enabling DomainKeys in it, but I think that only enables it for the domain, not any subdomains.

    Thanks!
     
  11. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    When you enable Domain Keys in cPanel > Email Authentication area if the subdomain is on the account itself, it will do the following for the subdomain entries:

    Code:
    root@cloud-amd64 [/var/cpanel/domain_keys/public]# ls -lah
    total 16K
    drwxr-xr-x 2 root wheel 4.0K Nov 17 08:08 ./
    drwxr-xr-x 4 root wheel 4.0K Nov 17 08:06 ../
    -rw-r--r-- 1 root wheel  223 Nov 17 08:06 bubba.test
    -rw-r--r-- 1 root wheel  223 Nov 17 08:08 cptest.bubba.test
    
    root@cloud-amd64 [/var/cpanel/domain_keys/private]# ls -lah
    total 16K
    drwxr-x--- 2 root mail  4.0K Nov 17 08:08 ./
    drwxr-xr-x 4 root wheel 4.0K Nov 17 08:06 ../
    -rw-r--r-- 1 root wheel  692 Nov 17 08:06 bubba.test
    -rw-r--r-- 1 root wheel  692 Nov 17 08:08 cptest.bubba.test
    It also creates the record in the zone file (/var/named/bubba.test.db):

    With the hostname, it does treat it differently, since it isn't a subdomain on an account. I tested with the hostname and because it wasn't in cPanel > Subdomain, it did not create those entries.

    For normal subdomains, it definitely isn't an issue for subdomains themselves to be covered if you test it, since my results show the subdomains do get it created.

    As such, if you want the hostname covered, your best bet is to temporarily change the hostname to another name, put the hostname onto the account as a subdomain, use Email Authentication area to add the SPF and domain keys records, then remove the subdomain manually and change the hostname back to what it was before. It does appear to be a lot of steps simply to get the records added. Right now, I simply can't think of a simpler way to do it.
     
Loading...

Share This Page