I have updates from 5.4 to 5.11 in docker I can't save SMTP changes

Checklist
I have read intro post: https://community.passbolt.com/t/about-the-installation-issues-category/12
I have read the tutorials, help and searched for similar issues
I provide relevant information about my server (component names and versions, etc.)
I provide a copy of my logs and healthcheck
I describe the steps I have taken to trouble shoot the problem
I describe the steps on how to reproduce the issue’

After updateing fro 5.4 to 5.11 on the docker environmet, I have always been asked to configure the SMTP server. This Time my changes are not saved. I see nothing in the logs how Can I know what is going wrong?

Hello Ahmad,

Thank you for taking the time to document the issue.

Could you please clarify what you mean when you say that it does not save?

Is the “Save” button inactive?

Where do you expect your changes to appear, and where are they currently missing?

Could you also provide the output of the following command, executed from your host machine?

docker compose -f docker-compose-ce.yaml exec passbolt su -s /bin/bash -c "source /etc/environment && ./bin/status-report" www-data

If the output contains any sensitive data, please make sure to redact it before sending the status report.

Best regards,
Sara

I have copied the database to the same application on another server. after restoring the database, I could login to Passbolt. I needed then to configure the Mail server again. I added Google mail server (username, password, use, default mail) but it didn’t save the info. when I change or refresh the page and go back to mail server I see that it is not saved. see attached

su -s /bin/bash -c "source /etc/environment && ./b
su: user /etc/environment does not exist or the user entry does not contain all the required fields

Hello Ahmad,

Thank you for the additional details. The fact that this happened after restoring the database on another server is an important clue.

Regarding the SMTP issue, this may be related to the server GPG keys. Some sensitive settings stored in the database are encrypted with the Passbolt server GPG key. If the database was restored on a new server without restoring the original server GPG keys, the new server may not be able to decrypt the previously stored SMTP settings.

This could explain why the SMTP settings cannot be saved.

If you no longer have access to the old server and cannot recover the original GPG keys, then the old encrypted SMTP settings cannot be decrypted anymore. In that case, a possible solution would be to remove the encrypted SMTP related entries from the organization_settings table, then log into Passbolt again, accept the new server key, and reconfigure the SMTP from the UI.

IMPORTANT : Before doing anything in the database please make a full database backup :

Replace /path/to/backup.sql by the path and name of your choice

docker compose -f docker-compose-ce.yaml exec db bash -c \
'mariadb-dump -u${MYSQL_USER} -p${MYSQL_PASSWORD} ${MYSQL_DATABASE}' \
> /path/to/backup.sql

To proceed with this solution you will need to make sure that the SMTP configuration entry is not empty, to do so, you can type the following command line :

docker compose -f docker-compose-ce.yaml exec db bash -c 'mysql -u${MYSQL_USER} -p${MYSQL_PASSWORD} ${MYSQL_DATABASE} -e "SELECT * from organization_settings where property = '\''smtp'\''\G"'

The output will be your encrypted SMTP configuration that your server cannot decrypt.

We need to delete the encrypted SMTP settings for you to be able to fill the new ones in the Passbolt configuration menu.

Here is the command line to delete the encrypted configuration :

docker compose -f docker-compose-ce.yaml exec db bash -c 'mysql -u${MYSQL_USER} -p${MYSQL_PASSWORD} ${MYSQL_DATABASE} -e "DELETE from organization_settings where property = '\''smtp'\'';"' 

Check again with the ‘SELECT’ command shown before to make sure the ‘DELETE’ command properly removed the old entry.

If successfully removed, you will be able to go back to the Passbolt UI settings and add new SMTP settings. These new settings will be encrypted with the new GPG server key and saved in the database.
To avoid any future similar issues please make sure to backup your database regularly and your server GPG keys.

Extra documentation that can be helpful in the future :
https://www.passbolt.com/docs/hosting/backup/from-docker/
https://www.passbolt.com/docs/hosting/migrate/server/ce/docker/

I hope this clarifies the situation and helps you resolve the issue. Please don’t hesitate to ask if you have any questions about my message.

Best regards,
Sara

Great. it resolved the problem