مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2026-01-16 21:23:37 +00:00
Connect to SMTP by IP addresses rather than hostname
هذا الالتزام موجود في:
@@ -46,15 +46,15 @@ module Postal
|
|||||||
next
|
next
|
||||||
end
|
end
|
||||||
|
|
||||||
smtp_client = Net::SMTP.new(hostname, port)
|
smtp_client = Net::SMTP.new(@remote_ip, port)
|
||||||
smtp_client.open_timeout = Postal.config.smtp_client.open_timeout
|
smtp_client.open_timeout = Postal.config.smtp_client.open_timeout
|
||||||
smtp_client.read_timeout = Postal.config.smtp_client.read_timeout
|
smtp_client.read_timeout = Postal.config.smtp_client.read_timeout
|
||||||
|
smtp_client.tls_hostname = hostname
|
||||||
|
|
||||||
if @source_ip_address
|
if @source_ip_address
|
||||||
# Set the source IP as appropriate
|
# Set the source IP as appropriate
|
||||||
smtp_client.source_address = ip_type == :aaaa ? @source_ip_address.ipv6 : @source_ip_address.ipv4
|
smtp_client.source_address = ip_type == :aaaa ? @source_ip_address.ipv6 : @source_ip_address.ipv4
|
||||||
end
|
end
|
||||||
|
|
||||||
case ssl_mode
|
case ssl_mode
|
||||||
when "Auto"
|
when "Auto"
|
||||||
smtp_client.enable_starttls_auto(self.class.ssl_context_without_verify)
|
smtp_client.enable_starttls_auto(self.class.ssl_context_without_verify)
|
||||||
|
|||||||
المرجع في مشكلة جديدة
حظر مستخدم