<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[iRedMail — Roundcube Webmail - Encryption function missing]]></title>
		<link>https://forum.iredmail.org/topic18494-roundcube-webmail-encryption-function-missing.html</link>
		<atom:link href="https://forum.iredmail.org/feed-rss-topic18494.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Roundcube Webmail - Encryption function missing.]]></description>
		<lastBuildDate>Tue, 15 Mar 2022 02:04:27 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Roundcube Webmail - Encryption function missing]]></title>
			<link>https://forum.iredmail.org/post82495.html#p82495</link>
			<description><![CDATA[<div class="quotebox"><cite>ZhangHuangbin wrote:</cite><blockquote><p>We use &quot;password_algorithm = dovecot&quot;. Please make sure you have correct path to doveadm in parameter &quot;password_dovecotpw&quot;.</p></blockquote></div><p>debian 11<br />iRedMail 1.5.1 PGSQL</p><p>I&#039;m getting the same error when a user tries to change their password. In /opt/www/roundcubemail/plugins/password/config.inc.php I&#039;m seeing:<br /></p><div class="codebox"><pre><code>$config[&#039;password_algorithm&#039;] = &quot;dovecot&quot;;</code></pre></div><p>and<br /></p><div class="codebox"><pre><code>$config[&#039;password_dovecotpw&#039;] = &quot;/usr/bin/doveadm pw&quot;;</code></pre></div><p>The path in the second line is valid. I changed lines 49 and 53 as recommended by cavy and users can now change their password.</p>]]></description>
			<author><![CDATA[null@example.com (clarknova)]]></author>
			<pubDate>Tue, 15 Mar 2022 02:04:27 +0000</pubDate>
			<guid>https://forum.iredmail.org/post82495.html#p82495</guid>
		</item>
		<item>
			<title><![CDATA[Re: Roundcube Webmail - Encryption function missing]]></title>
			<link>https://forum.iredmail.org/post82054.html#p82054</link>
			<description><![CDATA[<p>We use &quot;password_algorithm = dovecot&quot;. Please make sure you have correct path to doveadm in parameter &quot;password_dovecotpw&quot;.</p>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Fri, 28 Jan 2022 01:22:52 +0000</pubDate>
			<guid>https://forum.iredmail.org/post82054.html#p82054</guid>
		</item>
		<item>
			<title><![CDATA[Re: Roundcube Webmail - Encryption function missing]]></title>
			<link>https://forum.iredmail.org/post82003.html#p82003</link>
			<description><![CDATA[<p>Hi,</p><p>After much looking around I&#039;ve found what the issue(s) are.</p><p>As a MariaDB install of Roundcube uses the SQL driver, there are a couple of entries in the config.inc.php for roundcube that need to be updated.</p><p>1.<br />Default entry - $config[&#039;password_algorithm&#039;] = &quot;dovecot&quot;;<br />Should be - $config[&#039;password_algorithm&#039;] = &quot;ssha512&quot;;</p><p>2.<br />Default entry - $config[&#039;password_algorithm_prefix&#039;] = &quot;dovecot&quot;;<br />Should be - $config[&#039;password_algorithm_prefix&#039;] = &quot;{SSHA512}&quot;;</p><p>Maybe devs this should be updated in the install process?</p><p>Hope this helps someone.</p>]]></description>
			<author><![CDATA[null@example.com (cavy)]]></author>
			<pubDate>Sat, 22 Jan 2022 14:44:22 +0000</pubDate>
			<guid>https://forum.iredmail.org/post82003.html#p82003</guid>
		</item>
		<item>
			<title><![CDATA[Re: Roundcube Webmail - Encryption function missing]]></title>
			<link>https://forum.iredmail.org/post82001.html#p82001</link>
			<description><![CDATA[<p>then use your own hashing algo:</p><p>$salt = random_str(8);<br />$hashed_password = hash(&#039;sha512&#039;, $password . $salt, true);<br />$password = &#039;{SSHA512}&#039; . base64_encode($hashed_password . $salt);</p><p>does not rely on dovecot at all and works the same</p>]]></description>
			<author><![CDATA[null@example.com (Cthulhu)]]></author>
			<pubDate>Fri, 21 Jan 2022 15:41:08 +0000</pubDate>
			<guid>https://forum.iredmail.org/post82001.html#p82001</guid>
		</item>
		<item>
			<title><![CDATA[Re: Roundcube Webmail - Encryption function missing]]></title>
			<link>https://forum.iredmail.org/post81999.html#p81999</link>
			<description><![CDATA[<p>Hi All,</p><p>This still appears to be an issue, I&#039;ve just done a fresh install on Debian 11 with MariaDB.</p><p>Created a bunch of users via sql script.</p><p>First user logs in and get this error when trying to change their password.</p><p>I&#039;ve turned on debugging in the config, as per <a href="https://docs.iredmail.org/debug.roundcubemail.html,">https://docs.iredmail.org/debug.roundcubemail.html,</a> but show very little helpful info on why this is failing.</p><p>Could we have a IRedMail dev respond please?</p><p>Thank you for your help.</p>]]></description>
			<author><![CDATA[null@example.com (cavy)]]></author>
			<pubDate>Fri, 21 Jan 2022 05:16:15 +0000</pubDate>
			<guid>https://forum.iredmail.org/post81999.html#p81999</guid>
		</item>
		<item>
			<title><![CDATA[Re: Roundcube Webmail - Encryption function missing]]></title>
			<link>https://forum.iredmail.org/post81884.html#p81884</link>
			<description><![CDATA[<div class="quotebox"><cite>darius1706 wrote:</cite><blockquote><p>Yes, its true. After solution problem with fullchain, there is second problem with private key of dovecot.</p><div class="codebox"><pre><code>doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf line 50: ssl_key: Can&#039;t open file /etc/ssl/private/iRedMail.key: Permission denied</code></pre></div><p>There is problem in key rights and in rights of private directory. But I am not so brave open this for all users.</p><p>I see two ways:<br />1. forget for dovecot generated passwords and generate passwords with other way<br />2. disable changing password over roundcube</p><p>Any other ways are security risk.</p></blockquote></div><p>Nooo, its not possible to login into iredadmin for common users!!!</p>]]></description>
			<author><![CDATA[null@example.com (darius1706)]]></author>
			<pubDate>Fri, 07 Jan 2022 18:11:50 +0000</pubDate>
			<guid>https://forum.iredmail.org/post81884.html#p81884</guid>
		</item>
		<item>
			<title><![CDATA[Re: Roundcube Webmail - Encryption function missing]]></title>
			<link>https://forum.iredmail.org/post81883.html#p81883</link>
			<description><![CDATA[<div class="quotebox"><cite>Cthulhu wrote:</cite><blockquote><p>The problem is related to dovecot, since it runs with user priv, normally it runs as root but in this case, it gets called by php and thus runs as www-data, but the ssl certs are protected and not readable by www-data</p><p>doveadm should not try to read those certs when only generating a password, so this problem is more related to dovecot and/or roundcube (which handles the call to doveadm)</p><p>there are several workarounds for sure, it just depends on how you want to handle it</p></blockquote></div><p>Yes, its true. After solution problem with fullchain, there is second problem with private key of dovecot.</p><div class="codebox"><pre><code>doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf line 50: ssl_key: Can&#039;t open file /etc/ssl/private/iRedMail.key: Permission denied</code></pre></div><p>There is problem in key rights and in rights of private directory. But I am not so brave open this for all users.</p><p>I see two ways:<br />1. forget for dovecot generated passwords and generate passwords with other way<br />2. disable changing password over roundcube</p><p>Any other ways are security risk.</p>]]></description>
			<author><![CDATA[null@example.com (darius1706)]]></author>
			<pubDate>Fri, 07 Jan 2022 18:02:25 +0000</pubDate>
			<guid>https://forum.iredmail.org/post81883.html#p81883</guid>
		</item>
		<item>
			<title><![CDATA[Re: Roundcube Webmail - Encryption function missing]]></title>
			<link>https://forum.iredmail.org/post81882.html#p81882</link>
			<description><![CDATA[<p>The problem is related to dovecot, since it runs with user priv, normally it runs as root but in this case, it gets called by php and thus runs as www-data, but the ssl certs are protected and not readable by www-data</p><p>doveadm should not try to read those certs when only generating a password, so this problem is more related to dovecot and/or roundcube (which handles the call to doveadm)</p><p>there are several workarounds for sure, it just depends on how you want to handle it</p>]]></description>
			<author><![CDATA[null@example.com (Cthulhu)]]></author>
			<pubDate>Fri, 07 Jan 2022 17:28:20 +0000</pubDate>
			<guid>https://forum.iredmail.org/post81882.html#p81882</guid>
		</item>
		<item>
			<title><![CDATA[Re: Roundcube Webmail - Encryption function missing]]></title>
			<link>https://forum.iredmail.org/post81881.html#p81881</link>
			<description><![CDATA[<div class="quotebox"><cite>Cthulhu wrote:</cite><blockquote><p>i dont know why doveadm should even consider reading a ssl cert when only generating a password, but you can for sure get around it:</p><p>$crypted = exec(escapeshellcmd(&quot;sudo /usr/bin/doveadm pw -s &#039;ssha512&#039; -p &quot; . $pass));</p><p>combined with giveing www-data root priv to run /usr/bin/doveadm, this should bypass the problems</p><p>BUT: it opens many possibilites to exploit, if you have webpages hosted that all run under www-data, you give all pages the possibility to run doveadm with root priv!</p><p>for that reason, i dun run nginx, i run apache with fcgid as wrapper and give every hosted page an own user/groupid where all php scripts are run under their own encapsulated environment</p><p>for myself, i really dont like nginx and the fpm approach, but i also use a very hardened and hardpatched php environment to avoid privilege escalation possibilities and only grant special rights to each user for certain php functions that otherwise could result in many possible php related security issues like basedir escaping or even privilegued shell access via web!</p></blockquote></div><p>I finally found main problem, its letsencrypt. iRedMail.crt is linked to letsencrypt directory, which has 700. I am thinking about cron script for copying crt every day and set it correct rights.<br />Chm, still not working, but already not due crt rights. I am going investigate.</p>]]></description>
			<author><![CDATA[null@example.com (darius1706)]]></author>
			<pubDate>Fri, 07 Jan 2022 17:23:31 +0000</pubDate>
			<guid>https://forum.iredmail.org/post81881.html#p81881</guid>
		</item>
		<item>
			<title><![CDATA[Re: Roundcube Webmail - Encryption function missing]]></title>
			<link>https://forum.iredmail.org/post81880.html#p81880</link>
			<description><![CDATA[<div class="quotebox"><cite>Cthulhu wrote:</cite><blockquote><p>i dont know why doveadm should even consider reading a ssl cert when only generating a password, but you can for sure get around it:</p><p>$crypted = exec(escapeshellcmd(&quot;sudo /usr/bin/doveadm pw -s &#039;ssha512&#039; -p &quot; . $pass));</p><p>combined with giveing www-data root priv to run /usr/bin/doveadm, this should bypass the problems</p><p>BUT: it opens many possibilites to exploit, if you have webpages hosted that all run under www-data, you give all pages the possibility to run doveadm with root priv!</p><p>for that reason, i dun run nginx, i run apache with fcgid as wrapper and give every hosted page an own user/groupid where all php scripts are run under their own encapsulated environment</p><p>for myself, i really dont like nginx and the fpm approach, but i also use a very hardened and hardpatched php environment to avoid privilege escalation possibilities and only grant special rights to each user for certain php functions that otherwise could result in many possible php related security issues like basedir escaping or even privilegued shell access via web!</p></blockquote></div><p>Thank you, on servers for company or customers, I have it in similar way. But this is small server for few domains for me and my friends - so its not critical for me and I dont want to spend much time for solution by myself and so I would be rather for official solution because of updates, eg. <br />I can tell users to change password over iredadmin and disable password plugin in roundcube, but it would be nice to repair it. This is standard iRedmail installation on Debian 11, hope it helps for solution.</p>]]></description>
			<author><![CDATA[null@example.com (darius1706)]]></author>
			<pubDate>Fri, 07 Jan 2022 17:02:48 +0000</pubDate>
			<guid>https://forum.iredmail.org/post81880.html#p81880</guid>
		</item>
		<item>
			<title><![CDATA[Re: Roundcube Webmail - Encryption function missing]]></title>
			<link>https://forum.iredmail.org/post81875.html#p81875</link>
			<description><![CDATA[<p>i dont know why doveadm should even consider reading a ssl cert when only generating a password, but you can for sure get around it:</p><p>$crypted = exec(escapeshellcmd(&quot;sudo /usr/bin/doveadm pw -s &#039;ssha512&#039; -p &quot; . $pass));</p><p>combined with giveing www-data root priv to run /usr/bin/doveadm, this should bypass the problems</p><p>BUT: it opens many possibilites to exploit, if you have webpages hosted that all run under www-data, you give all pages the possibility to run doveadm with root priv!</p><p>for that reason, i dun run nginx, i run apache with fcgid as wrapper and give every hosted page an own user/groupid where all php scripts are run under their own encapsulated environment</p><p>for myself, i really dont like nginx and the fpm approach, but i also use a very hardened and hardpatched php environment to avoid privilege escalation possibilities and only grant special rights to each user for certain php functions that otherwise could result in many possible php related security issues like basedir escaping or even privilegued shell access via web!</p>]]></description>
			<author><![CDATA[null@example.com (Cthulhu)]]></author>
			<pubDate>Fri, 07 Jan 2022 14:50:29 +0000</pubDate>
			<guid>https://forum.iredmail.org/post81875.html#p81875</guid>
		</item>
		<item>
			<title><![CDATA[Re: Roundcube Webmail - Encryption function missing]]></title>
			<link>https://forum.iredmail.org/post81872.html#p81872</link>
			<description><![CDATA[<div class="quotebox"><cite>Cthulhu wrote:</cite><blockquote><p>if this code snippet is not working:</p><p>give www-data access to execute /usr/bin/doveadm via visudo</p></blockquote></div><p>I need sleeping, why I didnt try this at the first time - run doveadm from command line as a unprivileged user. And here is result.</p><div class="codebox"><pre><code>doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf line 49: ssl_cert: Can&#039;t open file /etc/ssl/certs/iRedMail.crt: Permission denied</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (darius1706)]]></author>
			<pubDate>Fri, 07 Jan 2022 14:03:25 +0000</pubDate>
			<guid>https://forum.iredmail.org/post81872.html#p81872</guid>
		</item>
		<item>
			<title><![CDATA[Re: Roundcube Webmail - Encryption function missing]]></title>
			<link>https://forum.iredmail.org/post81866.html#p81866</link>
			<description><![CDATA[<p>if this code snippet is not working:</p><p>give www-data access to execute /usr/bin/doveadm via visudo</p>]]></description>
			<author><![CDATA[null@example.com (Cthulhu)]]></author>
			<pubDate>Fri, 07 Jan 2022 07:29:07 +0000</pubDate>
			<guid>https://forum.iredmail.org/post81866.html#p81866</guid>
		</item>
		<item>
			<title><![CDATA[Re: Roundcube Webmail - Encryption function missing]]></title>
			<link>https://forum.iredmail.org/post81865.html#p81865</link>
			<description><![CDATA[<div class="quotebox"><cite>ZhangHuangbin wrote:</cite><blockquote><p>The solution is: in plugin/password/config.inc.php, set &quot;password_algorithm&quot; to &quot;dovecot&quot;, then replace &quot;%D&quot; by &quot;%P&quot;.</p></blockquote></div><p>Sorry, this solution is not working, it looks, that main problem is in function proc_open as I reported in this thread today.</p>]]></description>
			<author><![CDATA[null@example.com (darius1706)]]></author>
			<pubDate>Fri, 07 Jan 2022 07:17:40 +0000</pubDate>
			<guid>https://forum.iredmail.org/post81865.html#p81865</guid>
		</item>
		<item>
			<title><![CDATA[Re: Roundcube Webmail - Encryption function missing]]></title>
			<link>https://forum.iredmail.org/post81864.html#p81864</link>
			<description><![CDATA[<div class="quotebox"><cite>Cthulhu wrote:</cite><blockquote><p>why so complicated?</p><br /><p>$crypted = exec(escapeshellcmd(&quot;/usr/bin/doveadm pw -s &#039;ssha512&#039; -p &quot; . $pass));</p></blockquote></div><p>Hello, I agree, it was part of password.php in roundcubemail.</p>]]></description>
			<author><![CDATA[null@example.com (darius1706)]]></author>
			<pubDate>Fri, 07 Jan 2022 07:03:53 +0000</pubDate>
			<guid>https://forum.iredmail.org/post81864.html#p81864</guid>
		</item>
	</channel>
</rss>
