2015-10-13 11:07:59 +00:00
|
|
|
:mailboxes:
|
2016-05-30 21:13:42 +00:00
|
|
|
<%
|
2017-02-20 16:37:50 +00:00
|
|
|
require_relative "../lib/gitlab/mail_room" unless defined?(Gitlab::MailRoom)
|
2022-03-01 09:12:47 +00:00
|
|
|
Gitlab::MailRoom.enabled_configs.each do |key, config|
|
2016-05-30 21:13:42 +00:00
|
|
|
%>
|
2016-02-27 02:48:13 +00:00
|
|
|
-
|
2016-05-30 21:13:42 +00:00
|
|
|
:host: <%= config[:host].to_json %>
|
|
|
|
:port: <%= config[:port].to_json %>
|
|
|
|
:ssl: <%= config[:ssl].to_json %>
|
|
|
|
:start_tls: <%= config[:start_tls].to_json %>
|
|
|
|
:email: <%= config[:user].to_json %>
|
|
|
|
:password: <%= config[:password].to_json %>
|
2016-11-11 14:40:19 +00:00
|
|
|
:idle_timeout: <%= config[:idle_timeout].to_json %>
|
2019-12-16 12:07:43 +00:00
|
|
|
:logger:
|
|
|
|
:log_path: <%= config[:log_path].to_json %>
|
2016-02-27 02:48:13 +00:00
|
|
|
|
2016-05-30 21:13:42 +00:00
|
|
|
:name: <%= config[:mailbox].to_json %>
|
2016-02-27 02:48:13 +00:00
|
|
|
|
|
|
|
:delete_after_delivery: true
|
2020-05-13 00:07:50 +00:00
|
|
|
:expunge_deleted: <%= config[:expunge_deleted].to_json %>
|
2016-02-27 02:48:13 +00:00
|
|
|
|
2021-04-07 21:09:01 +00:00
|
|
|
<% if config[:inbox_method] %>
|
|
|
|
:inbox_method: <%= config[:inbox_method] %>
|
|
|
|
<% end %>
|
|
|
|
<% if config[:inbox_options].is_a?(Hash) %>
|
|
|
|
<%= config.slice(:inbox_options).to_yaml(indentation: 8).gsub(/^---\n/, '') %>
|
|
|
|
<% end %>
|
|
|
|
|
2022-03-01 09:12:47 +00:00
|
|
|
<% if config[:delivery_method] == Gitlab::MailRoom::DELIVERY_METHOD_SIDEKIQ %>
|
2016-02-27 02:48:13 +00:00
|
|
|
:delivery_method: sidekiq
|
|
|
|
:delivery_options:
|
2016-05-30 21:13:42 +00:00
|
|
|
:redis_url: <%= config[:redis_url].to_json %>
|
2021-10-08 18:13:02 +00:00
|
|
|
:redis_db: <%= config[:redis_db] %>
|
2017-07-11 03:35:47 +00:00
|
|
|
:namespace: <%= Gitlab::Redis::Queues::SIDEKIQ_NAMESPACE %>
|
2020-01-31 21:08:52 +00:00
|
|
|
:queue: <%= config[:queue] %>
|
|
|
|
:worker: <%= config[:worker] %>
|
2016-10-25 13:50:41 +00:00
|
|
|
<% if config[:sentinels] %>
|
|
|
|
:sentinels:
|
|
|
|
<% config[:sentinels].each do |sentinel| %>
|
|
|
|
-
|
|
|
|
:host: <%= sentinel[:host] %>
|
|
|
|
:port: <%= sentinel[:port] %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
2022-03-01 09:12:47 +00:00
|
|
|
<% elsif config[:delivery_method] == Gitlab::MailRoom::DELIVERY_METHOD_WEBHOOK %>
|
|
|
|
:delivery_method: postback
|
|
|
|
:delivery_options:
|
|
|
|
:delivery_url: <%= config[:gitlab_url] %>/api/v4/internal/mail_room/<%= key %>
|
2022-05-24 18:09:18 +00:00
|
|
|
:content_type: text/plain
|
2022-03-01 09:12:47 +00:00
|
|
|
:jwt_auth_header: <%= Gitlab::MailRoom::INTERNAL_API_REQUEST_HEADER %>
|
|
|
|
:jwt_issuer: <%= Gitlab::MailRoom::INTERNAL_API_REQUEST_JWT_ISSUER %>
|
|
|
|
:jwt_algorithm: "HS256"
|
|
|
|
:jwt_secret_path: <%= config[:secret_file] %>
|
|
|
|
<% end %>
|
2016-02-27 02:48:13 +00:00
|
|
|
|
|
|
|
:arbitration_method: redis
|
|
|
|
:arbitration_options:
|
2016-05-30 21:13:42 +00:00
|
|
|
:redis_url: <%= config[:redis_url].to_json %>
|
2017-07-11 03:35:47 +00:00
|
|
|
:namespace: <%= Gitlab::Redis::Queues::MAILROOM_NAMESPACE %>
|
2016-10-25 13:50:41 +00:00
|
|
|
<% if config[:sentinels] %>
|
|
|
|
:sentinels:
|
|
|
|
<% config[:sentinels].each do |sentinel| %>
|
|
|
|
-
|
|
|
|
:host: <%= sentinel[:host] %>
|
|
|
|
:port: <%= sentinel[:port] %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
2016-02-27 02:48:13 +00:00
|
|
|
<% end %>
|