summaryrefslogtreecommitdiff
path: root/config/mail_room.yml
blob: 88d93d4bc6b09495ca6ea5e353e30c9ab4ff54db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
:mailboxes:
  <%
    require_relative "../lib/gitlab/mail_room" unless defined?(Gitlab::MailRoom)
    config = Gitlab::MailRoom.config

    if Gitlab::MailRoom.enabled?
  %>
    -
      :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 %>
      :idle_timeout: <%= config[:idle_timeout].to_json %>

      :name: <%= config[:mailbox].to_json %>

      :delete_after_delivery: true

      :delivery_method: sidekiq
      :delivery_options:
        :redis_url: <%= config[:redis_url].to_json %>
        :namespace: <%= Gitlab::Redis::SIDEKIQ_NAMESPACE %>
        :queue: email_receiver
        :worker: EmailReceiverWorker
        <% if config[:sentinels] %>
        :sentinels:
          <% config[:sentinels].each do |sentinel| %>
          -
            :host: <%= sentinel[:host] %>
            :port: <%= sentinel[:port] %>
          <% end %>
        <% end %>

      :arbitration_method: redis
      :arbitration_options:
        :redis_url: <%= config[:redis_url].to_json %>
        :namespace: <%= Gitlab::Redis::MAILROOM_NAMESPACE %>
        <% if config[:sentinels] %>
        :sentinels:
          <% config[:sentinels].each do |sentinel| %>
          -
            :host: <%= sentinel[:host] %>
            :port: <%= sentinel[:port] %>
          <% end %>
        <% end %>
  <% end %>