مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2025-12-01 05:43:04 +00:00
feat: remove strip_received_headers config option
This previously removed all Received headers which were sent to the smtp server when enabled. This is not something that should be happening.
هذا الالتزام موجود في:
@@ -72,7 +72,6 @@ smtp_server:
|
|||||||
ssl_version: <%= ENV.fetch('SMTP_SERVER_SSL_VERSION', 'SSLv23') %>
|
ssl_version: <%= ENV.fetch('SMTP_SERVER_SSL_VERSION', 'SSLv23') %>
|
||||||
proxy_protocol: <%= ENV.fetch('SMTP_SERVER_PROXY_PROTOCOL', 'false') %>
|
proxy_protocol: <%= ENV.fetch('SMTP_SERVER_PROXY_PROTOCOL', 'false') %>
|
||||||
log_connect: <%= ENV.fetch('SMTP_SERVER_LOG_CONNECT', 'false') %>
|
log_connect: <%= ENV.fetch('SMTP_SERVER_LOG_CONNECT', 'false') %>
|
||||||
strip_received_headers: <%= ENV.fetch('SMTP_SERVER_STRIP_RECEIVED_HEADERS', 'false') %>
|
|
||||||
max_message_size: <%= ENV.fetch('SMTP_SERVER_MAX_MESSAGE_SIZE', '14') %> # size in Megabytes
|
max_message_size: <%= ENV.fetch('SMTP_SERVER_MAX_MESSAGE_SIZE', '14') %> # size in Megabytes
|
||||||
|
|
||||||
smtp_relays:
|
smtp_relays:
|
||||||
|
|||||||
@@ -393,15 +393,10 @@ module Postal
|
|||||||
if @header_key && @headers[@header_key.downcase] && @headers[@header_key.downcase].last
|
if @header_key && @headers[@header_key.downcase] && @headers[@header_key.downcase].last
|
||||||
@headers[@header_key.downcase].last << data.to_s
|
@headers[@header_key.downcase].last << data.to_s
|
||||||
end
|
end
|
||||||
# If received headers are configured to be stripped and we're currently receiving one
|
|
||||||
# skip the append methods at the bottom of this loop.
|
|
||||||
next if Postal.config.smtp_server.strip_received_headers? && @header_key && @header_key.downcase == "received"
|
|
||||||
else
|
else
|
||||||
@header_key, value = data.split(/:\s*/, 2)
|
@header_key, value = data.split(/:\s*/, 2)
|
||||||
@headers[@header_key.downcase] ||= []
|
@headers[@header_key.downcase] ||= []
|
||||||
@headers[@header_key.downcase] << value
|
@headers[@header_key.downcase] << value
|
||||||
# As above
|
|
||||||
next if Postal.config.smtp_server.strip_received_headers? && @header_key && @header_key.downcase == "received"
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@data << data
|
@data << data
|
||||||
|
|||||||
المرجع في مشكلة جديدة
حظر مستخدم