I spent an entire day working to uncover solutions for this issue. Hopefully, you can appreciate the effort with a comment ๐
There are two paths to consider. It's important to note that all steps were taken on a CentOS 7 server with a PRO installation (which allows updating from the Passbolt master branch).
Firstly, check if the Postfix mail server is queuing the emails. This can be done by tailing the mail log file:
tail -f /var/log/maillog
If you find a message like "status=bounced (cannot update mailbox /var/mail/nginx for user nginx. error writing message: File too large)", it's likely that emails are being bounced due to a size limit on the nginx mail file.
To fix this, run the following commands in your server's terminal:
postconf -e 'mailbox_size_limit=0'
postconf -e 'message_size_limit=0'
This will remove the limits and should solve the problem. You can verify the new size configuration with the commands:
postconf message_size_limit
postconf mailbox_size_limit
If all goes well, repeat the test and check if the emails are now arriving correctly. This solution usually works in most cases.
If the first solution doesn't fix the problem, additional actions may be necessary to resolve it. This could indicate that your Passbolt installation is outdated or damaged, even if everything appears to be functioning correctly.
You can start by running the following command to check for PHP errors:
sudo su -s /bin/bash -c "/var/www/passbolt/bin/update" nginx
If you encounter PHP errors when running this command, you may need to update Composer and Passbolt scripts. You can follow the official guide Passbolt Install Scripts Guide to do this, or simply execute the following commands:
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === 'edb40769019ccf227279e3bdd1f5b2e9950eb000c3233ee85148944e555d97be3ea4f40c3c2fe73b22f875385f6a5155') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
cp composer.phar /usr/local/bin/composer
Then, run:
su -s /bin/bash -c "php composer.phar install" nginx
If this completes successfully, try again to run the update command:
sudo su -s /bin/bash -c "/var/www/passbolt/bin/update" nginx
If there are no errors and the update completes smoothly, try the email recovery process again. If problems persist, you may need to review and fix file permissions and resolve version conflicts. Here are some useful commands:
chmod -R ug+w /var/www/passbolt
git add bin/status-report
git commit -m "Resolve merge conflict in bin/status-report"
git add .
git commit -m "Update"
git reset --hard HEAD
I hope these solutions help you resolve the Passbolt recovery email issue. If you have any questions, feel free to ask! ๐
Best regards!