I’m using passbolt on ubuntu 20 and PHP version 7.4 now i am not able to receive emails for sign in. please help .
Hi @usman.tariq
Did you check this help page: Passbolt Help | Why are my emails not being sent?
There is also this one: Passbolt Help | Configure email providers
Which SMTP provider are you using ?
Best,
Thanks for reply sir but i did same steps which you send me both link.
sudo -H www-data -u bash -c "/usr/share/php/passbolt/bin/cake passbolt send_test_email --recipient=youremail@domain.com"
this command is also not working.
Hi,
Can you post the full output of this command ? Just in case --recipient=youremail@domain.com
has to be replaced with your mail address.
Cheers,
root@ops:/# sudo -H www-data -u bash -c “/usr/share/php/passbolt/bin/cake passbolt send_test_email --recipient=my@email.com”
sudo: www-data: command not found
My bad, the command in this help page contains a typo, the correct one is:
sudo -H -u www-data bash -c "/usr/share/php/passbolt/bin/cake passbolt send_test_email --recipient=youremail@domain.com"
It is -u www-data
and not www-data -u
Best,
root@ops:/# sudo -H -u www-data bash -c “/usr/share/php/passbolt/bin/cake passbolt send_test_email --recipient=my@email.com”
PHP Fatal error: You must enable the gnupg extension to use Passbolt. in /etc/passbolt/requirements.php on line 31
root@ops:/#
And sir gnupg extension is already enable
I have more then one version of PHP and I used PHP 7.4
Hi,
As passbolt is a password manager and contain sensitive informations, the recommended way to install it is to use a fresh vanilla server without other services hosted on it. This to reduce attack surface and avoid situations like this one
I guess you have enabled gnupg extension on one of your php version and not the one used to launch the passbolt command.
If you cannot use a dedicated server, maybe can you consider using docker to isolate passbolt application: Passbolt Help | Docker passbolt installation ?
Best,
Thanks for your advice sir but now I am already hosted on the server where another application is hosted and I have a lot of data in passbolt I cannot change now I will lose all my data, please suggest any debugging method.
Hi,
Can you give me the output of these commands:
PHP:
sudo grep -rn gnupg /etc/php/
dpkg -l | grep -E "php.*cli"
dpkg -l | egrep "php.*gnupg"
php -v
Passbolt related:
sudo /usr/share/php/passbolt/bin/status-report
Thanks !
root@ops:/# sudo grep -rn gnupg /etc/php/
/etc/php/7.3/mods-available/gnupg.ini:1:extension=gnupg.so
/etc/php/7.4/cli/php.ini:938:extension=/usr/lib/php/20190902/gnupg.so
/etc/php/7.4/fpm/php.ini:938:extension=/usr/lib/php/20190902/gnupg.so
/etc/php/7.4/mods-available/gnupg.ini:1:extension=gnupg.so
root@ops:/# dpkg -l | grep -E "php.*cli"
ii php-cli 2:8.1+92+ubuntu20.04.1+deb.sury.org+2 all command-line interpreter for the PHP scripting language (default)
ii php7.3-cli 7.3.33-1+ubuntu20.04.1+deb.sury.org+1 amd64 command-line interpreter for the PHP scripting language
ii php7.4-cli 7.4.28-1+ubuntu20.04.1+deb.sury.org+1 amd64 command-line interpreter for the PHP scripting language
ii php8.0-cli 8.0.17-1+ubuntu20.04.1+deb.sury.org+1 amd64 command-line interpreter for the PHP scripting language
ii php8.1-cli 8.1.3-1+ubuntu20.04.1+deb.sury.org+1 amd64 command-line interpreter for the PHP scripting language
root@ops:/# dpkg -l | egrep "php.*gnupg"
rc php-gnupg 1.5.1-1+ubuntu20.04.1+deb.sury.org+10 amd64 PHP wrapper around the gpgme library
ii php7.3-gnupg 1.5.1-1+ubuntu20.04.1+deb.sury.org+10 amd64 PHP wrapper around the gpgme library
ii php7.4-gnupg 1.5.1-1+ubuntu20.04.1+deb.sury.org+10 amd64 PHP wrapper around the gpgme library
root@ops:/# php -v
PHP 8.1.3 (cli) (built: Feb 21 2022 14:48:42) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.3, Copyright (c) Zend Technologies
with Zend OPcache v8.1.3, Copyright (c), by Zend Technologies
root@ops:/# ^C
root@ops:/#
output of command.
root@ops:/usr/share/php/passbolt/bin# cat status-report
#!/usr/bin/env bash
set -euo pipefail
user=${1:-www-data}
DIR=$(dirname "$(readlink -f "$0")")
# shellcheck source=utils.sh
# shellcheck disable=SC1091
source "$DIR/utils.sh"
"$DIR"/versions "$user"
run_as "$DIR/cake passbolt healthcheck" "$user"
run_as "$DIR/cake passbolt cleanup --dry-run" "$user"
run_as "$DIR/cake passbolt datacheck --hide-success-details" "$user"
tail -100 "$(run_as "$DIR/cake passbolt show_logs_path" "$user" | tail -1)"
root@ops:/usr/share/php/passbolt/bin#
status report
Hi,
Can you execute sudo /usr/share/php/passbolt/bin/status-report
instead of cat status-report
? it will display some health status regarding passbolt.
Your default php-cli command is set to PHP 8.1.3 and this version doesn’t have any gnupg extension installed according to the output of the commands.
If I give you the command to change the default php-cli to php 7.4, there is chances it will broke your other applications hosted on your server. Do you have many applications requesting PHP 8.1 ?
Thanks,
root@ops:/# sudo /usr/share/php/passbolt/bin/status-report
PHP Fatal error: You must enable the gnupg extension to use Passbolt. in /etc/passbolt/requirements.php on line 31
root@ops:/#
I’m ok to update the default PHP-CLI to 7.4.
You can do it with
$ sudo update-alternatives --config php
You will have this, just choose the line number with php7.4 (it is 2 in the example below, can differ on your system):
There are 2 choices for the alternative php (providing /usr/bin/php).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/php.default 100 auto mode
1 /usr/bin/php.default 100 manual mode
2 /usr/bin/php7.4 74 manual mode
Press <enter> to keep the current choice[*], or type selection number: 2
update-alternatives: using /usr/bin/php7.4 to provide /usr/bin/php (php) in manual mode
Thank You soo much sir my issue is solved Thanks alot again sir.
Cool, it solved your email problem ?