passbolt / passbolt_api

Passbolt Community Edition (CE) API. The JSON API for the open source password manager for teams!
https://passbolt.com
GNU Affero General Public License v3.0
4.63k stars 306 forks source link

Enable passbolt.email.validate.mx in the passbolt.php file #472

Closed yderi closed 1 year ago

yderi commented 1 year ago

Hello

Cannot properly set the "passbolt.email.validate.mx" feature in "/var/www/passbolt/config/passbolt.php" Here is the code I've added

    'Email' => [
        'default' => [
            // Defines the default name and email of the sender of the emails.
            'from' => ['devops@email.com' => email passbolt'],
            //'charset' => 'utf-8',
            //'headerCharset' => 'utf-8',
        ],
        'validate' => [
                  'mx' => true,
              ],
    ],

and here is the result of healthcheck command sudo -H -u www-data bash -c "/var/www/passbolt/bin/cake passbolt healthcheck"

Application configuration

 [FAIL] This installation is not up to date. Currently using 3.11.0 and it should be v3.11.1.
 [HELP] See. https://www.passbolt.com/help/tech/update
 [PASS] Passbolt is configured to force SSL use.
 [PASS] App.fullBaseUrl is set to HTTPS.
 [PASS] Selenium API endpoints are disabled.
 [PASS] Search engine robots are told not to index content.
 [PASS] The Self Registration plugin is enabled.
 [PASS] Registration is closed, only administrators can add users.
 [PASS] The deprecated self registration public setting was not found in /var/www/passbolt/config/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 /var/www/passbolt/config/passbolt.php.
 [PASS] Serving the compiled version of the javascript app.
 [WARN] Some email notifications are disabled by the administrator.

Enable passbolt.email.validate.mx in the passbolt.php file

So what I'm doing wrong? Can anyone explain how to set this option to true?

stripthis commented 1 year ago

Hello,

it should be under the passbolt and email keys and not Email, e.g:

return [
    'App' => [
        // etc.
    ],

    // Database configuration.
    'Datasources' => [
      // etc.
    ],

    // Email configuration.
    'EmailTransport' => [
        //etc.
    ],
    'Email' => [
        //etc.
    ],

    'passbolt' => [
        'email' => [
              // Additional email validation settings
              'validate' => [
                    'mx' => filter_var(env('PASSBOLT_EMAIL_VALIDATE_MX', false), FILTER_VALIDATE_BOOLEAN),
              ]
         ]
    ]
];

Please use the community forum in the future for installation and configuration issues: https://community.passbolt.com Cheers,

yderi commented 1 year ago

Thank you, it works.