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.

Exim email going to spam

Discussion in 'E-mail Discussions' started by foggle, Dec 14, 2016.

Tags:
  1. foggle

    foggle Member

    Joined:
    Jun 3, 2015
    Messages:
    8
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    EU
    cPanel Access Level:
    Root Administrator
    Good afternoon,

    I have a problem where email from any PHP scripts are (it seems) consistently going into spam folders in clientside email software even though the headers say they are passing SPF and the server is a permitted sender. X-Antivirus and X-AntiAbuse headers are added and none are complaining.

    I have checked RBL and the server IP's aren't blacklisted.

    The only thing I can think is that is causing a problem is that the server (sub domain) name is completely different from the domain the email is coming from. But I would think this is normal on multi-domain hosted servers such as mine.

    Can anyone point me in the right direction to solve this please, some of my clients are starting to get restless and I don't know how to solve this.

    Many thanks for any wisdom you can offer.

    Will
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,288
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
  3. ruzbehraja

    ruzbehraja Well-Known Member

    Joined:
    May 19, 2011
    Messages:
    392
    Likes Received:
    11
    Trophy Points:
    68
    cPanel Access Level:
    Root Administrator
    You could also use something like www.mail-tester.com to check the spaminess of your emails.

    It could also be a long HTML signature or a lot of numbers or 0000 $$$$$ in your email body.
     
    cPanelMichael likes this.
  4. foggle

    foggle Member

    Joined:
    Jun 3, 2015
    Messages:
    8
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    EU
    cPanel Access Level:
    Root Administrator
    Ah. We're not using DMARC. We have SPF and PTR on all DNS, but the mail() isnt authenticated so presumably that is a problem. Will try to DMARC and report back. Thank you both.
     
    cPanelMichael likes this.
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,288
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    I suggest ensuring the PHP script uses SMTP authentication. Not using SMTP authentication can result in this problem, regardless of if DMARC is enabled.

    Thank you.
     
  6. foggle

    foggle Member

    Joined:
    Jun 3, 2015
    Messages:
    8
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    EU
    cPanel Access Level:
    Root Administrator
    Thanks Michael and rusbehraja.

    I have vastly improved this by using dmarcian and adding the DMARC records in DNS. SMTP Auth will presumably bypass all of this but isn't possible in all our use cases.

    Last question on this topic; should one be trying to match the hostname in the email message headers to the domain name of the cPanel account that is sending the email?

    Here is an example of a header envelope, where;

    cpanel-user is the username of the cpanel account
    server.host.com is the hostname of this shared multidomain server
    example.com is the actual website domain name


    Authentication-Results: mx.google.com;
    spf=pass (google.com: domain of cpanel-user@server.host.com designates 1.2.3.4 as permitted sender) smtp.mailfrom=cpanel-user@server.host.com;
    dmarc=fail (p=NONE dis=NONE) header.from=example.com
    Received: from cpanel-user by server.host.com with local (Exim 4.87)
    (envelope-from <cpanel-user@server.host.com>)
    id 1cJNZ6-006u8Q-UW
    for contact@example.com; Tue, 20 Dec 2016 00:00
    To: contact@example.com
     
    #6 foggle, Dec 19, 2016
    Last edited: Dec 19, 2016
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,288
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Since you are sending without SMTP authenticaiton, the message is actually coming from $cpanel-username@$server-hostname as opposed to the individual domain name. You can find additional discussion of this topic at:

    E-mail Return-Path, envelope and dkim domain are set to the root domain

    Thank you.
     
Loading...

Share This Page