debian-mirror-gitlab/lib/system_check/incoming_email_check.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
750 B
Ruby
Raw Permalink Normal View History

2019-02-15 15:39:39 +05:30
# 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-11-11 11:23:49 +05:30
checks = []
if Gitlab.config.incoming_email.inbox_method == 'imap'
checks << SystemCheck::IncomingEmail::ImapAuthenticationCheck
end
2019-02-15 15:39:39 +05:30
if Rails.env.production?
2021-12-11 22:18:48 +05:30
checks << SystemCheck::IncomingEmail::MailRoomEnabledCheck
2019-02-15 15:39:39 +05:30
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