From 1463e5c9c868be02643fded1f0beea0e3a2d6bdb Mon Sep 17 00:00:00 2001 From: Israel Madueme Date: Thu, 29 Mar 2018 17:47:13 -0400 Subject: Bug 1447027 - Change default mail method for vagrant and update README Updates the default mail_delivery_method to be Sendmail for vagrant development. This allows developers to connect to the imap server running at bmo-web.vm:143 to view mail using a real mail client. The default method remains the same for docker users, 'Test'. Both methods are described in the README in a new section. --- README.rst | 49 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) (limited to 'README.rst') diff --git a/README.rst b/README.rst index 1576f07b7..64fae335b 100644 --- a/README.rst +++ b/README.rst @@ -19,6 +19,8 @@ BMO is Mozilla's highly customized version of Bugzilla. 3.1 Container Arguments 3.2 Environmental Variables 3.3 Persistent Data Volume + 4. Development Tips + 4.1 Testing Emails If you want to contribute to BMO, you can fork this repo and get a local copy of BMO running in a few minutes using Vagrant or Docker. @@ -300,7 +302,7 @@ BMO_apache_size_limit BMO_mail_delivery_method Usually configured on the MTA section of admin interface, but may be set here for testing purposes. Valid values are None, Test, Sendmail, or SMTP. - If set to Test, email will be appended to the /app/data/mailer.test file. + If set to Test, email will be appended to the /app/data/mailer.testfile. BMO_use_mailer_queue Usually configured on the MTA section of the admin interface, you may change this here for testing purposes. @@ -365,3 +367,48 @@ Persistent Data Volume This container expects /app/data to be a persistent, shared, writable directory owned by uid 10001. This must be a shared (NFS/EFS/etc) volume between all nodes. + +Development Tips +================ + +Testing Emails +-------------- + +With vagrant have two options to test emails sent by a local bugzilla instance. You can configure +which setting you want to use by going to http://bmo-web.vm/editparams.cgi?section=mta and +changing the mail_delivery_method to either 'Test' or 'Sendmail'. Afterwards restart bmo with +``vagrant reload``. With docker, only the default 'Test' option is supported. + +'Test' option (Default for Docker) +~~~~~~~~~~~~~~~~~~~~~~~ + +With this option, all mail will be appended to a ``mailer.testfile``. + +- Using docker, run ``docker-compose run bmo-web.vm cat /app/data/mailer.testfile``. +- Using vagrant, run ``vagrant ssh web`` and then naviage to ``/vagrant/data/mailer.testfile``. + +'Sendmail' option (Default for Vagrant) +~~~~~~~~~~~~~~~~~ + +This option is useful if you want to preview email using a real mail client. +An imap server is running on bmo-web.vm on port 143 and you can connect to it with +the following settings: + +- host: bmo-web.vm +- port: 143 +- encryption: No SSL, Plaintext password +- username: vagrant +- password: anything + +All email that bmo sends will go to the vagrant user, so there is no need to login with +multiple imap accounts. + +`Thunderbird's`_ wizard to add a new "Existing Mail Account" doesn't work with bmo-web. It +fails because it wants to create a mail account with both incoming mail (IMAP) and outgoing +mail (SMTP, which bmo-web.vm doesn't provide). To work around this, using a regular email +account to first setup, then modify the settings of that account: Right Click the account in +the left side bar > Settings > Server Settings. Update the server settings to match those +listed above. Afterwards, you may update the account name to be vagrant@bmo-web.vm. Thunderbird +will now pull email from bmo. You can try it out by commenting on a bug. + +.. _`Thunderbird's`: https://www.mozilla.org/en-US/thunderbird/ -- cgit v1.2.3-24-g4f1b