<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[iRedMail — EE Edition Amavis Timeout too long.]]></title>
	<link rel="self" href="https://forum.iredmail.org/feed-atom-topic21244.xml" />
	<updated>2026-11-15T05:18:05Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.iredmail.org/topic21244-ee-edition-amavis-timeout-too-long.html</id>
		<entry>
			<title type="html"><![CDATA[EE Edition Amavis Timeout too long.]]></title>
			<link rel="alternate" href="https://forum.iredmail.org/post92351.html#p92351" />
			<content type="html"><![CDATA[<p>==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====<br />- iRedMail version (check /etc/iredmail-release): v1.8.6<br />- Deployed with iRedMail Easy or the downloadable installer? EE<br />- Linux/BSD distribution name and version: Debian Trixie<br />- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSQL<br />- Web server (Apache or Nginx): NGINX<br />- Manage mail accounts with iRedAdmin-Pro? EE<br />- [IMPORTANT] Related original log or error message is required if you&#039;re experiencing an issue.<br />====</p><p> Ok I was getting multiple copies of the same emails. Here is what fixed it:</p><p>The Symptom: On Debian/Ubuntu with amavisd-milter, when an external HTML email hits a SpamAssassin DNS/network hang, Amavis&#039;s default timeout lets the scan run until $child_timeout (300 seconds), causing amavisd-milter to drop the connection (could not insert header 0 X-Virus-Scanned / Connection reset by peer), exhaust all Amavis child workers, delay small transactional emails (like 2FA codes), and trigger duplicate retries across sending clients and backup MX servers.</p><p>The Fix That Resolved It: Adding $sa_timeout = 15; and $max_requests = 10; inside /opt/iredmail/custom/amavisd/amavisd.conf forces SpamAssassin to abort stuck network checks long before amavisd-milter hits its 300-second socket timeout and recycles child processes before stale Perl Net::DNS sockets accumulate.</p><p>Suggested Default Improvement for EE: Recommending that iRedMail EE set a lower default $sa_timeout (such as 15 or 20 seconds, well below amavisd-milter&#039;s 300-second limit) in its generated 50-user template so a single stalled SpamAssassin lookup can never starve the worker pool.</p>]]></content>
			<author>
				<name><![CDATA[Davesworld]]></name>
				<uri>https://forum.iredmail.org/user32970.html</uri>
			</author>
			<updated>2026-11-15T05:18:05Z</updated>
			<id>https://forum.iredmail.org/post92351.html#p92351</id>
		</entry>
</feed>
