]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1447027 - Change default mail method for vagrant and update README
authorIsrael Madueme <purelogiq@gmail.com>
Thu, 29 Mar 2018 21:47:13 +0000 (17:47 -0400)
committerDylan William Hardison <dylan@hardison.net>
Thu, 29 Mar 2018 21:47:13 +0000 (17:47 -0400)
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
vagrant_support/bmo-generate-data.j2
vagrant_support/checksetup_answers.j2

index 1576f07b7fceeee59af41479ddf2cab4ee31ff9e..64fae335bf43bc146598a4b476c0e56a24a07672 100644 (file)
@@ -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/
index 79798ba4da814bb4d2062bd7037f5e8bf1eef6d7..6ad9303d6abee86d1f5bd870b34c76c46c0c9029 100644 (file)
@@ -2,3 +2,4 @@
 
 cd /vagrant
 perl scripts/generate_bmo_data.pl 'vagrant@{{ WEB_HOSTNAME }}'
+perl scripts/update_params.pl 'mail_delivery_method' 'Sendmail'
index 683a28a6fc0ece6051791666c53587bf86cef4a9..441a4d41db97da8791fa5daf587a5a3461d8efdf 100644 (file)
@@ -23,6 +23,7 @@ $answer{'user_verify_class'}    = 'GitHubAuth,DB';
 $answer{'urlbase'}              = "http://{{WEB_HOSTNAME}}/";
 $answer{'memcached_namespace'}  = 'bmo:';
 $answer{'memcached_servers'}    = '127.0.0.1:11211';
+$answer{'mail_delivery_method'} = 'Sendmail';
 $answer{'use_mailer_queue'}     = 1;
 $answer{'useclassification'}    = 1;
 $answer{'usebugaliases'}        = 1;