<?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[Cloudron 10.0.4: nightly Bayes learning crashes mail-service (EPIPE) on messages > 500 KB]]></title><description><![CDATA[<p dir="auto">Since updating to Cloudron 10.0.4 (mail container cloudron/mail:4.3.5, Ubuntu 24.04), the nightly<br />
Bayes training never completes. It stops after a few mailboxes, every night.</p>
<p dir="auto">Mail logs at midnight:</p>
<pre><code>learnFromUserMail: learning start
learnFromUserMail: learning from mailbox ...            (6 mailboxes)
learnFromUserMail: learning as ham: /app/data/vmail/&lt;user&gt;/mail/cur/...,S=21845327,...
node:events:487
      throw er; // Unhandled 'error' event
Error: write EPIPE
    at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:87:19)
Node.js v24.19.0
WARN exited: mail-service (exit status 1; not expected)
INFO reaped unknown pid 11009 (exit status 98)
INFO spawned: 'mail-service' with pid 11010
</code></pre>
<p dir="auto">"learning done" is never logged, all mailboxes after that one are never trained, and no summary<br />
event is written.</p>
<p dir="auto">Cause, as far as I can tell:</p>
<ul>
<li>spamcLearn() in /app/code/spamd.js pipes the whole file to spamc through<br />
shell.execFileWithInput().</li>
<li>spamc's default --max-size is 500 KB. For a bigger message it exits immediately with 98<br />
(EX_TOOBIG), before even connecting to spamd.</li>
<li>The rest of the write to child.stdin then fails with EPIPE. execFileWithInput() in<br />
/app/code/shell.js has no 'error' listener on child.stdin, so this becomes an uncaught<br />
exception that kills mail-service.</li>
<li>Candidates are the last 3 days of mail (LEARN_DAYS), so any message with an attachment
<blockquote>
<p dir="auto">500 KB is enough to trigger it, which in practice means every night.</p>
</blockquote>
</li>
</ul>
<p dir="auto">Reproduction inside the mail container, against a closed port so nothing is actually learned:</p>
<pre><code>spamc -p 1 -u test@invalid --learntype ham &lt; small.eml ; echo $?   # 69 (tries to connect)
spamc -p 1 -u test@invalid --learntype ham &lt; 2MB.eml   ; echo $?   # 98 (too big, exits at once)
</code></pre>
<p dir="auto">A small Node script doing execFile('spamc', ) followed by child.stdin.end(&lt;2 MB buffer&gt;)<br />
dies with the same "Unhandled 'error' event / write EPIPE".</p>
<p dir="auto">Possible fixes, either would do:</p>
<ul>
<li>in execFileWithInput(), add child.stdin.on('error', () =&gt; {}) so the failure is reported by<br />
the execFile callback instead of crashing the process;</li>
<li>in findMailFiles(), skip files above spamc's max size (e.g. find -size -500k), or treat<br />
exit code 98 as "skipped" rather than as a failure.</li>
</ul>
<p dir="auto">Thanks!</p>
]]></description><link>https://forum.cloudron.io/topic/16155/cloudron-10.0.4-nightly-bayes-learning-crashes-mail-service-epipe-on-messages-500-kb</link><generator>RSS for Node</generator><lastBuildDate>Wed, 28 Oct 2026 14:58:12 GMT</lastBuildDate><atom:link href="https://forum.cloudron.io/topic/16155.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 19 Oct 2026 10:19:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Cloudron 10.0.4: nightly Bayes learning crashes mail-service (EPIPE) on messages > 500 KB on Tue, 20 Oct 2026 15:37:39 GMT]]></title><description><![CDATA[<p dir="auto">Thanks <a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a>! I've applied the commit (mail 4.5.0) and restarted box: only the mail container<br />
was recreated, everything else stayed up.</p>
<p dir="auto">I replayed the exact message that crashed last night's run (5.6 MB). It is no longer picked by<br />
findMailFiles(), and even when fed directly with the new spamcLearn() arguments, spamc exits with 98,<br />
it's handled as "skipped" and the process stays up. Over the last 3 days, 242 messages above 500 KB<br />
are now excluded.</p>
<p dir="auto">The sieve bin_path and default_vsz_limit = 2G changes are working too. I'll confirm "learning done"<br />
after tonight's run.</p>
]]></description><link>https://forum.cloudron.io/post/131288</link><guid isPermaLink="true">https://forum.cloudron.io/post/131288</guid><dc:creator><![CDATA[nilp]]></dc:creator><pubDate>Tue, 20 Oct 2026 15:37:39 GMT</pubDate></item><item><title><![CDATA[Reply to Cloudron 10.0.4: nightly Bayes learning crashes mail-service (EPIPE) on messages > 500 KB on Tue, 20 Oct 2026 13:03:40 GMT]]></title><description><![CDATA[<p dir="auto">Fixed. <a class="plugin-mentions-user plugin-mentions-a" href="/user/nilp" aria-label="Profile: nilp">@<bdi>nilp</bdi></a> you can test with <a href="https://git.cloudron.io/platform/box/-/commit/307b8f5a0d145e43cb2f805aec638163c8e4d9ad" target="_blank" rel="noopener noreferrer nofollow ugc">https://git.cloudron.io/platform/box/-/commit/307b8f5a0d145e43cb2f805aec638163c8e4d9ad</a> if you like. You have to edit <code>/home/yellowtent/box/src/infra_version.js</code> and update that one line . Then <code>systemctl restart box</code> .</p>
]]></description><link>https://forum.cloudron.io/post/131281</link><guid isPermaLink="true">https://forum.cloudron.io/post/131281</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Tue, 20 Oct 2026 13:03:40 GMT</pubDate></item><item><title><![CDATA[Reply to Cloudron 10.0.4: nightly Bayes learning crashes mail-service (EPIPE) on messages > 500 KB on Tue, 20 Oct 2026 12:45:00 GMT]]></title><description><![CDATA[<p dir="auto">Thanks <a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a>! Confirmed again last night on 10.1.5: the run stopped at a 5.6 MB message.</p>
<p dir="auto">One small suggestion alongside the size filter: an 'error' listener on child.stdin in<br />
execFileWithInput() would also stop any other early spamc exit from taking mail-service down.</p>
<p dir="auto">Happy to test the fix when it's out.</p>
]]></description><link>https://forum.cloudron.io/post/131280</link><guid isPermaLink="true">https://forum.cloudron.io/post/131280</guid><dc:creator><![CDATA[nilp]]></dc:creator><pubDate>Tue, 20 Oct 2026 12:45:00 GMT</pubDate></item><item><title><![CDATA[Reply to Cloudron 10.0.4: nightly Bayes learning crashes mail-service (EPIPE) on messages > 500 KB on Tue, 20 Oct 2026 12:40:09 GMT]]></title><description><![CDATA[<p dir="auto">Yup, on it... The issue is that we are feeding spamc files larger than max-size which ends up crashing the bayes learn.</p>
]]></description><link>https://forum.cloudron.io/post/131279</link><guid isPermaLink="true">https://forum.cloudron.io/post/131279</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Tue, 20 Oct 2026 12:40:09 GMT</pubDate></item><item><title><![CDATA[Reply to Cloudron 10.0.4: nightly Bayes learning crashes mail-service (EPIPE) on messages > 500 KB on Tue, 20 Oct 2026 12:03:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a> can you fix it ?</p>
]]></description><link>https://forum.cloudron.io/post/131275</link><guid isPermaLink="true">https://forum.cloudron.io/post/131275</guid><dc:creator><![CDATA[nilp]]></dc:creator><pubDate>Tue, 20 Oct 2026 12:03:37 GMT</pubDate></item><item><title><![CDATA[Reply to Cloudron 10.0.4: nightly Bayes learning crashes mail-service (EPIPE) on messages > 500 KB on Tue, 20 Oct 2026 06:50:29 GMT]]></title><description><![CDATA[<p dir="auto">Confirming this on Cloudron 10.1.5 (mail 4.4.4, Dovecot 2.4.2). On our three servers the nightly learning run has crashed with the same <code>write EPIPE</code> / <code>exited: mail-service</code> on 23 of 27 nights since 11 October; two of the servers have not completed a single run in that period ("learning done" never logged). Every time it stops at the first candidate above 500 KB: last night at messages of 2.5 MB, 3.4 MB and 14.8 MB. Spam/ham training on IMAP moves (IMAPSieve) is not affected, only the nightly run.</p>
]]></description><link>https://forum.cloudron.io/post/131257</link><guid isPermaLink="true">https://forum.cloudron.io/post/131257</guid><dc:creator><![CDATA[imc67]]></dc:creator><pubDate>Tue, 20 Oct 2026 06:50:29 GMT</pubDate></item><item><title><![CDATA[Reply to Cloudron 10.0.4: nightly Bayes learning crashes mail-service (EPIPE) on messages > 500 KB on Mon, 19 Oct 2026 19:52:03 GMT]]></title><description><![CDATA[<p dir="auto">I've now updated to 10.1.5, and unfortunately it doesn't fix it.</p>
<p dir="auto">The running mail container is now cloudron/mail:4.4.4 (Node.js v24.21.0). I ran the same reproduction<br />
inside it, using its own /app/code/shell.js, against a closed port so nothing was learned: spamc exits<br />
with 98 on a 2 MB message, and the process dies with the same "Unhandled 'error' event / write EPIPE".</p>
<p dir="auto">So the nightly learnFromUserMail() run on 10.1.5 will still crash mail-service at the first candidate<br />
message larger than spamc's 500 KB default, and the mailboxes after it are never trained.</p>
]]></description><link>https://forum.cloudron.io/post/131253</link><guid isPermaLink="true">https://forum.cloudron.io/post/131253</guid><dc:creator><![CDATA[nilp]]></dc:creator><pubDate>Mon, 19 Oct 2026 19:52:03 GMT</pubDate></item><item><title><![CDATA[Reply to Cloudron 10.0.4: nightly Bayes learning crashes mail-service (EPIPE) on messages > 500 KB on Mon, 19 Oct 2026 15:38:27 GMT]]></title><description><![CDATA[<p dir="auto">I also checked the 10.1.5 mail image (cloudron/mail:4.4.4) before updating:<br />
shell.js and spamcLearn() are unchanged, so the issue is still there in 10.1.5.</p>
]]></description><link>https://forum.cloudron.io/post/131236</link><guid isPermaLink="true">https://forum.cloudron.io/post/131236</guid><dc:creator><![CDATA[nilp]]></dc:creator><pubDate>Mon, 19 Oct 2026 15:38:27 GMT</pubDate></item><item><title><![CDATA[Reply to Cloudron 10.0.4: nightly Bayes learning crashes mail-service (EPIPE) on messages > 500 KB on Mon, 19 Oct 2026 14:06:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/nilp" aria-label="Profile: nilp">@<bdi>nilp</bdi></a> That's a shame.<br />
My update to 10.1.5 did not show as available for some time, but then appeared magically.</p>
<p dir="auto">I think this is probably one for <a class="plugin-mentions-user plugin-mentions-a" href="/user/james" aria-label="Profile: james">@<bdi>james</bdi></a> or another in the Cloudron team.</p>
]]></description><link>https://forum.cloudron.io/post/131232</link><guid isPermaLink="true">https://forum.cloudron.io/post/131232</guid><dc:creator><![CDATA[timconsidine]]></dc:creator><pubDate>Mon, 19 Oct 2026 14:06:23 GMT</pubDate></item><item><title><![CDATA[Reply to Cloudron 10.0.4: nightly Bayes learning crashes mail-service (EPIPE) on messages > 500 KB on Mon, 19 Oct 2026 13:56:44 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for the suggestion! I've updated to 10.0.5. The dashboard now says there is no further update<br />
available, so 10.1.5 isn't offered to me yet.</p>
<p dir="auto">Unfortunately the issue is still there. The mail container is now cloudron/mail:4.3.9, but<br />
execFileWithInput() in shell.js and spamcLearn() in spamd.js are unchanged: there is still no 'error'<br />
listener on child.stdin, and no size filter on the candidate files.</p>
<p dir="auto">I re-ran the reproduction inside the new container, this time using its own /app/code/shell.js: spamc<br />
exits with 98 on a 2 MB message, and the process dies with the same "Unhandled 'error' event / write<br />
EPIPE". So the nightly learning run should still stop at the first message larger than 500 KB.</p>
]]></description><link>https://forum.cloudron.io/post/131231</link><guid isPermaLink="true">https://forum.cloudron.io/post/131231</guid><dc:creator><![CDATA[nilp]]></dc:creator><pubDate>Mon, 19 Oct 2026 13:56:44 GMT</pubDate></item><item><title><![CDATA[Reply to Cloudron 10.0.4: nightly Bayes learning crashes mail-service (EPIPE) on messages > 500 KB on Mon, 19 Oct 2026 10:27:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/nilp" aria-label="Profile: nilp">@<bdi>nilp</bdi></a> Cloudron 10.0.4 is not latest. Any idea if it’s the same on 10.1.5 ? Seems a lot of changes to Mail recently so that may fix it, but no certainty, just a thought.</p>
]]></description><link>https://forum.cloudron.io/post/131222</link><guid isPermaLink="true">https://forum.cloudron.io/post/131222</guid><dc:creator><![CDATA[timconsidine]]></dc:creator><pubDate>Mon, 19 Oct 2026 10:27:02 GMT</pubDate></item></channel></rss>