# I tried to restore the Passbolt server to the Ubuntu server and get error in smtp

**URL:** <https://community.passbolt.com/t/i-tried-to-restore-the-passbolt-server-to-the-ubuntu-server-and-get-error-in-smtp/9251>\
**Category:** Installation Issues\
**Created:** [January 17, 2024, 6:25am UTC](https://community.passbolt.com/t/i-tried-to-restore-the-passbolt-server-to-the-ubuntu-server-and-get-error-in-smtp/9251 "2024-01-17T06:25:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fsulthan14](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/fsulthan14/32/3556_2.png) [@fsulthan14](https://community.passbolt.com/u/fsulthan14)\
**Post date:** [January 17, 2024, 6:25am UTC](https://community.passbolt.com/t/i-tried-to-restore-the-passbolt-server-to-the-ubuntu-server-and-get-error-in-smtp/9251/1 "2024-01-17T06:25:36Z")

</div>

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

Hello,  
**I tried to restore the Passbolt server to the Ubuntu server**.  
can anyone help me? because I’m really frustrated and stuck

I followed the steps in the link:

> **[Migrate an existing Passbolt CE to a new Ubuntu server](https://help.passbolt.com/hosting/upgrade/ce/migrate-existing-ce-to-ubuntu-server)**

I have also carried out the backup process according to the official Passbolt documentation.

Then, there are some slight differences in the SMTP configuration.

Say, the old Passbolt has a different SMTP server on the SMTP than the new Passbolt SMTP (the restored Passbolt).

```auto
 Healthcheck shell
-------------------------------------------------------------------------------

 Environment

 [PASS] PHP version 8.1.2-1ubuntu2.14.
 [PASS] PHP version is 8.1 or above.
 [PASS] PCRE compiled with unicode support.
 [PASS] The temporary directory and its content are writable and not executable.
 [PASS] The logs directory and its content are writable.
 [PASS] GD or Imagick extension is installed.
 [PASS] Intl extension is installed.
 [PASS] Mbstring extension is installed.

 Config files

 [PASS] The application config file is present
 [PASS] The passbolt config file is present

 Core config

 [PASS] Debug mode is off.
 [PASS] Cache is working.
 [PASS] Unique value set for security.salt
 [PASS] Full base url is set to http://10.11.5.123
 [PASS] App.fullBaseUrl validation OK.
 [PASS] /healthcheck/status is reachable.

 SSL Certificate

 [PASS] SSL peer certificate validates
 [PASS] Hostname is matching in SSL certificate.
 [PASS] Not using a self-signed certificate

 Database

 [PASS] The application is able to connect to the database
 [PASS] 31 tables found
 [PASS] Some default content is present
 [PASS] The database schema up to date.

 GPG Configuration

 [PASS] PHP GPG Module is installed and loaded.
 [PASS] The environment variable GNUPGHOME is set to /var/lib/passbolt/.gnupg.
 [PASS] The directory /var/lib/passbolt/.gnupg containing the keyring is writable by the webserver user.
 [PASS] The server OpenPGP key is not the default one
 [PASS] The public key file is defined in /etc/passbolt/passbolt.php and readable.
 [PASS] The private key file is defined in /etc/passbolt/passbolt.php and readable.
 [PASS] The server key fingerprint matches the one defined in /etc/passbolt/passbolt.php.
 [PASS] The server public key defined in the /etc/passbolt/passbolt.php (or environment variables) is in the keyring.
 [PASS] There is a valid email id defined for the server key.
 [PASS] The public key can be used to encrypt a message.
 [PASS] The private key can be used to sign a message.
 [PASS] The public and private keys can be used to encrypt and sign a message.
 [PASS] The private key can be used to decrypt a message.
 [PASS] The private key can be used to decrypt and verify a message.
 [PASS] The public key can be used to verify a signature.
 [PASS] The server public key format is Gopengpg compatible.
 [PASS] The server private key format is Gopengpg compatible.

 Application configuration

 [PASS] Using latest passbolt version (4.4.2).
 [FAIL] Passbolt is not configured to force SSL use.
 [HELP] Set passbolt.ssl.force to true in /etc/passbolt/passbolt.php.
 [FAIL] App.fullBaseUrl is not set to HTTPS.
 [HELP] Check App.fullBaseUrl url scheme in /etc/passbolt/passbolt.php.
 [PASS] Selenium API endpoints are disabled.
 [PASS] Search engine robots are told not to index content.
 [INFO] The Self Registration plugin is enabled.
 [INFO] Registration is closed, only administrators can add users.
 [PASS] The deprecated self registration public setting was not found in /etc/passbolt/passbolt.php.
 [WARN] Host availability checking is disabled.
 [HELP] Make sure this instance is not publicly available on the internet.
 [HELP] Or set the PASSBOLT_EMAIL_VALIDATE_MX environment variable to true.
 [HELP] Or set passbolt.email.validate.mx to true in /etc/passbolt/passbolt.php.
 [PASS] Serving the compiled version of the javascript app.
 [WARN] Some email notifications are disabled by the administrator.

 JWT Authentication

 [PASS] The JWT Authentication plugin is enabled
 [PASS] The /etc/passbolt/jwt/ directory is not writable.
 [PASS] A valid JWT key pair was found

 SMTP Settings

 [PASS] The SMTP Settings plugin is enabled.
 [PASS] SMTP Settings coherent. You may send a test email to validate them.
 [PASS] The SMTP Settings source is: database.
 [WARN] The SMTP Settings plugin endpoints are enabled.
 [HELP] It is recommended to disable the plugin endpoints.
 [HELP] Set the PASSBOLT_SECURITY_SMTP_SETTINGS_ENDPOINTS_DISABLED environment variable to true.
 [HELP] Or set passbolt.security.smtpSettings.endpointsDisabled to true in /etc/passbolt/passbolt.php.

 [FAIL] 2 error(s) found. Hang in there!

```

In the test results above there are https error results, this was on purpose because I didn’t configure Nginx.

Based on the results of the health examination above, it looks normal. Then I tried testing the new Passbolt access via browser.

 ![gambar](https://canada1.discourse-cdn.com/flex031/uploads/passbolt/original/2X/7/7d4930a05eba2bb84285924c0a476cb24240b8fd.png)

You can see that Passbolt is sending a verification email to the recovery email. However, after I checked the verification email, no email was sent.

After that I tried to do SMTP testing after restore. by doing the following command:

```auto
sudo -H -u www-data /bin/bash -c "/usr/share/php/passbolt/bin/cake passbolt send_test_email --recipient=sulthan@ptgusa.com"

```

the result is :

```auto
Debug email shell
-------------------------------------------------------------------------------
Email configuration
-------------------------------------------------------------------------------
Host: smtp.gmail.com
Port: 465
Username: wadaw@gmail.com
Password: *********
TLS: true
Sending email from: wadaw@gmail.com <wadaw@gmail.com>
Sending email to: sulthan@ptgusa.com
-------------------------------------------------------------------------------
Trace
Could not send the test email.
Error: SMTP timeout.

```

I checked the configuration file in passbolt.php and there was nothing strange and it matched the settings in the official documentation. Is there someone who can help me?  
I really really need your help.  
Thanks for the attention!

---

<div class="post-metadata">

**Author:** ![clayton](https://avatars.discourse-cdn.com/v4/letter/c/f9ae1b/32.png) [@clayton](https://community.passbolt.com/u/clayton)\
**Post date:** [January 17, 2024, 11:55am UTC](https://community.passbolt.com/t/i-tried-to-restore-the-passbolt-server-to-the-ubuntu-server-and-get-error-in-smtp/9251/2 "2024-01-17T11:55:11Z")

</div>

> [@fsulthan14](#):
>
> `Port: 465`

I believe you might want to try 587 for the port since you have TLS set to true. Could you try that and let me know if it changes anything?

---

<div class="post-metadata">

**Author:** ![fsulthan14](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/fsulthan14/32/3556_2.png) [@fsulthan14](https://community.passbolt.com/u/fsulthan14)\
**Post date:** [January 18, 2024, 1:50am UTC](https://community.passbolt.com/t/i-tried-to-restore-the-passbolt-server-to-the-ubuntu-server-and-get-error-in-smtp/9251/3 "2024-01-18T01:50:46Z")

</div>

Hi Clayton,  
Thank you for the help. The problem has been solved and I am very happy, thank you.
