Skip to content

Commit

Permalink
feat: support for configuring the default spam threshold values for n…
Browse files Browse the repository at this point in the history
…ew servers
  • Loading branch information
adamcooke committed Aug 2, 2021
1 parent dfe1970 commit 724325a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ class Server < ApplicationRecord
default_value :raw_message_retention_days, -> { 30 }
default_value :raw_message_retention_size, -> { 2048 }
default_value :message_retention_days, -> { 60 }
default_value :spam_threshold, -> { 5.0 }
default_value :spam_failure_threshold, -> { 20.0 }
default_value :spam_threshold, -> { Postal.config.general.default_spam_threshold }
default_value :spam_failure_threshold, -> { Postal.config.general.default_spam_failure_threshold }

validates :name, :presence => true, :uniqueness => {:scope => :organization_id}
validates :mode, :inclusion => {:in => MODES}
Expand Down
2 changes: 2 additions & 0 deletions config/postal.defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ general:
maximum_hold_expiry_days: 7
suppression_list_removal_delay: 30
use_local_ns_for_domains: false
default_spam_threshold: 5.0
default_spam_failure_threshold: 20.0

web_server:
bind_address: 127.0.0.1
Expand Down

0 comments on commit 724325a

Please sign in to comment.