Setting up SMTP manually

Good morning,

I am currently locked out of my Passbotl account but I have access to the root login of the VPS. Is it possible to configure the SMTP details manually using SSH?


Hello @Daniel1, welcome to our community :wink:

It is possible, but I am highly suggesting to configure SMTP via the UI since it will be stored inside the database, what you could do here is to generate a recover url, prior to log in you’ll have to import your recovery kit and the passphrase associated, then from the administration menu reconfigure the smtp settings.

sudo su -s /bin/bash -c "/usr/share/php/passbolt/bin/cake passbolt recover_user -c -u username@email.domain" www-data

Thank you for your swift reply, altough I sadly lost access to my old laptop due to a software problem. I don’t have access to my recovery key or any past data (Other then the admin username/password).

But when I enter my details on the website it sends me a email but the SMPT server is not setup. Hope this helps :slight_smile:

Hello @Daniel1 and welcome to the forum!
Unfortunately, if you don’t have your recovery kit or private key you will not be able to restore your account.
The email sent is for verification purposes, but you will need instead your recovery kit.
You can create a new administrator account and recover access to your Passbolt instance, but your previous account was lost unless you have configured the account recovery process and you have the organization key

Thanks for providing a clear context!

Regarding the account itself, unfortunately without the recovery kit it won’t be possible to access the account… the passphrase itself won’t be enough even if the smtp settings were correct because the private key is never stored on the server.

It is still possible to retrieve shared passwords from the other individuals or groups but in this particular scenario you’d need to create a new account, at least for the reconfiguration of the smtp settings.

sudo su -s /bin/bash -c "/usr/share/php/passbolt/bin/cake passbolt register_user -i" www-data

Prior to the creation, please don’t forget to use the role admin for this account since we will need to reconfigure the smtp settings through the administration.


Awesome thank you!

I have gained access once again, I have attempted to setup the mail system but it keeps saying could not connect, I used the details on a mail test site and they worked fine?

1 Like

Could you share the output from the logs when you are testing the email authentication?

Also, which email provider are you trying to reach?

Good afternoon, I have access to the passbolt admin account now, when I am trying to setup the mail server I keep getting this error,

Error: stream_socket_client(): Unable to connect to tcp:// (Connection timed out)

Can you share the full output from the logs after trying to send a test email?

Which email provider is it?