<?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 External SMTP &gt; Mail-in-a-box SMTP &gt; ECONNREFUSED]]></title><description><![CDATA[<p dir="auto">Attempting to setup an external email relay on Cloudron via an external SMTP server (which is a self-hosted instance of Mail-in-a-Box <a href="https://mailinabox.email/" target="_blank" rel="noopener noreferrer nofollow ugc">https://mailinabox.email/</a> in this case).</p>
<p dir="auto">This SMTP server works fine for email clients via SMTP connection.</p>
<p dir="auto">However, when I've attempted to connect to it from my Cloudron instance (Cloudron-Mautic app, now the default mail server), have had issues. Which makes me think it's on Cloudron's side.</p>
<p dir="auto">Incoming mail is disabled on Cloudron server.<br />
Attempted to change the Cloudron global mail server location to the SMTP server's domain. Didn't make any difference.<br />
Problem definitely is not the password.</p>
<p dir="auto">The Mail-in-a-box/SMTP server lives at <a href="http://box.domain.com" target="_blank" rel="noopener noreferrer nofollow ugc">box.domain.com</a>.<br />
The cloudron instance is setup at <a href="http://my.domain.com" target="_blank" rel="noopener noreferrer nofollow ugc">my.domain.com</a> via wildcard domain configuration in cloudron. (Visiting these servers via webpage works fine, so don't see any reason why this would be problematic.)<br />
Again, other SMTP connections to this Mail-in-a-box server work fine.</p>
<p dir="auto">The error message i'm getting is below ("ECONNREFUSED")</p>
<p dir="auto">Any ideas anyone?<br />
Thanks for the help.</p>
<p dir="auto"><img src="/assets/uploads/files/1611711535747-10e3d68e-959b-4658-9a6c-96f173c5822a-image.png" alt="10e3d68e-959b-4658-9a6c-96f173c5822a-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.cloudron.io/topic/4284/cloudron-external-smtp-mail-in-a-box-smtp-econnrefused</link><generator>RSS for Node</generator><lastBuildDate>Fri, 08 May 2026 12:16:37 GMT</lastBuildDate><atom:link href="https://forum.cloudron.io/topic/4284.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 27 Jan 2021 01:54:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 🤔 Cloudron External SMTP &gt; Mail-in-a-box SMTP &gt; ECONNREFUSED on Fri, 29 Jan 2021 18:35:36 GMT]]></title><description><![CDATA[<p dir="auto">The root cause for this was the Cloudron server had the hostname as "<a href="http://box.domain.com" target="_blank" rel="noopener noreferrer nofollow ugc">box.domain.com</a>" (same as the relay). Debian/Ubuntu has a quirk that it will put the hostname in /etc/hosts to resolve as 127.0.1.1. This meant that when we try to set it as relay, it resolves to 127.0.1.1 instead of the actual IP.</p>
<p dir="auto">To add to the confusion, I suggested using the <code>host</code> command which does not use <code>/etc/hosts</code> (i.e the nsswitch mechanisms) and uses only the DNS. If I had suggested using <code>ping</code> then we would have narrowed down the issue more quickly...</p>
<p dir="auto">Anyway, the fix is simply to <code>hostnamectl set-hostname somethingelse.domain.com</code> and also edit <code>/etc/hosts</code> (for some reason, hostnamectl doesn't change hosts file even after reboot, <img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f937.png?v=fed68e33a46" class="not-responsive emoji emoji-android emoji--shrug" style="height:23px;width:auto;vertical-align:middle" title=":shrug:" alt="🤷" /> ).</p>
]]></description><link>https://forum.cloudron.io/post/24402</link><guid isPermaLink="true">https://forum.cloudron.io/post/24402</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Fri, 29 Jan 2021 18:35:36 GMT</pubDate></item><item><title><![CDATA[Reply to 🤔 Cloudron External SMTP &gt; Mail-in-a-box SMTP &gt; ECONNREFUSED on Thu, 28 Jan 2021 19:34:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/tshirt-chihuahu" aria-label="Profile: tshirt-chihuahu">@<bdi>tshirt-chihuahu</bdi></a> The DNS response seems correct. So, the issue is somewhere else. Let me quickly test it here to see if it's a general issue or something with your setup.</p>
]]></description><link>https://forum.cloudron.io/post/24287</link><guid isPermaLink="true">https://forum.cloudron.io/post/24287</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Thu, 28 Jan 2021 19:34:00 GMT</pubDate></item><item><title><![CDATA[Reply to 🤔 Cloudron External SMTP &gt; Mail-in-a-box SMTP &gt; ECONNREFUSED on Wed, 27 Jan 2021 17:45:40 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><br />
Given it doesn't appear to be a DNS issue as <a href="http://box.domain.com" target="_blank" rel="noopener noreferrer nofollow ugc">box.domain.com</a> 127.0.0.1 routes to the mail server. Any other ideas? I'm stuck.</p>
]]></description><link>https://forum.cloudron.io/post/24166</link><guid isPermaLink="true">https://forum.cloudron.io/post/24166</guid><dc:creator><![CDATA[tshirt-chihuahu]]></dc:creator><pubDate>Wed, 27 Jan 2021 17:45:40 GMT</pubDate></item><item><title><![CDATA[Reply to 🤔 Cloudron External SMTP &gt; Mail-in-a-box SMTP &gt; ECONNREFUSED on Wed, 27 Jan 2021 07:50:15 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></p>
<blockquote>
<p dir="auto">I'm going to run with the firewall idea to see if that leads to a fix so that can be counted out and will report back.</p>
</blockquote>
<p dir="auto">Doesn't appear to be a firewall issue afterall. Nothing on the ban list (fail2ban) now and issue persists.</p>
]]></description><link>https://forum.cloudron.io/post/24133</link><guid isPermaLink="true">https://forum.cloudron.io/post/24133</guid><dc:creator><![CDATA[tshirt-chihuahu]]></dc:creator><pubDate>Wed, 27 Jan 2021 07:50:15 GMT</pubDate></item><item><title><![CDATA[Reply to 🤔 Cloudron External SMTP &gt; Mail-in-a-box SMTP &gt; ECONNREFUSED on Wed, 27 Jan 2021 07:20:33 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> said in <a href="/post/24130"><img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f914.png?v=fed68e33a46" class="not-responsive emoji emoji-android emoji--thinking_face" style="height:23px;width:auto;vertical-align:middle" title="🤔" alt="🤔" /> Cloudron External SMTP &gt; Mail-in-a-box SMTP &gt; ECONNREFUSED</a>:</p>
<blockquote>
<p dir="auto">host <a href="http://box.domain.com" target="_blank" rel="noopener noreferrer nofollow ugc">box.domain.com</a> 127.0.0.1</p>
</blockquote>
<p dir="auto">This returns:</p>
<blockquote>
<p dir="auto">Using domain server:<br />
Name: 127.0.0.1<br />
Address: 127.0.0.1#53<br />
Aliases:</p>
<p dir="auto"><a href="http://box.domain.com" target="_blank" rel="noopener noreferrer nofollow ugc">box.domain.com</a> has address [MIAB Server IP]<br />
<a href="http://box.domain.com" target="_blank" rel="noopener noreferrer nofollow ugc">box.domain.com</a> mail is handled by 10 <a href="http://box.domain.com" target="_blank" rel="noopener noreferrer nofollow ugc">box.domain.com</a></p>
</blockquote>
<p dir="auto">I assume this is as expected/desired, correct?</p>
]]></description><link>https://forum.cloudron.io/post/24131</link><guid isPermaLink="true">https://forum.cloudron.io/post/24131</guid><dc:creator><![CDATA[tshirt-chihuahu]]></dc:creator><pubDate>Wed, 27 Jan 2021 07:20:33 GMT</pubDate></item><item><title><![CDATA[Reply to 🤔 Cloudron External SMTP &gt; Mail-in-a-box SMTP &gt; ECONNREFUSED on Wed, 27 Jan 2021 07:12:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/tshirt-chihuahu" aria-label="Profile: tshirt-chihuahu">@<bdi>tshirt-chihuahu</bdi></a> said in <a href="/post/24129"><img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f914.png?v=fed68e33a46" class="not-responsive emoji emoji-android emoji--thinking_face" style="height:23px;width:auto;vertical-align:middle" title="🤔" alt="🤔" /> Cloudron External SMTP &gt; Mail-in-a-box SMTP &gt; ECONNREFUSED</a>:</p>
<blockquote>
<p dir="auto">Thus the "host" command on the cloudron machine returns the expected IP addresses for the Cloudron and MIAB servers based on the domain/subdomain pinged.</p>
</blockquote>
<p dir="auto">Can you try <code>host box.domain.com 127.0.0.1</code> as well ? Cloudron has an internal DNS server (called unbound). Depending on whether the host command works, you might have to tweak that DNS for your setup - <a href="https://docs.cloudron.io/networking/#private-dns" target="_blank" rel="noopener noreferrer nofollow ugc">https://docs.cloudron.io/networking/#private-dns</a></p>
]]></description><link>https://forum.cloudron.io/post/24130</link><guid isPermaLink="true">https://forum.cloudron.io/post/24130</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Wed, 27 Jan 2021 07:12:13 GMT</pubDate></item><item><title><![CDATA[Reply to 🤔 Cloudron External SMTP &gt; Mail-in-a-box SMTP &gt; ECONNREFUSED on Wed, 27 Jan 2021 07:08:14 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> good point. here's what is returned on the cloudron server at <a href="http://my.domain.com" target="_blank" rel="noopener noreferrer nofollow ugc">my.domain.com</a>:</p>
<blockquote>
<p dir="auto">$ host <a href="http://box.domain.com" target="_blank" rel="noopener noreferrer nofollow ugc">box.domain.com</a><br />
<a href="http://box.domain.com" target="_blank" rel="noopener noreferrer nofollow ugc">box.domain.com</a> has address [correct IP address for MIAB machine]<br />
<a href="http://box.domain.com" target="_blank" rel="noopener noreferrer nofollow ugc">box.domain.com</a> mail is handled by 10 <a href="http://box.domain.com" target="_blank" rel="noopener noreferrer nofollow ugc">box.domain.com</a></p>
</blockquote>
<p dir="auto">[correct ip address for MIAB machine] is of course definitely not 127.0.1.1</p>
<p dir="auto">re: custom DNS<br />
the Mail-in-a-Box server at <a href="http://box.domain.com" target="_blank" rel="noopener noreferrer nofollow ugc">box.domain.com</a> controls the DNS for <a href="http://domain.com" target="_blank" rel="noopener noreferrer nofollow ugc">domain.com</a> and <a href="http://otherdomain.com" target="_blank" rel="noopener noreferrer nofollow ugc">otherdomain.com</a> (standard for MIAB to control DNS) and there are custom DNS entries....</p>
<p dir="auto">However, the only custom DNS records are the wildcard A records (1 for each domain) pointing to the same cloudron server.</p>
<p dir="auto">Thus the "host" command on the cloudron machine returns the expected IP addresses for the Cloudron and MIAB servers based on the domain/subdomain pinged.</p>
<p dir="auto">Host is Vultr in case that provides any clues. The servers are in the same geographic location listed by Vultr.</p>
<p dir="auto">My current hypotheses (which likely aren't worth much):</p>
<ul>
<li>Error message is not returning the expected information (has happened before will happen again)</li>
<li>there's something going on with the container isolation strategy you guys are using that isn't playing nicely with the network.... but you'd know way more about that than me.</li>
</ul>
<p dir="auto">I'm going to run with the firewall idea to see if that leads to a fix so that can be counted out and will report back.</p>
]]></description><link>https://forum.cloudron.io/post/24129</link><guid isPermaLink="true">https://forum.cloudron.io/post/24129</guid><dc:creator><![CDATA[tshirt-chihuahu]]></dc:creator><pubDate>Wed, 27 Jan 2021 07:08:14 GMT</pubDate></item><item><title><![CDATA[Reply to 🤔 Cloudron External SMTP &gt; Mail-in-a-box SMTP &gt; ECONNREFUSED on Wed, 27 Jan 2021 04:17:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/tshirt-chihuahu" aria-label="Profile: tshirt-chihuahu">@<bdi>tshirt-chihuahu</bdi></a> It seems that for some reason the SMTP host resolves to 127.0.1.1 (from the error message). Can you try to run <code>host box.domain.com</code> on the Cloudron server and tell me what it returns?</p>
<p dir="auto">(Also, do you have any custom DNS setup by any chance?)</p>
]]></description><link>https://forum.cloudron.io/post/24119</link><guid isPermaLink="true">https://forum.cloudron.io/post/24119</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Wed, 27 Jan 2021 04:17:06 GMT</pubDate></item><item><title><![CDATA[Reply to 🤔 Cloudron External SMTP &gt; Mail-in-a-box SMTP &gt; ECONNREFUSED on Wed, 27 Jan 2021 03:56:01 GMT]]></title><description><![CDATA[<p dir="auto">Realized this is most likely a firewall issue at this point.</p>
<p dir="auto">Saw some posts about Mautic (which I was previously attempting to connect directly to the same SMTP server via the app settings) configuration not behaving well - which I definitely experienced, which likely landed the IP on a block list.</p>
<p dir="auto">But if anyone else has any ideas I'd be happy to hear them.....</p>
]]></description><link>https://forum.cloudron.io/post/24118</link><guid isPermaLink="true">https://forum.cloudron.io/post/24118</guid><dc:creator><![CDATA[tshirt-chihuahu]]></dc:creator><pubDate>Wed, 27 Jan 2021 03:56:01 GMT</pubDate></item></channel></rss>