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
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
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