Email Reception Issues - Legitimate Emails Being Rejected

Discussion in 'Installation/Configuration' started by rscalas, Jan 31, 2024.

  1. rscalas

    rscalas New Member

    Hello everyone! I am encountering some email reception issues on my server and I need assistance in resolving them. My environment includes DNS configurations with correctly set up A, MX, and SPF records, as verified with dig and nslookup. Initially, I noticed that all incoming emails were being marked as spam.

    The symptoms I’m experiencing are as follows: Emails sent from info@domain_com to the same address are working fine without any issues. Yet, when it comes to receiving emails from other domains, such as Gmail or Outlook, they are either being rejected or marked as spam. Additionally, sending a test email from the server itself works correctly.

    I am seeking suggestions or ideas on how to resolve this issue. Any help or guidance in this matter would be greatly appreciated. Thank you in advance for your time and assistance.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Check the mail header of the received email for the spam score and possibly scoring details and post them.
     
  3. rscalas

    rscalas New Member

    The forum rules do not allow me to post links because I am a new user... There are links in the email header and even if I remove them, it still tells me they are present..
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    These can not be all headers. Please post all headers of a email which you received that was marked as spam. If it contains links, then feel free to remove the URL's as they are not important for this.
     
  5. rscalas

    rscalas New Member

    Received: from [DOMINIO A] by [DOMINIO B] with HTTPS; Wed, 31 Jan 2024 19:47:45 +0000
    ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=[DOMINIO C]; cv=pass; b=[DATI CRIPTATI]
    ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=[DOMINIO C]; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=[VALORE HASH]; b=[DATI CRIPTATI]
    ARC-Authentication-Results: i=2; [SERVIZIO EMAIL] 1; spf=pass (sender ip is [INDIRIZZO IP]) smtp.rcpttodomain=[DOMINIO D] smtp.helo=[DOMINIO E]; dmarc=none action=none header.from=[DOMINIO F]; dkim=none (message not signed); arc=pass (0 oda=0 ltdi=1)
    Received: from [DOMINIO G] by [DOMINIO A] with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id [VERSIONE]; Wed, 31 Jan 2024 19:47:43 +0000
    Received: from [DOMINIO H] by [DOMINIO G].outlook.office365.com with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id [VERSIONE] via Frontend Transport; Wed, 31 Jan 2024 19:47:43 +0000
    Authentication-Results: spf=pass (sender IP is [INDIRIZZO IP]) smtp.helo=[DOMINIO E]; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=[DOMINIO F];
    Received-SPF: Pass ([SERVIZIO EMAIL]: domain of [DOMINIO E] designates [INDIRIZZO IP] as permitted sender) receiver=[SERVIZIO EMAIL]; client-ip=[INDIRIZZO IP]; helo=[DOMINIO E]; pr=C
    Received: from [DOMINIO E] ([INDIRIZZO IP]) by [DOMINIO H].mail.protection.outlook.com with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id [VERSIONE] via Frontend Transport; Wed, 31 Jan 2024 19:47:42 +0000
    X-IncomingTopHeaderMarker: OriginalChecksum:[CHECKSUM];UpperCasedChecksum:[CHECKSUM];SizeAsReceived:[DIMENSIONE];Count:[NUMERO]
    ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=[DOMINIO C]; cv=none; b=[DATI CRIPTATI]
    ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=[DOMINIO C]; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=[VALORE HASH]; b=[DATI CRIPTATI]
    ARC-Authentication-Results: i=1; [SERVIZIO EMAIL] 1; spf=none; dmarc=none; dkim=none; arc=none
    [...]
     
  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    You should have posted in CODE tags, would make the text readable.
    Is there any reject of email in that log you posted? I can not see reject or marking as spam.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    That's still not all headers. If your system uses ISPConfig with amavisd, then the email must contain something like this:

    Code:
    X-Virus-Scanned: Debian amavisd-new at v220.ensignweb.de
    X-Spam-Flag: YES
    X-Spam-Score: 10.948
    X-Spam-Level: **********
    X-Spam-Status: Yes, score=10.948 tagged_above=3 required=3.501
    If its a Rspamd system (like most current installs, you must have:

    Code:
    X-Spam-Level: **
    X-Spamd-Bar: ++
     
  8. rscalas

    rscalas New Member

    This is the header of the message I receive because the sending fails. I am testing by sending myself an email from another Google and Outlook account
    Messaggio originale
    ID messaggio <[email protected]>
    Creato alle: 1 febbraio 2024 alle ore 01:24 (consegnato dopo 0 secondi)
    Da: Mail Delivery Subsystem <[email protected]>
    A:
    Oggetto: Delivery Status Notification (Delay)
    SPF: NONE con l'IP 209.85.220.69 Ulteriori informazioni
    DKIM: 'PASS' con il dominio googlemail.com Ulteriori informazioni
    DMARC: 'PASS' Ulteriori informazioni


    Scarica messaggio originale
    Copia negli appunti

    Delivered-To:
    Received: by 2002:aa7:cb11:0:b0:55a:6d21:c93 with SMTP id s17csp2995437edt;
    Wed, 31 Jan 2024 16:24:32 -0800 (PST)
    X-Received: by 2002:a17:906:a853:b0:a34:ab60:d177 with SMTP id dx19-20020a170906a85300b00a34ab60d177mr2233363ejb.39.1706747071989;
    Wed, 31 Jan 2024 16:24:31 -0800 (PST)
    ARC-Seal: i=1; a=rsa-sha256; t=1706747071; cv=none;
    d=google.com; s=arc-20160816;
    b=SWF/bXoLVSqTpIBYygectsWslTg5h6ll0hjdKz6c2JbI4Ern7PWPFyPTuTGGJlgO//
    /iGfc7mhdupHhU2LiGtaegvI/7frgmllPhcbOP2bHVC8T4/1mUttsBIICu9t8sNkOmjw
    opjd6opVrCfRVTDtyHqpgR1N2931v+7mW3ny2YOz3c/VRSrEonKbtKv2p9egE22nVaAr
    3RbzYjRmR6AxyO6ZzvIgZF2fMFH/kSzxCHoI2YjoiG3CAMgTwijCKLzV8Wnka/ph/NEf
    wHhDR0oD2bZ8dd6mnVF+Q9Kk6aWkOL4J2HRHfQOajtvX1Sle+2h5Oxy2NgRI2QfYpmgU
    KqWg==
    ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
    h=in-reply-to:references:subject:from:date:message-id:auto-submitted
    :to:dkim-signature;
    bh=RWQGdSDjDLlHXy9obATnLQAwDiDqCTLLIXgVtieHfXo=;
    fh=U226s+ETXhngymxIEdAvmLK2e5x4hWq1faj2TVoPgBM=;
    b=r3nhCAeo3kaLN7VUI3IeEuewwz56Ld5/XEmzsv1bZJgZtumSf/eBzM4m+N0T5NjX2+
    s7jp/YgKufkggP9RFiltn7qo2IRAI8kzi+wmOMmFYeDEO1zH4ap9ShjNMFfRiHHwW5bG
    lbw8UuAFTXjCNoKuLsWmutCH5nr3rZAYkVcE4D23MwdasCs0/Q26th5GqJvhlAAHJnOu
    6C5LfnHqHq81jagj+QToudpWpUCHA8FktWPmFLh+wDdu/ls7tSuuRHG5LIrHRFZGQwYK
    /IzmClSPE3r/nKVVkN2y8anxjZNUoc68ViHpa8SPczuryMZqZ+tjq1IK2g/aoieaIb3w
    XCsA==;
    dara=google.com
    ARC-Authentication-Results: i=1; mx.google.com;
    dkim=pass [email protected] header.s=20230601 header.b=J9iTNecM;
    spf=none (google.com: mail-sor-f69.google.com does not designate permitted sender hosts) smtp.helo=mail-sor-f69.google.com;
    dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com
    Return-Path: <>
    Received: from mail-sor-f69.google.com (mail-sor-f69.google.com. [209.85.220.69])
    by mx.google.com with SMTPS id m19-20020a1709060d9300b00a31904ae4cfsor3522952eji.20.2024.01.31.16.24.31
    for <>
    (Google Transport Security);
    Wed, 31 Jan 2024 16:24:31 -0800 (PST)
    Received-SPF: none (google.com: mail-sor-f69.google.com does not designate permitted sender hosts) client-ip=209.85.220.69;
    Authentication-Results: mx.google.com;
    dkim=pass [email protected] header.s=20230601 header.b=J9iTNecM;
    spf=none (google.com: mail-sor-f69.google.com does not designate permitted sender hosts) smtp.helo=mail-sor-f69.google.com;
    dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com
    DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
    d=googlemail.com; s=20230601; t=1706747071; x=1707351871; dara=google.com;
    h=in-reply-to:references:subject:from:date:message-id:auto-submitted
    :to:from:to:cc:subject:date:message-id:reply-to;
    bh=RWQGdSDjDLlHXy9obATnLQAwDiDqCTLLIXgVtieHfXo=;
    b=J9iTNecMi41yt01aD9Amyfp1DFro6Rskcpi0M5KOlXU7C2TQMDLwe6rMncUver13gA
    8KouQ3u7sIW7M9qh8AGOVOUY+3WdgZpql9V68MPbOL123nFEtSM4j3gfoN9yrIkQX+SC
    iU5/RWpEmICzPU6nCxJ17qF4N8wTVSa2RJ+aupEYEoetit/6g5F2hUaMZcghQIogUHmv
    vVTLqJRVI0V6LpVWHh8/0ce2aN0+gZH7/lOm+DNJH9y5lTfeEMhxGZE5biKpCEk/wSPj
    IlOaUT4ssYwXjVJw87oxxFJRNq/5ZVJHaRgJK/mpdOUOPF1xsJ7A1T3USHLQ1fbfFJ6e
    e6IQ==
    X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
    d=1e100.net; s=20230601; t=1706747071; x=1707351871;
    h=in-reply-to:references:subject:from:date:message-id:auto-submitted
    :to:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
    bh=RWQGdSDjDLlHXy9obATnLQAwDiDqCTLLIXgVtieHfXo=;
    b=Po0rHIORfpXl2vcejde7r5Rdjsa3Kr5zZ2rouxUMVpJQGfgTuMYIZJ6QLkv85mJsA7
    TB3QMjzWVjL1uD0L/kgTmIGmGXa8BUf9aQFP1gcJrmpy8ARxL9CvUZVCHYqs1Sbk1F4K
    M0AnRbfIGoprGGKgdzvHLA05UcOsLj1vjddEf9FtvsrggtXbPslKXDD6HV3OXxWPftUV
    PV49Avrl2Wcdj7uiC0pRz3pxHj/j8FTqsz7ZE6Djdu2Jc6dqUzPvPlJPTe+vZGlAFPYy
    Pml1riPhxWh1W08Jcp2EKcEYh++fVsTz+uTEHo+8hoX5oFKRPueJ8sOqdlJXOwtqfmZV
    ZILA==
    X-Gm-Message-State: AOJu0YzhzFOQdbopBTuaMdxB0CvulAPxeLk2tJQB9jSf20cqTs4vQo5R p/9zaFeRQA2pwgZwomztPlkmMQaJJfpI+tmi+sRFA9Sn5GqvcYvz2dk2EKMagAMClqaOuPUrbh4 +Pwt07BnmyPm4RDLw3S+BEmwT3cHhJJEr7q6ZOED+vQWk74qsHg==
    X-Google-Smtp-Source: AGHT+IEJKDXU34cMd7EYks8INUenDQuh/o1uVDSbnCudtznGwIklqqUSue8iLf6aB1waiKpSbaxJO80MqWG/wLUSMY6lMp0kLZcmCQ==
    X-Received: by 2002:a17:906:3708:b0:a35:dea0:dcf2 with SMTP id d8-20020a170906370800b00a35dea0dcf2mr2223114ejc.41.1706747071851;
    Wed, 31 Jan 2024 16:24:31 -0800 (PST)
    Content-Type: multipart/report; boundary="000000000000f055a8061047044c"; report-type=delivery-status
    To:
    Received: by 2002:a17:906:3708:b0:a35:dea0:dcf2 with SMTP id d8-20020a170906370800b00a35dea0dcf2mr1752286ejc.41; Wed, 31 Jan 2024 16:24:31 -0800 (PST)
    Return-Path: <>
    Auto-Submitted: auto-replied
    Message-ID: <[email protected]>
    Date: Wed, 31 Jan 2024 16:24:31 -0800 (PST)
    From: Mail Delivery Subsystem <[email protected]>
    Subject: Delivery Status Notification (Delay)
    References: <CAL9LD2FEif7jdotQ3XGr=ZRDxei5bCVuWKk8+hw9MEViQKKQmA@mail.gmail.com>
    In-Reply-To: <CAL9LD2FEif7jdotQ3XGr=ZRDxei5bCVuWKk8+hw9MEViQKKQmA@mail.gmail.com>

    --000000000000f055a8061047044c
    Content-Type: multipart/related; boundary="000000000000f06780061047044d"

    --000000000000f06780061047044d
    Content-Type: multipart/alternative; boundary="000000000000f06788061047044e"

    --000000000000f06788061047044e
    Content-Type: text/plain; charset="UTF-8"
    Content-Transfer-Encoding: quoted-printable


    ** Consegna non completata **

    Si =C3=A8 verificato un problema temporaneo durante la consegna del messagg=
    io a . Gmail tenter=C3=A0 di inviarlo nuovamente per altre 4=
    5 ore. Ti avviseremo nel caso in cui sia impossibile completare la consegna=
    .

    Ulteriori informazioni: https://check.spamhaus.org/returnc/pub/2001:41d0:30=
    4:200::b824/
    (attenzione: questo link indirizza a un sito di terze parti)

    La risposta del server remoto =C3=A8:
    554 5.7.1 Service unavailable; Client host [209.85.218.48] blocked using ze=
    n.spamhaus.org; Error: open resolver; https://check.spamhaus.org/returnc/pu=
    b/2001:41d0:304:200::b824/

    --000000000000f06788061047044e
    Content-Type: text/html; charset="UTF-8"
    Content-Transfer-Encoding: quoted-printable


    <html>
    <head>
    <style>
    * {
    font-family:Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
    }
    </style>
    </head>
    <body>
    <table cellpadding=3D"0" cellspacing=3D"0" class=3D"email-wrapper" style=3D=
    "padding-top:32px;background-color:#ffffff;"><tbody>
    <tr><td>
    <table cellpadding=3D0 cellspacing=3D0><tbody>
    <tr><td style=3D"max-width:560px;padding:24px 24px 32px;background-color:#f=
    afafa;border:1px solid #e0e0e0;border-radius:2px">
    <img style=3D"padding:0 24px 16px 0;float:left" width=3D72 height=3D72 alt=
    =3D"Icona di errore" src=3D"cid:icon.png">
    <table style=3D"min-width:272px;padding-top:8px"><tbody>
    <tr><td><h2 style=3D"font-size:20px;color:#212121;font-weight:bold;margin:0=
    ">
    Consegna non completata
    </h2></td></tr>
    <tr><td style=3D"padding-top:20px;color:#757575;font-size:16px;font-weight:=
    normal;text-align:left">
    Si =C3=A8 verificato un problema temporaneo durante la consegna del messagg=
    io a <a style=3D'color:#212121;text-decoration:none'><b></b>=
    </a>. Gmail tenter=C3=A0 di inviarlo nuovamente per altre 45 ore. Ti avvise=
    remo nel caso in cui sia impossibile completare la consegna.
    </td></tr>
    <tr><td style=3D"padding-top:24px;color:#4285F4;font-size:14px;font-weight:=
    bold;text-align:left">
    <a style=3D"text-decoration:none" href=3D"https://check.spamhaus.org/return=
    c/pub/2001:41d0:304:200::b824/">ULTERIORI INFORMAZIONI</a>
    </td></tr>
    <tr><td style=3D"margin-top:8px;font-style:italic;font-size:12px;color:#757=
    575">
    <img style=3D"padding:0 4 0 0;float:left" width=3D12 height=3D12 alt=3D"Att=
    enzione" src=3D"cid:warning_triangle.png">
    Questo link ti indirizzer=C3=A0 a un sito di terze parti
    </td></tr>
    </tbody></table>
    </td></tr>
    </tbody></table>
    </td></tr>
    <tr style=3D"border:none;background-color:#fff;font-size:12.8px;width:90%">
    <td align=3D"left" style=3D"padding:48px 10px">
    La risposta del server remoto =C3=A8:<br/>
    <p style=3D"font-family:monospace">
    554 5.7.1 Service unavailable; Client host [209.85.218.48] blocked using ze=
    n.spamhaus.org; Error: open resolver; https://check.spamhaus.org/returnc/pu=
    b/2001:41d0:304:200::b824/
    </p>
    </td>
    </tr>
    </tbody></table>
    </body>
    </html>

    --000000000000f06788061047044e--
    --000000000000f06780061047044d
    Content-Type: image/png; name="icon.png"
    Content-Disposition: attachment; filename="icon.png"
    Content-Transfer-Encoding: base64
    Content-ID: <icon.png>


    --000000000000f06780061047044d
    Content-Type: image/png; name="warning_triangle.png"
    Content-Disposition: attachment; filename="warning_triangle.png"
    Content-Transfer-Encoding: base64
    Content-ID: <warning_triangle.png>


    --000000000000f06780061047044d--
    --000000000000f055a8061047044c
    Content-Type: message/delivery-status


    --000000000000f055a8061047044c
    Content-Type: message/rfc822

    DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
    d=gmail.com; s=20230601; t=1706747071; x=1707351871; darn=rscalas.it;
    h=to:subject:message-id:date:from:mime-version:from:to:cc:subject
    :date:message-id:reply-to;
    bh=oecms5LTIQq8h/mQTsrSAtKszl9gusUWxjHRMCKMhdM=;
    b=M8C225GbYxiQ/h5UKLT24uGXIGDP5Le5ma1ySO9oIXshhA0lG8/737Ei5h1DCfMfOG
    BCoi9GX97Lsjoc+irMcT44eof7IRFeUrR1qTjh89xW6t/+T/jPW6l0wJACtqDBMy+NZy
    QrIgTC9FouaAJCDjWdOfWbPIzbGT7dOFCxZogCaTf1iAql8cLaGdXGLA3S1RAU1llR4c
    /uub7/BM+C5+6lKOOfZW/A9b4+PpdUFZe2zHO9Nr5JlGW5dLvXii/YNUKFuYWFtHdIFT
    4EYWDv14ISFs8d6yZj4OLYHZh9TyTOMvsHjn0Sypd4Il0EPbpBo7wwOFxwg0mlkIKiSg
    gxGA==
    X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
    d=1e100.net; s=20230601; t=1706747071; x=1707351871;
    h=to:subject:message-id:date:from:mime-version:x-gm-message-state
    :from:to:cc:subject:date:message-id:reply-to;
    bh=oecms5LTIQq8h/mQTsrSAtKszl9gusUWxjHRMCKMhdM=;
    b=DohLzjMB0vwl9pS981/bdvwHH/1O0OcnXZDYX2O4QC4wpVD3SWp0fTRR8NC5OEnz9D
    YyRcgLD/SebTovEYa3PAKxtVdpZwsYfv4HtjE1hxDDECsurnrWwwuxNB76LPak0DD8lD
    PA9mWzzHcL1mZYv1P8bcJpaNqsQsD99IyQ3qPrKMcfXPWvH7C6ZiGdGusqeCiysG4CMf
    kmi4qIx5GqpuqpcreZQyrwE8AnE6NqUffdsCoFTMr2IQKmopPUPTQhAmAF/HhL+nBHtm
    VLNk61Wvn0UkEhYrvaBdb8B491p3CaAVvZPh/Ett2kMYiNT6keKZf1pLHLJfnu4YZHfQ
    XkNA==
    X-Gm-Message-State: AOJu0YxJarqjVe5R927Mi4/ip/a+ryqgvKLGkVsEHpHB7SEtSP2tcyn1 FrQoy0cjHNq3KZ8HcXL0NTPIq60wOk5jzOMr9yq/ksPCQ/dU1EFz3QkKXDsIkJX9LVv01aaLf64 KL01LDf2bwkuom2do/uaD10lt6RZkdoHmSSs=
    X-Google-Smtp-Source: AGHT+IGhy6jnUDU5Ik2QQQh5I0yavKodAb74SGU6va0LHcRs3cVFhWMXei3atX1opgTy49RNOm1chgCME2qau8NFT7U=
    X-Received: by 2002:a05:651c:b1f:b0:2d0:4949:979b with SMTP id b31-20020a05651c0b1f00b002d04949979bmr317988ljr.42.1706651434044; Tue, 30 Jan 2024 13:50:34 -0800 (PST)
    MIME-Version: 1.0
    From: <>
    Date: Tue, 30 Jan 2024 22:50:23 +0100
    Message-ID: <CAL9LD2FEif7jdotQ3XGr=ZRDxei5bCVuWKk8+hw9MEViQKKQmA@mail.gmail.com>
    Subject: Ci siamo!
    To: Ditta Scalas Roberto <>
    Content-Type: multipart/alternative; boundary="0000000000007b5030061030c00c"

    --0000000000007b5030061030c00c
    Content-Type: text/plain; charset="UTF-8"

    Daii..

    --0000000000007b5030061030c00c
    Content-Type: text/html; charset="UTF-8"

    <div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif">Daii..<br></div></div>

    --0000000000007b5030061030c00c--

    --000000000000f055a8061047044c--
     
  9. rscalas

    rscalas New Member

    I can't find...
    Code:
    X-Spam-Level: **
    X-Spamd-Bar: ++
     
  10. pyte

    pyte Well-Known Member HowtoForge Supporter

    Stop using a open DNS Resolver or remove zen.spamhaus.org from your postfix configuration or use their DQS service.
     
    rscalas and till like this.
  11. rscalas

    rscalas New Member

    It works perfectly by removing zen.spamhaus.org. Thank you very much everyone!
     
  12. pyte

    pyte Well-Known Member HowtoForge Supporter

    You really should use a local resolver like unbound in your setup unless you have some very specific requirements to use something like cloudflare etc.
    There are more downsides than just not be able to use the spamhaus blocklist.
     
    rscalas likes this.

Share This Page