<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[iRedMail — iRedMail EE dovecot custom conf problem]]></title>
		<link>https://forum.iredmail.org/topic20986-iredmail-ee-dovecot-custom-conf-problem.html</link>
		<atom:link href="https://forum.iredmail.org/feed-rss-topic20986.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in iRedMail EE dovecot custom conf problem.]]></description>
		<lastBuildDate>Sat, 04 Oct 2025 12:10:20 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: iRedMail EE dovecot custom conf problem]]></title>
			<link>https://forum.iredmail.org/post91331.html#p91331</link>
			<description><![CDATA[<p>I updated vmail.mailboxformat to &quot;sdbox&quot; and vmail.mailboxfolder to &quot;dbox&quot; this morning and dovecot is working correctly without custom tweaks to the query in dovecot-pgsql.conf. Thanks for your help.</p>]]></description>
			<author><![CDATA[null@example.com (caretech)]]></author>
			<pubDate>Sat, 04 Oct 2025 12:10:20 +0000</pubDate>
			<guid>https://forum.iredmail.org/post91331.html#p91331</guid>
		</item>
		<item>
			<title><![CDATA[Re: iRedMail EE dovecot custom conf problem]]></title>
			<link>https://forum.iredmail.org/post91276.html#p91276</link>
			<description><![CDATA[<div class="quotebox"><cite>ZhangHuangbin wrote:</cite><blockquote><p>- Why do you prefer sdbox over mdbox and maildir?</p></blockquote></div><p>The switch to sdbox was, as stated, so we could enjoy deduplicated attachment storage. On some servers this nearly cuts the mail storage on disk in half. If several emails share the exact same attachment the file is stored only once instead of multiple copies of it.</p><p>After reading some more I realize that the sdbox format is staying but the single instance attachment storage part of it is being deprecated. Dovecot will continue to read the single-instance storage but will no longer write to it after upgrade to 2.4.</p><p>As far as why sdbox over mdbox, a mail guru I know told me the &quot;one email per file&quot; model of sdbox is more reliable than mdbox, which with multiple mails per file tends to have corruption issues more often. I have no mdbox experience but based on a long relationship with this person and observing his technical knowledge and skill, I am satisfied to trust his judgment.</p><p>Thanks for the sql database change suggestions, I&#039;ll give that a look later. It&#039;ll be a few days before I can get to it.</p><p>The bottom line is that now with single-instance attachment storage being deprecated, our whole reason to prefer sdbox over maildir is taken away. This is why I said I regret the move, in my first post.</p>]]></description>
			<author><![CDATA[null@example.com (caretech)]]></author>
			<pubDate>Thu, 18 Sep 2025 01:34:41 +0000</pubDate>
			<guid>https://forum.iredmail.org/post91276.html#p91276</guid>
		</item>
		<item>
			<title><![CDATA[Re: iRedMail EE dovecot custom conf problem]]></title>
			<link>https://forum.iredmail.org/post91275.html#p91275</link>
			<description><![CDATA[<p>- Why do you prefer sdbox over mdbox and maildir?<br />- You can set the mailbox format in sql column `mailbox.mailboxformat` (in lower case), e.g. &quot;mdbox&quot;, &quot;maildir&quot;. Also set mailbox folder in `vmail.mailboxfolder` (case sensitive). e.g. &quot;mdbox&quot;, &quot;Maildir&quot;.</p><p>I don&#039;t understand why you need to customize dovecot-pgsql.conf.</p>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Thu, 18 Sep 2025 01:21:05 +0000</pubDate>
			<guid>https://forum.iredmail.org/post91275.html#p91275</guid>
		</item>
		<item>
			<title><![CDATA[Re: iRedMail EE dovecot custom conf problem]]></title>
			<link>https://forum.iredmail.org/post91274.html#p91274</link>
			<description><![CDATA[<p>Hi Zhang, @caretech is my sysadmin and performed the EE upgrade.</p><p>I know at one time it looked like dovecot was deprecating sdbox - but maybe they changed course?</p><p>I can&#039;t post links here, but you can search sdbox in Dovecot&#039;s docs and it appears to be supported in 2.4.0 and 2.4.1</p><p>Could you add an option to the EE interface to natively support sdbox storage?</p><p>Gerald</p><p>PS:&nbsp; Edit, it appears what&#039;s being deprecated moving forward is the single instance storage / deduplication of attachments.&nbsp; However it appears that dovecot 2.4 will continue to read the existing mail store, it just won&#039;t deduplicate attachments moving forward.</p>]]></description>
			<author><![CDATA[null@example.com (gerald_martin)]]></author>
			<pubDate>Thu, 18 Sep 2025 00:03:57 +0000</pubDate>
			<guid>https://forum.iredmail.org/post91274.html#p91274</guid>
		</item>
		<item>
			<title><![CDATA[Re: iRedMail EE dovecot custom conf problem]]></title>
			<link>https://forum.iredmail.org/post91273.html#p91273</link>
			<description><![CDATA[<p>As it stands now, when we do a Deploy all the mail disappears because dovecot is configured for maildir again and sees no messages. After manually editing config and restarting dovecot, all is normal.</p>]]></description>
			<author><![CDATA[null@example.com (caretech)]]></author>
			<pubDate>Wed, 17 Sep 2025 23:37:07 +0000</pubDate>
			<guid>https://forum.iredmail.org/post91273.html#p91273</guid>
		</item>
		<item>
			<title><![CDATA[Re: iRedMail EE dovecot custom conf problem]]></title>
			<link>https://forum.iredmail.org/post91271.html#p91271</link>
			<description><![CDATA[<p>Hi Zhang,</p><p>This server is not using mdbox but rather sdbox. We chose this to take advantage of deduplicated attachment storage. iRedMail&#039;s graphical config offers just two options, mdbox and maildir. sdbox is not a GUI option. The complete list of changes to make this happen:</p><p>In dovecot.conf:</p><div class="codebox"><pre><code># comment the original mail_location line, and add the following:
mail_location = sdbox:~/dbox
mail_attachment_dir = /var/vmail/attachments
mail_attachment_min_size = 64k</code></pre></div><p>Then in dovecot-pgsql.conf, the user_query is modified as shown in my original post.</p><p>We will have to do a massive migration operation at some point to switch back to maildir, because Dovecot 2.4 drops support for sdbox. We are still running 2.3. But meantime I need a way to manually specify dovecot-pgsql overrides in custom config.</p>]]></description>
			<author><![CDATA[null@example.com (caretech)]]></author>
			<pubDate>Wed, 17 Sep 2025 23:32:52 +0000</pubDate>
			<guid>https://forum.iredmail.org/post91271.html#p91271</guid>
		</item>
		<item>
			<title><![CDATA[Re: iRedMail EE dovecot custom conf problem]]></title>
			<link>https://forum.iredmail.org/post91269.html#p91269</link>
			<description><![CDATA[<p>Hi,</p><p>Why not updating sql column `mailboxformat` and `mailboxfolder` to use mdbox format mailbox?</p>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Wed, 17 Sep 2025 23:27:33 +0000</pubDate>
			<guid>https://forum.iredmail.org/post91269.html#p91269</guid>
		</item>
		<item>
			<title><![CDATA[iRedMail EE dovecot custom conf problem]]></title>
			<link>https://forum.iredmail.org/post91268.html#p91268</link>
			<description><![CDATA[<p>==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====<br />- iRedMail version: upgraded today to EE from 1.7.4<br />- Deployed via installer originally<br />- Linux/BSD distribution name and version: Debian 12.12<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? Yes, til EE upgrade<br />- [IMPORTANT] Related original log or error message is required if you&#039;re experiencing an issue.<br />====</p><p>Putting custom settings in /opt/iredmail/custom/&lt;software&gt; worked fine for all software, except for custom dovecot-pgsql.conf settings.</p><p>This server has been modified to use the sdbox mail storage, a move I now regret but need to live with. This involves a few changes to dovecot.conf and putting my custom conf in /opt/iredmail/custom/dovecot/conf-enabled/dovecot.conf works fine.</p><p>But if I put a file in this directory named dovecot-pgsql.conf with my custom user_query string, Dovecot fails to start with error message &quot;Unknown settings user_query.&quot; If I copy the entire contents of the dovecot-pgsql.conf file it takes issue with the very first config line: &quot;Unknown setting: driver&quot;</p><p>Can I specify custom user_query settings so the deploy / upgrade process doesn&#039;t overwrite? For now to get going I have hand-edited the file in the /etc/dovecot directory but I know that is over-written with any changes in the GUI.</p><p>For the record, my new user_query setting is below:</p><div class="codebox"><pre><code>user_query = SELECT \
            &#039;%u&#039; AS master_user, \
            LOWER(CONCAT(mailbox.storagebasedirectory, &#039;/&#039;, mailbox.storagenode, &#039;/&#039;, mailbox.maildir)) AS home, \
            CONCAT(&#039;*:bytes=&#039;, mailbox.quota*1048576) AS quota_rule \
        FROM mailbox,domain \
       WHERE mailbox.username=&#039;%u&#039; \
             AND mailbox.domain=&#039;%d&#039; \
             AND mailbox.&quot;enable%Ls%Lc&quot;=1 \
             AND mailbox.domain=domain.domain \
             AND domain.backupmx=0 \
             AND domain.active=1 \
             AND mailbox.active=1</code></pre></div><p>The only difference from the original is the removal of this line:</p><div class="codebox"><pre><code>            CONCAT(mailbox.mailboxformat, &#039;:~/&#039;, mailbox.mailboxfolder) AS mail, \</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (caretech)]]></author>
			<pubDate>Wed, 17 Sep 2025 20:10:11 +0000</pubDate>
			<guid>https://forum.iredmail.org/post91268.html#p91268</guid>
		</item>
	</channel>
</rss>
