2018-11-27 19:08:31 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module SystemCheck
|
|
|
|
# Used by gitlab:incoming_email:check rake task
|
|
|
|
class IncomingEmailCheck < BaseCheck
|
|
|
|
set_name 'Incoming Email:'
|
|
|
|
|
|
|
|
def multi_check
|
|
|
|
if Gitlab.config.incoming_email.enabled
|
2021-08-23 11:10:43 -04:00
|
|
|
checks = []
|
|
|
|
|
|
|
|
if Gitlab.config.incoming_email.inbox_method == 'imap'
|
|
|
|
checks << SystemCheck::IncomingEmail::ImapAuthenticationCheck
|
|
|
|
end
|
2018-11-27 19:08:31 -05:00
|
|
|
|
|
|
|
if Rails.env.production?
|
|
|
|
checks << SystemCheck::IncomingEmail::InitdConfiguredCheck
|
|
|
|
checks << SystemCheck::IncomingEmail::MailRoomRunningCheck
|
|
|
|
end
|
|
|
|
|
|
|
|
SystemCheck.run('Reply by email', checks)
|
|
|
|
else
|
|
|
|
$stdout.puts 'Reply by email is disabled in config/gitlab.yml'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|