replaced the mailman gem with custom code with more error
handling. this will allow the incoming message processor to
continue processing messages after encountering a message with
an encoding or parsing error. the broken messages will be moved
aside to a separate folder for later inspection.
fixes CNVS-4970
test plan:
- read up on the new incoming_mail.yml configuration settings.
- configure incoming_mail.yml with the test imap accounts
using legacy settings and check for regressions.
- reconfigure incoming_mail.yml to read from a directory.
- copy some testing email files into the configured directory.
test files should be a mix of:
- emails with encoding errors
- emails with syntax errors
- normal emails
- all of the normal emails should be processed normally
- all of the error emails should be moved into the error
subdirectory
Change-Id: I0f946a56b41492f007db2775aa6da3cdfa4fdd3f
Reviewed-on: https://gerrit.instructure.com/19729
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
fixes CNVS-3781
test plan:
- See test email accounts on the IncomingMessageProcessor wiki
page.
- Configure config/incoming_mail.yml with multiple test email
accounts as specified in the incoming_mail.yml.example file
(the config should be in the development section).
- Restart rails to pick up the new configuration.
- Set a student's notifications for discussion topics to ASAP.
- Create a new discussion topic.
- Go to /messages for the student and find the notification
for the new discussion topic.
- Copy the "+" data from the reply-to field. For example, from
"notifications+deadbeef-4242@example.com" you would copy
"+deadbeef-4242"
- Send a real email to one of the test accounts, adding the
"+" data to the address. For example "test1@example.com"
would become "test1+deadbeef-4242@example.com"
- After 1 minute, the IncomingMessageProcessor should pull the
message from the test account and post the body of the email
message to the discussion.
- Send another email as above but to a different test account
you've configured. It should also appear in the discussion.
- Reconfigure incoming_mail.yml with one account as it appears
in the original production settings. Restart rails and make
sure this configuration still works.
- When you're done testing, remove your
config/incoming_mail.yml file and restart rails.
Change-Id: Ie4a584c32bf0cc7025619341584d454cf15ce07f
Reviewed-on: https://gerrit.instructure.com/17714
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
* Uses Mailman gem
* Can be configured for POP3, Maildir, or stdin (push from mailserver)
* Maildir can be chained with fetchmail or similar to support IMAP
* Can be run as part of the job server, or as a separate process
Change-Id: I000000000000000000000000000001
Reviewed-on: https://gerrit.instructure.com/2971
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>