summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/gitlab.yml.example2
-rw-r--r--config/mail_room.yml2
-rw-r--r--lib/gitlab/mail_room.rb1
-rw-r--r--spec/config/mail_room_spec.rb1
4 files changed, 5 insertions, 1 deletions
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
index 699ab6075b6..2da225904e1 100644
--- a/config/gitlab.yml.example
+++ b/config/gitlab.yml.example
@@ -138,6 +138,8 @@ production: &base
# The mailbox where incoming mail will end up. Usually "inbox".
mailbox: "inbox"
+ # The mailbox where incoming mail will end up. Usually "inbox".
+ idle_timeout: 60
## Build Artifacts
artifacts:
diff --git a/config/mail_room.yml b/config/mail_room.yml
index b026d510f1b..774c5350a45 100644
--- a/config/mail_room.yml
+++ b/config/mail_room.yml
@@ -15,7 +15,7 @@
:start_tls: <%= config[:start_tls].to_json %>
:email: <%= config[:user].to_json %>
:password: <%= config[:password].to_json %>
- :idle_timeout: 60
+ :idle_timeout: <%= config[:idle_timeout].to_json %>
:name: <%= config[:mailbox].to_json %>
diff --git a/lib/gitlab/mail_room.rb b/lib/gitlab/mail_room.rb
index a5220d92312..3503fac40e8 100644
--- a/lib/gitlab/mail_room.rb
+++ b/lib/gitlab/mail_room.rb
@@ -31,6 +31,7 @@ module Gitlab
config[:ssl] = false if config[:ssl].nil?
config[:start_tls] = false if config[:start_tls].nil?
config[:mailbox] = 'inbox' if config[:mailbox].nil?
+ config[:idle_timeout] = 60 if config[:idle_timeout].nil?
if config[:enabled] && config[:address]
gitlab_redis = Gitlab::Redis.new(rails_env)
diff --git a/spec/config/mail_room_spec.rb b/spec/config/mail_room_spec.rb
index 22bf3055538..294fae95752 100644
--- a/spec/config/mail_room_spec.rb
+++ b/spec/config/mail_room_spec.rb
@@ -47,6 +47,7 @@ describe 'mail_room.yml' do
expect(mailbox[:email]).to eq('gitlab-incoming@gmail.com')
expect(mailbox[:password]).to eq('[REDACTED]')
expect(mailbox[:name]).to eq('inbox')
+ expect(mailbox[:idle_timeout]).to eq(60)
redis_url = gitlab_redis.url
sentinels = gitlab_redis.sentinels