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?
|
2021-10-28 11:09:42 -04:00
|
|
|
checks << SystemCheck::IncomingEmail::MailRoomEnabledCheck
|
2018-11-27 19:08:31 -05:00
|
|
|
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
|