مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2026-01-17 21:39:47 +00:00
feat: privacy mode
Adds support for hiding IP addresses & hostnames associated with clients sending authenticated mail in to Postal over SMTP and HTTP
هذا الالتزام موجود في:
@@ -91,7 +91,7 @@ class IncomingMessagePrototype
|
||||
content: attachment[:data]
|
||||
}
|
||||
end
|
||||
mail.header["Received"] = "from #{@source_type} (#{@ip} [#{@ip}]) by Postal with HTTP; #{Time.now.utc.rfc2822}"
|
||||
mail.header["Received"] = Postal::ReceivedHeader.generate(@server, @source_type, @ip, :http)
|
||||
mail.to_s
|
||||
end
|
||||
end
|
||||
|
||||
@@ -175,7 +175,7 @@ class OutgoingMessagePrototype
|
||||
content: attachment[:data]
|
||||
}
|
||||
end
|
||||
mail.header["Received"] = "from #{@source_type} (#{resolved_hostname} [#{@ip}]) by Postal with HTTP; #{Time.now.utc.rfc2822}"
|
||||
mail.header["Received"] = Postal::ReceivedHeader.generate(@server, @source_type, @ip, :http)
|
||||
mail.message_id = "<#{@message_id}>"
|
||||
mail.to_s
|
||||
end
|
||||
@@ -196,12 +196,4 @@ class OutgoingMessagePrototype
|
||||
{ id: message.id, token: message.token }
|
||||
end
|
||||
|
||||
def resolved_hostname
|
||||
@resolved_hostname ||= begin
|
||||
Resolv.new.getname(@ip)
|
||||
rescue StandardError
|
||||
@ip
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم