مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2025-12-01 05:43:04 +00:00
Configurable SMTP client timeouts (#456)
* fix #295 by adding configurable timeouts
هذا الالتزام موجود في:
@@ -120,3 +120,7 @@ clamav:
|
|||||||
enabled: false
|
enabled: false
|
||||||
host: 127.0.0.1
|
host: 127.0.0.1
|
||||||
port: 2000
|
port: 2000
|
||||||
|
|
||||||
|
smtp_client:
|
||||||
|
open_timeout: 30
|
||||||
|
read_timeout: 60
|
||||||
|
|||||||
@@ -47,6 +47,8 @@ module Postal
|
|||||||
next
|
next
|
||||||
end
|
end
|
||||||
smtp_client = Net::SMTP.new(hostname, port)
|
smtp_client = Net::SMTP.new(hostname, port)
|
||||||
|
smtp_client.open_timeout = Postal.config.smtp_client.open_timeout
|
||||||
|
smtp_client.read_timeout = Postal.config.smtp_client.read_timeout
|
||||||
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
|
||||||
|
|||||||
المرجع في مشكلة جديدة
حظر مستخدم