sending mail from website admin gets spam header

Discussion in 'Server Operation' started by Tomislav Aurednik, Jul 27, 2017.

  1. Hi guys! Don't know if this question should be posted here or in programming scripts. I have a wierd issue. My website PHPmailer to send email. Mails send from the forms of the frontend are recieved normally but email sent from the admin backend get marked as spam.

    I really can't make any sense out of the email header.
    X-Virus-Scanned: Debian amavisd-new at
    X-Spam-Flag: NO
    X-Spam-Score: 3.497
    X-Spam-Level: ***
    X-Spam-Status: No, score=3.497 tagged_above=3 required=4
    tests=[ALL_TRUSTED=-1, HTML_IMAGE_ONLY_24=1.282, HTML_MESSAGE=0.001,
    URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
    Received: from ([])
    by localhost ([]) (amavisd-new, port 10026)

    The email has an pdf invoice as attachment, an image for the signature added as it is described for PHPMailer and 3 links. Same as the mail send from the frontend.
    Has any one any idea why it gets marked as spam?
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You can see the applied rules in the header, e.g. HTML_IMAGE_ONLY_24. Enter the rule name at a search engine, it shold bring you to the matching page of the SpamAssassin project which explains the rule.


    The next step is to try to alter the email that you send t not match those criteria anymore.
  3. Till I did a google search yesterday and found that exact page you posted. But I didn't understand what they meant with those words. I tought that my path to the image location was to long, but saw that it wasn't the case.
    Now I removed the image and it's not marked as spam. The image was the company logo that's made from the comany name. So the problem is that there is text in the image?!
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The description says:

    HTML: images with 2000-2400 bytes of words

    So this basically means that the text to image ratio was not fine. add a longer text in the message when you want to keep the image. There are some other high scoring tests as well, e.g. the message seems to be html only without a plaintext part. Try to compose the message with html + plaintext part to circumvent that.
    Tomislav Aurednik likes this.
  5. Thanks adding a altBody with plaintext helped. Now I can have the image and its not marked as spam.

Share This Page