Mailcow-dockerized: Roundcube cannot find GnuPG binary

Created on 30 Aug 2019  Â·  12Comments  Â·  Source: mailcow/mailcow-dockerized

Prior to placing the issue, please check following: (fill out each checkbox with a X once done)

  • [X] I understand that not following below instructions might result in immediate closing and deletion of my issue.
  • [X] I have understood that answers are voluntary and community-driven, and not commercial support.
  • [X] I have verified that my issue has not been already answered in the past. I also checked previous issues.

Description of the bug: What kind of issue have you exactly come across?

I have intalled Roundcube (RC) in a subfolder according to the docs, and then enabled Enigma plugin for sending and reading PGP encrypted mails. Then it gave the error message "Application Error (600): Enigma plugin: GPG binary not found. If you are sure the GPG binary is installed, please specify the location of the GPG binary using the 'binary' driver option.".

Reproduction of said bug: How exactly do you reproduce the bug?

  1. Enable Enigma plugin in RC config.
  2. Login to any account, then navigate to Settings > PGP Keys.
  3. Error message is shown.

I have tried to located gnupg binary in the SOGo container, by running docker exec -it $(docker ps -qf name=sogo-mailcow) which gpg, and it returned nothing.

__I have tried or I do...__ (fill out each checkbox with a X if applicable)

  • [X] In case of WebUI issue, I have tried clearing the browser cache and the issue persists.
  • [ ] I do run mailcow on a Synology, QNAP or any other sort of NAS.

System information

Further information (where applicable):

| Question | Answer |
| --- | --- |
| My operating system | Ubuntu 18.04 |
| Is Apparmor, SELinux or similar active? | Yes |
| Virtualization technlogy (KVM, VMware, Xen, etc) | None |
| Server/VM specifications (Memory, CPU Cores) | 16GB RAM, AMD Ryzen 6C/12T |
| Docker Version (docker version) | Docker CE 19.03.1 |
| Docker-Compose Version (docker-compose version) | 1.24.1 |
| Reverse proxy (custom solution) | Nginx |

Further notes:

  • Output of git diff origin/master, any other changes to the code? If so, please post them.
  • All third-party firewalls and custom iptables rules are unsupported. Please check the Docker docs about how to use Docker with your own ruleset. Nevertheless, iptabels output can help _us_ to help _you_: iptables -L -vn, ip6tables -L -vn, iptables -L -vn -t nat and ip6tables -L -vn -t nat
  • Check docker exec -it $(docker ps -qf name=acme-mailcow) dig +short stackoverflow.com @172.22.1.254 (set the IP accordingly, if you changed the internal mailcow network) and docker exec -it $(docker ps -qf name=acme-mailcow) dig +short stackoverflow.com @1.1.1.1 - output? Timeout?

General logs:

dunno

All 12 comments

Hi,

Can you try this? =>

docker exec -it $(docker ps -qf name=php-fpm) apk add gnupg

