Change e-mail domain blocks to block IPs dynamically (#17635)
* Change e-mail domain blocks to block IPs dynamically * Update app/workers/scheduler/email_domain_block_refresh_scheduler.rb Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh> * Update app/workers/scheduler/email_domain_block_refresh_scheduler.rb Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh> Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>
This commit is contained in:
parent
91cc8d1e63
commit
a29a982eaa
20 changed files with 322 additions and 157 deletions
|
@ -467,15 +467,22 @@ en:
|
|||
view: View domain block
|
||||
email_domain_blocks:
|
||||
add_new: Add new
|
||||
attempts_over_week:
|
||||
one: "%{count} attempt over the last week"
|
||||
other: "%{count} sign-up attempts over the last week"
|
||||
created_msg: Successfully blocked e-mail domain
|
||||
delete: Delete
|
||||
destroyed_msg: Successfully unblocked e-mail domain
|
||||
dns:
|
||||
types:
|
||||
mx: MX record
|
||||
domain: Domain
|
||||
empty: No e-mail domains currently blocked.
|
||||
from_html: from %{domain}
|
||||
new:
|
||||
create: Add domain
|
||||
resolve: Resolve domain
|
||||
title: Block new e-mail domain
|
||||
no_email_domain_block_selected: No e-mail domain blocks were changed as none were selected
|
||||
resolved_dns_records_hint_html: The domain name resolves to the following MX domains, which are ultimately responsible for accepting e-mail. Blocking an MX domain will block sign-ups from any e-mail address which uses the same MX domain, even if the visible domain name is different. <strong>Be careful not to block major e-mail providers.</strong>
|
||||
resolved_through_html: Resolved through %{domain}
|
||||
title: Blocked e-mail domains
|
||||
follow_recommendations:
|
||||
description_html: "<strong>Follow recommendations help new users quickly find interesting content</strong>. When a user has not interacted with others enough to form personalized follow recommendations, these accounts are recommended instead. They are re-calculated on a daily basis from a mix of accounts with the highest recent engagements and highest local follower counts for a given language."
|
||||
|
|
|
@ -64,7 +64,7 @@ en:
|
|||
domain_allow:
|
||||
domain: This domain will be able to fetch data from this server and incoming data from it will be processed and stored
|
||||
email_domain_block:
|
||||
domain: This can be the domain name that shows up in the e-mail address, the MX record that domain resolves to, or IP of the server that MX record resolves to. Those will be checked upon user sign-up and the sign-up will be rejected.
|
||||
domain: This can be the domain name that shows up in the e-mail address or the MX record it uses. They will be checked upon sign-up.
|
||||
with_dns_records: An attempt to resolve the given domain's DNS records will be made and the results will also be blocked
|
||||
featured_tag:
|
||||
name: 'You might want to use one of these:'
|
||||
|
|
|
@ -193,7 +193,12 @@ Rails.application.routes.draw do
|
|||
resources :domain_allows, only: [:new, :create, :show, :destroy]
|
||||
resources :domain_blocks, only: [:new, :create, :show, :destroy, :update, :edit]
|
||||
|
||||
resources :email_domain_blocks, only: [:index, :new, :create, :destroy]
|
||||
resources :email_domain_blocks, only: [:index, :new, :create] do
|
||||
collection do
|
||||
post :batch
|
||||
end
|
||||
end
|
||||
|
||||
resources :action_logs, only: [:index]
|
||||
resources :warning_presets, except: [:new]
|
||||
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
every: '5m'
|
||||
class: Scheduler::Trends::RefreshScheduler
|
||||
queue: scheduler
|
||||
email_domain_block_refresh_scheduler:
|
||||
every: '1h'
|
||||
class: Scheduler::EmailDomainBlockRefreshScheduler
|
||||
queue: scheduler
|
||||
trends_review_notifications_scheduler:
|
||||
every: '2h'
|
||||
class: Scheduler::Trends::ReviewNotificationsScheduler
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue