Skip to content

Support multiple mailboxes incoming email check

What does this MR do?

With the added functionality for mail_room to support multiple email addresses, reference !23524 (merged), the rake task to check incoming email, gitlab-rake gitlab:incoming_email:check, needed to be able to support additional mailboxes. Currently, the rake task only checks a single configured mailbox. This change loops through each mailbox configured to verify credentials are correct.

Current output of gitlab-rake gitlab:incoming_email:check:

root@localhost:~# gitlab-rake gitlab:incoming_email:check
Checking Incoming Email ...

Incoming Email: ... Checking Reply by email ...

IMAP server credentials are correct? ... yes
Init.d configured correctly? ... skipped
MailRoom running? ... skipped

Checking Reply by email ... Finished


Checking Incoming Email ... Finished

Output based on changes:

root@localhost:~# bundle exec rake gitlab:incoming_email:check
Checking Incoming Email ...

Incoming Email: ... Checking Reply by email ...

IMAP server credentials are correct? ...
Checking exmaple1@example.com
Connected to example1@example.com

Checking example2@example.com
Connected to example2@examplle.com
yes

Checking Reply by email ... Finished


Checking Incoming Email ... Finished

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by John Long

Merge request reports

Loading