------ Originalnachricht ------
Von: "gamezipper" notifications@github.com
An: "mailcow/mailcow-dockerized" mailcow-dockerized@noreply.github.com
Cc: "Subscribed" subscribed@noreply.github.com
Gesendet: 30.08.2019 08:52:07
Betreff: [mailcow/mailcow-dockerized] Roundcube cannot find GnuPG binary
(#2895)

Prior to placing the issue, please check following:(fill out each
checkbox with a X once done)

I understand that not following below instructions might result in
immediate closing and deletion of my issue. I have understood that
answers are voluntary and community-driven, and not commercial support.
I have verified that my issue has not been already answered in the
past. I also checked previous issues

https://github.com/mailcow/mailcow-dockerized/issues.

Description of the bug: What kind of issue have you exactly come
across?

I have intalled Roundcube (RC) in a subfolder according to the docs,
and then enabled Enigma plugin for sending and reading PGP encrypted
mails. Then it gave the error message "Application Error (600): Enigma
plugin: GPG binary not found. If you are sure the GPG binary is
installed, please specify the location of the GPG binary using the
'binary' driver option.".

Reproduction of said bug: How exactly do you reproduce the bug?

Enable Enigma plugin in RC config.Login to any account, then navigate
to Settings > PGP Keys.Error message is shown.
I have tried to located gnupg binary in the SOGo container, by running
docker exec -it $(docker ps -qf name=sogo-mailcow) which gnupg, and it
returned nothing.

I have tried or I do...(fill out each checkbox with a X if applicable)

In case of WebUI issue, I have tried clearing the browser cache and the
issue persists. I do run mailcow on a Synology, QNAP or any other sort
of NAS.
System information

Further information (where applicable):

QuestionAnswer
My operating system Ubuntu 18.04
Is Apparmor, SELinux or similar active? Yes
Virtualization technlogy (KVM, VMware, Xen, etc) None
Server/VM specifications (Memory, CPU Cores) 16GB RAM, AMD Ryzen 6C/12T
Docker Version (docker version) Docker CE 19.03.1
Docker-Compose Version (docker-compose version) 1.24.1
Reverse proxy (custom solution) Nginx
Further notes:

Output of git diff origin/master, any other changes to the code? If so,
please post them.All third-party firewalls and custom iptables rules
are unsupported. Please check the Docker docs about how to use Docker
with your own ruleset. Nevertheless, iptabels output can help us to
help you: iptables -L -vn, ip6tables -L -vn, iptables -L -vn -t nat and
ip6tables -L -vn -t nat Check docker exec -it $(docker ps -qf
name=acme-mailcow) dig +short stackoverflow.com @172.22.1.254 (set the
IP accordingly, if you changed the internal mailcow network) and docker
exec -it $(docker ps -qf name=acme-mailcow) dig +short
stackoverflow.com @1.1.1.1 - output? Timeout?
General logs:

Please take a look at the official documentation
https://mailcow.github.io/mailcow-dockerized-docs/debug-logs/.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/mailcow/mailcow-dockerized/issues/2895?email_source=notifications&email_token=AAWV2FVR3YYH6EERIOMB6JDQHC7RPA5CNFSM4ISJ5EA2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HIL4VZQ,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAWV2FRHL3NVOOBQAR6NIYLQHC7RPANCNFSM4ISJ5EAQ.

Hi, thanks for the reply. It worked and the gpg binary is installed, but now there are internal errors when gpg is called. Is there any log to debug that? I have check the docker logs for php-fpm and I could not find any error messages. I think it could be related to permissions. but I am not sure.

More specifically, it will fail when it tries to list or import keys. I made the key folder writable for www-data. and it still prompts internal error.

Hi, thanks for the reply. It worked and the gpg binary is installed, but now there are internal errors when gpg is called. Is there any log to debug that? I have check the docker logs for php-fpm and I could not find any error messages. I think it could be related to permissions. but I am not sure.

So I have enabled roundcube and enigma logs. Here are what I have got:

errors.log:
PHP Error: Enigma plugin: Unable to open GPG subprocess. in /web/rc/plugins/enigma/lib/enigma_engine.php on line 970 (POST /rc/?_task=settings&_action=plugin.enigmakeys)

enigma.log:
GPG: OPENING GPG SUBPROCESS WITH THE FOLLOWING COMMAND:
GPG: /usr/bin/gpg --status-fd '3' --command-fd '4' --no-secmem-warning --no-tty --no-default-keyring --no-options --always-trust --ignore-time-conflict --ignore-valid-from --homedir '/some_dir/[email protected]' --version

Any idea what these mean? Thanks.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

I have the same issue, any hope to get a fix?

The fix would be to enable proc_open or shell_exec etc.

These can be dangerous and as they aren't a dependency of mailcow, I would like to keep them disabled.

Thanks @andryyy,
Would you be able to point me to the file, where I can change these?

Should be data/conf/phpfpm/php-fpm.d/pools.conf :)

Thanks @andryyy, I would never have found it!
Edit:
I removed proc_open function from the [web-worker] section and it works!
Thanks so much for your help!

Ahh, nice, I was about to ask that. :) Great.

@tborychowski @andryyy Thanks for getting to the bottom of this! I love Roundcube and it would have been a bummer to have to switch to something like Rainloop just to use GPG.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

damdinsharav picture damdinsharav  Â·  3Comments

thannaske picture thannaske  Â·  3Comments

pgollor picture pgollor  Â·  3Comments

bonanza123 picture bonanza123  Â·  3Comments

mritzmann picture mritzmann  Â·  3Comments