diff --git a/.fabmanager-version b/.fabmanager-version index 338a5b5d8..e261122d5 100644 --- a/.fabmanager-version +++ b/.fabmanager-version @@ -1 +1 @@ -2.6.6 +2.6.7 diff --git a/CHANGELOG.md b/CHANGELOG.md index eebdf9e82..3b35c0403 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog Fab Manager +## v2.6.7 2018 October 4 + +- Ability to configure SMTP more precisely +- Typo correction in README (#121) +- [TODO DEPLOY] add the following environment variables: `SMTP_AUTHENTICATION, SMTP_ENABLE_STARTTLS_AUTO, SMTP_OPENSSL_VERIFY_MODE` + ## v2.6.6 2018 September 18 - Ability to parametrize machines order on the booking page diff --git a/README.md b/README.md index d6529a2eb..06115a3cc 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,7 @@ This procedure is not easy to follow so if you don't need to write some code for ``` 8. Build the database. You may have to follow the steps described in [the PostgreSQL configuration chapter](#setup-fabmanager-in-postgresql) before, if you don't already had done it. - - **Warning**: **NO NOT** run `rake db:setup` instead of these commands, as this will not run some required raw SQL instructions. + - **Warning**: **DO NOT** run `rake db:setup` instead of these commands, as this will not run some required raw SQL instructions. - **Please note**: Your password length must be between 8 and 128 characters, otherwise db:seed will be rejected. This is configured in [config/initializers/devise.rb](config/initializers/devise.rb) ```bash @@ -220,10 +220,10 @@ When sending notification mails, the platform will use this address to identify Configure the Rails' Action Mailer delivery method. See http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration for more details. - DEFAULT_HOST, DEFAULT_PROTOCOL, SMTP_ADDRESS, SMTP_PORT, SMTP_USER_NAME & SMTP_PASSWORD + DEFAULT_HOST, DEFAULT_PROTOCOL, SMTP_ADDRESS, SMTP_PORT, SMTP_USER_NAME, SMTP_PASSWORD, SMTP_AUTHENTICATION, SMTP_ENABLE_STARTTLS_AUTO & SMTP_OPENSSL_VERIFY_MODE When DELIVERY_METHOD is set to **smtp**, configure the SMTP server parameters. -See http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration for more details. +See https://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration for more details. DEFAULT_HOST is also used to configure Google Analytics. GA_ID diff --git a/config/application.yml.default b/config/application.yml.default index fd3b8e8f4..de0783247 100644 --- a/config/application.yml.default +++ b/config/application.yml.default @@ -24,6 +24,9 @@ SMTP_ADDRESS: SMTP_PORT: '587' SMTP_USER_NAME: SMTP_PASSWORD: +SMTP_AUTHENTICATION: 'plain' +SMTP_ENABLE_STARTTLS_AUTO: 'true' +SMTP_OPENSSL_VERIFY_MODE: '' GA_ID: '' ## diff --git a/config/environments/production.rb b/config/environments/production.rb index 5175c8719..238ebcfd1 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -93,8 +93,9 @@ Rails.application.configure do :port => Rails.application.secrets.smtp_port, :user_name => Rails.application.secrets.smtp_user_name, :password => Rails.application.secrets.smtp_password, - :authentication => 'plain', - :enable_starttls_auto => true + :authentication => Rails.application.secrets.smtp_authentication, + :enable_starttls_auto => Rails.application.secrets.smtp_enable_starttls_auto, + :openssl_verify_mode => Rails.application.secrets.smtp_openssl_verify_mode, } # use :smtp for switch prod diff --git a/config/environments/staging.rb b/config/environments/staging.rb index 067ea2d1d..43961df1a 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -92,8 +92,11 @@ Rails.application.configure do :address => Rails.application.secrets.smtp_address, :port => Rails.application.secrets.smtp_port, :user_name => Rails.application.secrets.smtp_user_name, - :password => Rails.application.secrets.smtp_password - } + :password => Rails.application.secrets.smtp_password, + :authentication => Rails.application.secrets.smtp_authentication, + :enable_starttls_auto => Rails.application.secrets.smtp_enable_starttls_auto, + :openssl_verify_mode => Rails.application.secrets.smtp_openssl_verify_mode, + } # use :smtp for switch prod config.action_mailer.delivery_method = Rails.application.secrets.delivery_method.to_sym diff --git a/config/secrets.yml b/config/secrets.yml index 74a192594..d4f4efb3a 100644 --- a/config/secrets.yml +++ b/config/secrets.yml @@ -91,6 +91,9 @@ staging: smtp_port: <%= ENV["SMTP_PORT"] %> smtp_user_name: <%= ENV["SMTP_USER_NAME"] %> smtp_password: <%= ENV["SMTP_PASSWORD"] %> + smtp_authentication: <%= ENV["SMTP_AUTHENTICATION"] %> + smtp_enable_starttls_auto: <%= ENV["SMTP_ENABLE_STARTTLS_AUTO"] %> + smtp_openssl_verify_mode: <%= ENV["SMTP_OPENSSL_VERIFY_MODE"] %> time_zone: <%= ENV["TIME_ZONE"] %> week_starting_day: <%= ENV["WEEK_STARTING_DAY"] %> d3_date_format: <%= ENV["D3_DATE_FORMAT"].dump %> @@ -132,6 +135,9 @@ production: smtp_user_name: <%= ENV["SMTP_USER_NAME"] %> smtp_password: <%= ENV["SMTP_PASSWORD"] %> time_zone: <%= ENV["TIME_ZONE"] %> + smtp_authentication: <%= ENV["SMTP_AUTHENTICATION"] %> + smtp_enable_starttls_auto: <%= ENV["SMTP_ENABLE_STARTTLS_AUTO"] %> + smtp_openssl_verify_mode: <%= ENV["SMTP_OPENSSL_VERIFY_MODE"] %> week_starting_day: <%= ENV["WEEK_STARTING_DAY"] %> d3_date_format: <%= ENV["D3_DATE_FORMAT"].dump %> uib_date_format: <%= ENV["UIB_DATE_FORMAT"] %> diff --git a/docker/env.example b/docker/env.example index 778f70c11..51ed48325 100644 --- a/docker/env.example +++ b/docker/env.example @@ -21,6 +21,9 @@ SMTP_ADDRESS=smtp.sendgrid.net SMTP_PORT=587 SMTP_USER_NAME= SMTP_PASSWORD= +SMTP_AUTHENTICATION=plain +SMTP_ENABLE_STARTTLS_AUTO=true +SMTP_OPENSSL_VERIFY_MODE= GA_ID=