Email not arrived for users

Checklist
[ x ] I have read intro post: About the Installation Issues category
[ 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

Healthcheck shell

Environment

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

Config files

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

Core config

[PASS] Cache is working.
[FAIL] Debug mode is on.
[HELP] Set debug to false in /etc/passbolt/passbolt.php
[PASS] Unique value set for security.salt
[PASS] Full base url is set to https://vault.quero.com
[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.

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.
[PASS] No custom SSL configuration for SMTP server.

JWT Authentication

[PASS] The JWT Authentication plugin is enabled.
[FAIL] The /etc/passbolt/jwt/ directory should not be writable.
[HELP] You can try:
[HELP] sudo chown -Rf root:www-data /etc/passbolt/jwt/
[HELP] sudo chmod 750 /etc/passbolt/jwt/
[HELP] sudo chmod 640 /etc/passbolt/jwt/jwt.key
[HELP] sudo chmod 640 /etc/passbolt/jwt/jwt.pem
[PASS] A valid JWT key pair was found.

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.9.1).
[FAIL] Passbolt is not configured to force SSL use.
[HELP] Set passbolt.ssl.force to true in /etc/passbolt/passbolt.php.
[PASS] App.fullBaseUrl is set to HTTPS.
[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.
[PASS] Host availability will be checked.
[PASS] Serving the compiled version of the javascript app.
[WARN] Some email notifications are disabled by the administrator.
[PASS] The database schema is up to date.

Database

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

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

When I try loggin in UI Web, return “check your email box”, but the messagem didn’t arrive.

Can you help?

The test using this command, it works!

bin/cake passbolt send_test_email --recipient=youremail@domain.com"

Hey @nicholasrab, can you look at this troubleshooting guide? It lists down common issues for email delivery.

https://www.passbolt.com/docs/hosting/troubleshooting/email/

Hey , @ishan ! Tks for response!

I’m try this steps… In column “sent” is blank.

Yeah so looks like the cron job is not setup. Which linux distribution are you using? Also, which guide/process you followed to install passbolt? Generally if you follow our official installation guide then the cronjob is already configured without you needing do anything.

Exactly! I’m using a base-app (custom chart) for deployment without configmap.
If mount the volumes that are in template and create the cronjobs, does it work?

My pod of cronjob email is up, loggin: “sending emails”

But when runs bin/cron in app container, return blank.

The cron.service until off. How to start this service?

@ishan Can you give me a hint?

I don’t know what to do…

Tks…

Hey @nicholasrab, I don’t have much idea about k8s/helm thing. But did you checked error logs? Is there anything in there?

@ishan log of cron:

2024-11-27 11:52:00 error: [InvalidArgumentException] The “Smtp” transport configuration does not exist in /usr/share/php/passbolt/vendor/cakephp/cakephp/src/Mailer/TransportFactory.php on line 85
Stack Trace:

  • /usr/share/php/passbolt/vendor/cakephp/cakephp/src/Mailer/TransportFactory.php:114
  • /usr/share/php/passbolt/vendor/cakephp/cakephp/src/Mailer/Mailer.php:494
  • /usr/share/php/passbolt/vendor/cakephp/cakephp/src/Mailer/Mailer.php:436
  • /usr/share/php/passbolt/vendor/cakephp/cakephp/src/Mailer/Mailer.php:221
  • /usr/share/php/passbolt/plugins/PassboltCe/EmailDigest/src/Service/SendEmailBatchService.php:74
  • /usr/share/php/passbolt/plugins/PassboltCe/EmailDigest/src/Service/SendEmailBatchService.php:64
  • /usr/share/php/passbolt/plugins/PassboltCe/EmailDigest/src/Command/SenderCommand.php:63
  • /usr/share/php/passbolt/vendor/cakephp/cakephp/src/Console/BaseCommand.php:190
  • /usr/share/php/passbolt/vendor/cakephp/cakephp/src/Console/CommandRunner.php:334
  • /usr/share/php/passbolt/vendor/cakephp/cakephp/src/Console/CommandRunner.php:172
  • /usr/share/php/passbolt/bin/cake.php:13
  • [main]:

www-data@passbolt-prod-5fcd8b9f5d-4bfm5:/usr/share/php/passbolt$ cat /var/log/passbolt/cron.log

Passbolt | Error

An Internal Error Has Occurred

The "Smtp" transport configuration does not exist

Could this be caused by using Auto-Tables?

Some of the Table objects in your application were created by instantiating "Cake\ORM\Table" instead of any other specific subclass.

This could be the cause for this exception. Auto-Tables are created for you under the following circumstances:

  • The class for the specified table does not exist.
  • The Table was created with a typo: $this->getTableLocator()->get('Articles');
  • The class file has a typo in the name or incorrect namespace: class Articles extends Table
  • The file containing the class has a typo or incorrect casing: Articles.php
  • The Table was used using associations but the association has a typo: $this->belongsTo('Articles')
  • The table class resides in a Plugin but no plugin notation was used in the association definition.

Please try correcting the issue for the following table aliases:

  • Actions

Hey @nicholasrab, this is unusual. The “Smtp” transport is already defined in the config/bootstrap.php file (see here), can you check this file and see if it contains this code?

Also, have you set EMAIL_DEFAULT_TRANSPORT env variable? If yes, can you try removing this env var and try without it? It’s used in the config/app.php so you might want to check it as well.

Hey @ishan , tks for response.

The file bootstrap.php contain the code.

I’m using theese env’s:
EMAIL_DEFAULT_TRANSPORT = Smtp
EMAIL_TRANSPORT_DEFAULT_CLASS_NAME = Smtp
EMAIL_TRANSPORT_DEFAULT_TLS = true
EMAIL_TRANSPORT_DEFAULT_HOST = 587
EMAIL_DEFAULT_FROM_NAME = passbolt
EMAIL_TRANSPORT_DEFAULT_TIMEOUT = 30
EMAIL_DEFAULT_FROM= x@domain.com
EMAIL_TRANSPORT_DEFAULT_PASSWORD = x@domain.com
EMAIL_TRANSPORT_DEFAULT_USERNAME = xpto@domain.com

This env(EMAIL_DEFAULT_TRANSPORT) was a key!! After remove, the emails started arrive

1 Like

I’m glad that the issue got resolved. Enjoy passbolt :heart:

1 Like