style(rubocop): Style/SelectByRegexp

This commit is contained in:
Adam Cooke
2024-02-12 09:55:18 +00:00
parent 157d11457c
commit 9ce28a427f
3 changed files with 6 additions and 14 deletions
+1 -1
View File
@@ -418,7 +418,7 @@ module Postal
return "552 Message too large (maximum size %dMB)" % Postal.config.smtp_server.max_message_size
end
if @headers["received"].select { |r| r =~ /by #{Postal.config.dns.smtp_server_hostname}/ }.count > 4
if @headers["received"].grep(/by #{Postal.config.dns.smtp_server_hostname}/).count > 4
transaction_reset
@state = :welcomed
return "550 Loop detected"