مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2026-01-16 21:23:37 +00:00
improve config file generation
هذا الالتزام موجود في:
@@ -1,77 +0,0 @@
|
|||||||
web:
|
|
||||||
host: localhost:5000
|
|
||||||
protocol: http
|
|
||||||
fast_server_host: localhost:5010
|
|
||||||
fast_server_protocol: http
|
|
||||||
|
|
||||||
web_server:
|
|
||||||
bind_address: 0.0.0.0
|
|
||||||
port: 5000
|
|
||||||
max_threads: 5
|
|
||||||
|
|
||||||
fast_server:
|
|
||||||
bind_address: 0.0.0.0
|
|
||||||
port: 5010
|
|
||||||
ssl_port: 5011
|
|
||||||
proxy_protocol: false
|
|
||||||
|
|
||||||
general:
|
|
||||||
use_ip_pools: false
|
|
||||||
exception_url: xxx
|
|
||||||
|
|
||||||
logging:
|
|
||||||
stdout: false
|
|
||||||
max_log_file_size: 20
|
|
||||||
max_log_files: 10
|
|
||||||
|
|
||||||
main_db:
|
|
||||||
host: localhost
|
|
||||||
port: 3306
|
|
||||||
username: root
|
|
||||||
password:
|
|
||||||
database: postal
|
|
||||||
|
|
||||||
message_db:
|
|
||||||
host: localhost
|
|
||||||
port: 3306
|
|
||||||
username: root
|
|
||||||
password:
|
|
||||||
prefix: postal
|
|
||||||
|
|
||||||
rabbitmq:
|
|
||||||
host: localhost
|
|
||||||
port: 5672
|
|
||||||
username: guest
|
|
||||||
password: guest
|
|
||||||
vhost: null
|
|
||||||
|
|
||||||
smtp_server:
|
|
||||||
proxy_protocol: false
|
|
||||||
log_connect: true
|
|
||||||
evented: false
|
|
||||||
ports:
|
|
||||||
- 2525
|
|
||||||
|
|
||||||
dns:
|
|
||||||
spf_include: spf.example.com
|
|
||||||
dkim_identifier: postal
|
|
||||||
domain_verify_prefix: postal-verification
|
|
||||||
custom_return_path_prefix: psrp
|
|
||||||
return_path: amrp.example.com
|
|
||||||
smtp_server_hostname: smtp.example.com
|
|
||||||
route_domain: routes.example.com
|
|
||||||
track_domain: track.example.com
|
|
||||||
mx_records:
|
|
||||||
- mx1.example.com
|
|
||||||
- mx2.example.com
|
|
||||||
|
|
||||||
smtp:
|
|
||||||
host: smtp.atech.io
|
|
||||||
|
|
||||||
espect:
|
|
||||||
hosts:
|
|
||||||
- http://espect01.infra.atech.io
|
|
||||||
|
|
||||||
rails:
|
|
||||||
environment: development
|
|
||||||
secret_key: 1bd1a4fe0cb3fb166be9b0e388beb36557b49ae5bed97ab3e300353de06d1fe55522b21596db8ed5d83c031ca58696340fb3d70f59eb0c096bbe4034fc12e4cd
|
|
||||||
@@ -1,8 +1,6 @@
|
|||||||
web:
|
web:
|
||||||
host: postal.example.com
|
host: postal.example.com
|
||||||
protocol: https
|
protocol: https
|
||||||
fast_server_host: postal-click.example.com
|
|
||||||
fast_server_protocol: https
|
|
||||||
|
|
||||||
web_server:
|
web_server:
|
||||||
bind_address: 0.0.0.0
|
bind_address: 0.0.0.0
|
||||||
@@ -13,11 +11,11 @@ fast_server:
|
|||||||
bind_address: 0.0.0.0
|
bind_address: 0.0.0.0
|
||||||
port: 5010
|
port: 5010
|
||||||
ssl_port: 5011
|
ssl_port: 5011
|
||||||
proxy_protocol: true
|
proxy_protocol: false
|
||||||
|
|
||||||
general:
|
general:
|
||||||
use_ip_pools: true
|
use_ip_pools: false
|
||||||
exception_url: xxx
|
exception_url: null
|
||||||
|
|
||||||
logging:
|
logging:
|
||||||
stdout: false
|
stdout: false
|
||||||
@@ -48,23 +46,22 @@ rabbitmq:
|
|||||||
smtp_server:
|
smtp_server:
|
||||||
proxy_protocol: false
|
proxy_protocol: false
|
||||||
log_connect: true
|
log_connect: true
|
||||||
log_exclude_ips: null
|
|
||||||
evented: true
|
evented: true
|
||||||
ports:
|
ports:
|
||||||
- 2525
|
- 2525
|
||||||
|
|
||||||
dns:
|
dns:
|
||||||
spf_include: spf.example.com
|
|
||||||
dkim_identifier: postal
|
|
||||||
domain_verify_prefix: postal-verification
|
|
||||||
custom_return_path_prefix: psrp
|
|
||||||
return_path: amrp.example.com
|
|
||||||
smtp_server_hostname: smtp.example.com
|
|
||||||
route_domain: routes.example.com
|
|
||||||
track_domain: track.example.com
|
|
||||||
mx_records:
|
mx_records:
|
||||||
- mx1.example.com
|
- mx1.example.com
|
||||||
- mx2.example.com
|
- mx2.example.com
|
||||||
|
smtp_server_hostname: smtp.example.com
|
||||||
|
spf_include: spf.example.com
|
||||||
|
return_path: rp.example.com
|
||||||
|
route_domain: routes.example.com
|
||||||
|
track_domain: track.example.com
|
||||||
|
dkim_identifier: postal
|
||||||
|
domain_verify_prefix: postal-verification
|
||||||
|
custom_return_path_prefix: psrp
|
||||||
|
|
||||||
smtp:
|
smtp:
|
||||||
host: smtp.blah
|
host: smtp.blah
|
||||||
@@ -74,6 +71,6 @@ espect:
|
|||||||
- http://espect01.infra.atech.io
|
- http://espect01.infra.atech.io
|
||||||
|
|
||||||
rails:
|
rails:
|
||||||
environment: development
|
environment: production
|
||||||
secret_key: 1bd1a4fe0cb3fb166be9b0e388beb36557b49ae5bed97ab3e300353de06d1fe55522b21596db8ed5d83c031ca58696340fb3d70f59eb0c096bbe4034fc12e4cd
|
secret_key: {{secretkey}}
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
require File.expand_path('../../lib/postal/config', __FILE__)
|
require File.expand_path('../../lib/postal/config', __FILE__)
|
||||||
require 'openssl'
|
require 'openssl'
|
||||||
|
require 'securerandom'
|
||||||
|
|
||||||
unless File.exist?(Postal.config_file_path)
|
unless File.exist?(Postal.config_file_path)
|
||||||
FileUtils.cp(config_root('postal.example.yml'), Postal.config_file_path)
|
content = File.read(Postal.config_root.join('postal.example.yml'))
|
||||||
|
content.gsub!('{{secretkey}}', SecureRandom.hex(128))
|
||||||
|
File.open(Postal.config_file_path, 'w') { |f| f.write(content) }
|
||||||
puts "Created example config file at #{Postal.config_file_path}"
|
puts "Created example config file at #{Postal.config_file_path}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
المرجع في مشكلة جديدة
حظر مستخدم