BigW Consortium Gitlab

mail_room.yml 1.49 KB
Newer Older
1
:mailboxes:
2
  <%
3
    require_relative "../lib/gitlab/mail_room" unless defined?(Gitlab::MailRoom)
4
    config = Gitlab::MailRoom.config
5

6
    if Gitlab::MailRoom.enabled?
7
  %>
8
    -
9 10 11 12 13 14
      :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 %>
15
      :idle_timeout: <%= config[:idle_timeout].to_json %>
16

17
      :name: <%= config[:mailbox].to_json %>
18 19 20 21 22

      :delete_after_delivery: true

      :delivery_method: sidekiq
      :delivery_options:
23
        :redis_url: <%= config[:redis_url].to_json %>
24
        :namespace: <%= Gitlab::Redis::Queues::SIDEKIQ_NAMESPACE %>
25
        :queue: email_receiver
26
        :worker: EmailReceiverWorker
27 28 29 30 31 32 33 34
        <% if config[:sentinels] %>
        :sentinels:
          <% config[:sentinels].each do |sentinel| %>
          -
            :host: <%= sentinel[:host] %>
            :port: <%= sentinel[:port] %>
          <% end %>
        <% end %>
35 36 37

      :arbitration_method: redis
      :arbitration_options:
38
        :redis_url: <%= config[:redis_url].to_json %>
39
        :namespace: <%= Gitlab::Redis::Queues::MAILROOM_NAMESPACE %>
40 41 42 43 44 45 46 47
        <% if config[:sentinels] %>
        :sentinels:
          <% config[:sentinels].each do |sentinel| %>
          -
            :host: <%= sentinel[:host] %>
            :port: <%= sentinel[:port] %>
          <% end %>
        <% end %>
48
  <% end %>