<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[def_whitelist_from_rcvd / welcomelist_from_rcvd does not fire on Cloudron mail app (SpamAssassin 4.0.0) — also no GUI option for sender whitelisting]]></title><description><![CDATA[<p dir="auto"><strong>Cloudron mail app version:</strong> cloudron/mail 3.18.2 (SpamAssassin 4.0.0, 2022-12-13)</p>
<h2>Summary</h2>
<p dir="auto">There is no GUI (or API) way to whitelist a trusted sender domain in the Cloudron mail app — the only exposed mechanism is the free-text "Custom SpamAssassin rules" field, which maps directly to <code>/app/data/spamd/custom.cf</code> (included from <code>local.cf</code>). While investigating recurring false positives on legitimate Microsoft 365 senders, I found that the relay-verified whitelist directive (<code>whitelist_from_rcvd</code> / its current alias <code>welcomelist_from_rcvd</code>, including the <code>def_</code> variants) <strong>does not fire at all</strong> in this setup — confirmed on both long-standing entries and newly added ones. The unauthenticated variant (<code>welcomelist_from</code>, From-header only, no relay check) works correctly.</p>
<h2>Environment</h2>
<ul>
<li>Cloudron mail app 3.18.2, SpamAssassin 4.0.0</li>
<li>spamd invocation (from <code>ps</code>) : <code>/usr/sbin/spamd --max-children 2 --port 7833 --nouser-config --virtual-config /app/data/spamd/%u --syslog stderr -u cloudron --allow-tell</code></li>
<li><code>/etc/spamassassin/local.cf</code> (shipped, resets on update) includes two persistent files under <code>/app/data/spamd/</code>: <code>acl.cf</code> (GUI-managed sender allow/blocklist) and <code>custom.cf</code> (GUI "Custom SpamAssassin rules" free-text field — this is the only place available for <code>score</code>/whitelist tuning).</li>
<li>No <code>trusted_networks</code> / <code>internal_networks</code> directive is present anywhere in the shipped config (<code>local.cf</code>, <code>*.pre</code> files) or in <code>custom.cf</code>.</li>
</ul>
<h2>Steps to reproduce</h2>
<ol>
<li>In the mail app's "Custom SpamAssassin rules" field, add:<pre><code>def_whitelist_from_rcvd *@outlook.com *.protection.outlook.com
</code></pre>
</li>
<li>Save (this restarts spamd — confirmed via <code>ps -o etime</code> on the spamd process).</li>
<li>Take a real inbound message from an <code>*@outlook.com</code> sender that passed through <code>*.protection.outlook.com</code> relays (verified via the Received headers).</li>
<li>Re-score it: <code>docker exec mail spamassassin -t &lt; message.eml</code></li>
<li>Observe <code>X-Spam-Status</code> — no <code>USER_IN_WELCOMELIST</code> / <code>USER_IN_DEF_WHITELIST</code> (deprecated alias) test appears, and the score is identical to a run with the whitelist line removed.</li>
</ol>
<p dir="auto">Repeated with:</p>
<ul>
<li>A newly added entry for a specific business partner domain (<code>def_whitelist_from_rcvd *@example.nl *.protection.outlook.com</code>) on a real message from that domain — same result, rule does not fire.</li>
<li>The current directive name instead of the deprecated alias (<code>def_welcomelist_from_rcvd *@example.nl *.protection.outlook.com</code>) — same result.</li>
<li>A synthetic minimal <code>.eml</code> with a single clean Received header (<code>from HOST.outbound.protection.outlook.com (mail-....outbound.protection.outlook.com [IP]) by my.&lt;domain&gt; (Haraka) ...</code>) and a matching From address — same result. SpamAssassin's own debug log correctly identifies this Received header as <code>__LAST_UNTRUSTED_RELAY_NO_AUTH</code> (i.e. it does parse the relay boundary correctly), yet the whitelist rule still does not fire.</li>
</ul>
<h2>Control test (confirms the mechanism itself, isolates the bug)</h2>
<pre><code>spamassassin -t --cf="welcomelist_from *@example.nl" &lt; message.eml
</code></pre>
<p dir="auto">→ <code>X-Spam-Status: No, score=-100.0 ... tests=...,USER_IN_WELCOMELIST</code> — fires immediately and correctly, at the rule's hardcoded default score of -100.</p>
<p dir="auto">So: the address-only, non-relay-verified directive works reliably; the relay-verified directive (which is presumably intended to be the "safe" option, since it additionally confirms the mail actually arrived via the claimed infrastructure, not just a forged From: header) never fires, in this container/config, regardless of naming (<code>whitelist_from_rcvd</code> vs <code>welcomelist_from_rcvd</code>) or entry age (default-shipped vs newly added).</p>
<h2>Suspected cause</h2>
<p dir="auto"><code>_check_welcomelist_rcvd</code> (in <code>Mail::SpamAssassin::Plugin::WLBLEval</code>, called from <code>check_from_in_default_welcomelist</code>) presumably relies on SpamAssassin's own trusted/internal relay boundary detection to know which Received header to compare against the second (<code>origin</code>) parameter. Since this Cloudron config declares no <code>trusted_networks</code> / <code>internal_networks</code>, that auto-detection may be picking the wrong boundary or failing silently for this reason — even though the same debug run shows SpamAssassin <em>does</em> correctly tag the relevant Received header as the last untrusted relay via a different, unrelated eval (<code>__LAST_UNTRUSTED_RELAY_NO_AUTH</code>). I have not been able to fully confirm this from the plugin source in the time available; posting here in case someone has already solved this or knows the missing config.</p>
<h2>Workaround in use</h2>
<p dir="auto">Switched the partner-domain entries to the non-relay-verified directive with a tuned-down score (rather than the default -100, which would let a spoofed From: header fully bypass filtering):</p>
<pre><code>score USER_IN_WELCOMELIST -4.0
welcomelist_from *@example.nl
</code></pre>
<p dir="auto">This is good enough to counter a BAYES/HELO false-positive but does not fully bypass SPF/DKIM/DNSBL-driven detection the way the (non-working) relay-verified version was intended to. It's a knowingly weaker mechanism (spoofable From header) — would much prefer the relay-verified variant to actually work.</p>
<h2>Ask</h2>
<ol>
<li>Is <code>whitelist_from_rcvd</code> / <code>welcomelist_from_rcvd</code> known to be broken in this SpamAssassin/Cloudron combination, and if so is there a missing config directive (e.g. <code>trusted_networks</code>) that should be shipped by default or that we should add ourselves in <code>custom.cf</code>?</li>
<li>Separately: is there any plan for a proper GUI/API-level "trusted sender domain" feature in the mail app, so this doesn't require hand-editing SpamAssassin rule syntax in a free-text field?</li>
</ol>
<p dir="auto">Happy to provide more debug output / test further if useful.</p>
]]></description><link>https://forum.cloudron.io/topic/15666/def_whitelist_from_rcvd-welcomelist_from_rcvd-does-not-fire-on-cloudron-mail-app-spamassassin-4.0.0-also-no-gui-option-for-sender-whitelisting</link><generator>RSS for Node</generator><lastBuildDate>Fri, 07 Aug 2026 14:54:21 GMT</lastBuildDate><atom:link href="https://forum.cloudron.io/topic/15666.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 01 Jul 2026 08:36:05 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to def_whitelist_from_rcvd / welcomelist_from_rcvd does not fire on Cloudron mail app (SpamAssassin 4.0.0) — also no GUI option for sender whitelisting on Wed, 29 Jul 2026 07:10:57 GMT]]></title><description><![CDATA[<p dir="auto">whitelist will be supported in coming release. There is no plan to expose spamassasin configs and specific variables though. In some future, we want to move away from SA (unlikely but this should remain an implementation detail).</p>
]]></description><link>https://forum.cloudron.io/post/127391</link><guid isPermaLink="true">https://forum.cloudron.io/post/127391</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Wed, 29 Jul 2026 07:10:57 GMT</pubDate></item><item><title><![CDATA[Reply to def_whitelist_from_rcvd / welcomelist_from_rcvd does not fire on Cloudron mail app (SpamAssassin 4.0.0) — also no GUI option for sender whitelisting on Wed, 29 Jul 2026 06:54:09 GMT]]></title><description><![CDATA[<p dir="auto">any update?</p>
]]></description><link>https://forum.cloudron.io/post/127385</link><guid isPermaLink="true">https://forum.cloudron.io/post/127385</guid><dc:creator><![CDATA[imc67]]></dc:creator><pubDate>Wed, 29 Jul 2026 06:54:09 GMT</pubDate></item></channel></rss>