1

Topic: Dovecot mailcrypt plugin won't encrypt emails

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release):  latest (6.3.2?)
- Deployed with iRedMail Easy or the downloadable installer? downloadable script
- Linux/BSD distribution name and version:  tried Centos 6 and 7 also Debian 9 and 10
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  MySQL
- Web server (Apache or Nginx): nginx
- Manage mail accounts with iRedAdmin-Pro? no
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue. log is empty
====

Mailcrypt plugin doesn't seem to work with my Iredmail install. I've tried different OSs but to no avail. I've used both official (https://doc.dovecot.org/configuration_m … ypt-plugin) and third party guides but I still can't make it work for some reason. Emails are not getting encrypted.  Perhaps you could provide a working dovecot.conf?

BR,
Paul

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Dovecot mailcrypt plugin won't encrypt emails

- Any related error in Dovecot log files (/var/log/dovecot/*.log)?
- Better use Dovecot-2.3.x for testing, or at least 2.2.36.

    # CentOS 7:     Dovecot-2.2.36+
    # CentOS 8:     Dovecot-2.3.8+
    # Debian 9:     Dovecot-2.2.27
    # Debian 10:    Dovecot-2.3.4+
    # Ubuntu 18.04: Dovecot-2.2.33
    # Ubuntu 20.04: Dovecot-2.3.7+
    # FreeBSD:      Dovecot-2.3.0+
    # OpenBSD 6.7:  Dovecot-2.3.10+

3

Re: Dovecot mailcrypt plugin won't encrypt emails

ZhangHuangbin wrote:

- Any related error in Dovecot log files (/var/log/dovecot/*.log)?
- Better use Dovecot-2.3.x for testing, or at least 2.2.36.

    # CentOS 7:     Dovecot-2.2.36+
    # CentOS 8:     Dovecot-2.3.8+
    # Debian 9:     Dovecot-2.2.27
    # Debian 10:    Dovecot-2.3.4+
    # Ubuntu 18.04: Dovecot-2.2.33
    # Ubuntu 20.04: Dovecot-2.3.7+
    # FreeBSD:      Dovecot-2.3.0+
    # OpenBSD 6.7:  Dovecot-2.3.10+

Dovecot is latest version (now running debian 10).

Log is empty (well, no errors at least):

Jun 14 15:08:08 mail dovecot: master: Dovecot v2.3.4.1 (f79e8e7e4) starting up for pop3, imap, sieve, lmtp (core dumps disabled)
Jun 14 15:08:39 mail dovecot: stats: Error: (stats-reader): didn't reply with a valid VERSION line: EXPORT#011global
Jun 14 15:08:39 mail dovecot: stats: Error: (stats-reader): didn't reply with a valid VERSION line: EXPORT#011global
Jun 14 15:53:35 mail dovecot: master: Warning: SIGHUP received - reloading configuration

Other logs only contain normal log in/log out activity.

Any ideas?

4

Re: Dovecot mailcrypt plugin won't encrypt emails

SERVERIA wrote:

Jun 14 15:08:39 mail dovecot: stats: Error: (stats-reader): didn't reply with a valid VERSION line: EXPORT#011global
Jun 14 15:08:39 mail dovecot: stats: Error: (stats-reader): didn't reply with a valid VERSION line: EXPORT#011global

This is not related to mail_crypt plugin. How did you verify that it doesn't work?

5

Re: Dovecot mailcrypt plugin won't encrypt emails

ZhangHuangbin wrote:
SERVERIA wrote:

Jun 14 15:08:39 mail dovecot: stats: Error: (stats-reader): didn't reply with a valid VERSION line: EXPORT#011global
Jun 14 15:08:39 mail dovecot: stats: Error: (stats-reader): didn't reply with a valid VERSION line: EXPORT#011global

This is not related to mail_crypt plugin. How did you verify that it doesn't work?

Yes, that's why I mentioned no errors (these are not related). I have a brand new install which works ok. It can both send and receive emails just fine. Once I edit dovecot.conf and add mail_crypt plugin sending works but receiving stops working. Funniest thing, even if I undo changes it wouldn't start working again. I have to rollback to a brand new vm (clone from backup) only then it starts working.

6

Re: Dovecot mailcrypt plugin won't encrypt emails

Please turn on debug mode in Dovecot and try to reproduce the issue. We need related log to help troubleshoot.