summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIsrael Madueme <purelogiq@gmail.com>2018-03-29 23:47:13 +0200
committerDylan William Hardison <dylan@hardison.net>2018-03-29 23:47:13 +0200
commit1463e5c9c868be02643fded1f0beea0e3a2d6bdb (patch)
tree68fdb43b963d86a5f8dcb88381220e99db5b7d03
parent69bbc12dbb685210d83e6d83d2967b156517cf7a (diff)
downloadbugzilla-1463e5c9c868be02643fded1f0beea0e3a2d6bdb.tar.gz
bugzilla-1463e5c9c868be02643fded1f0beea0e3a2d6bdb.tar.xz
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.
-rw-r--r--README.rst49
-rw-r--r--vagrant_support/bmo-generate-data.j21
-rw-r--r--vagrant_support/checksetup_answers.j21
3 files changed, 50 insertions, 1 deletions
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/
diff --git a/vagrant_support/bmo-generate-data.j2 b/vagrant_support/bmo-generate-data.j2
index 79798ba4d..6ad9303d6 100644
--- a/vagrant_support/bmo-generate-data.j2
+++ b/vagrant_support/bmo-generate-data.j2
@@ -2,3 +2,4 @@
cd /vagrant
perl scripts/generate_bmo_data.pl 'vagrant@{{ WEB_HOSTNAME }}'
+perl scripts/update_params.pl 'mail_delivery_method' 'Sendmail'
diff --git a/vagrant_support/checksetup_answers.j2 b/vagrant_support/checksetup_answers.j2
index 683a28a6f..441a4d41d 100644
--- a/vagrant_support/checksetup_answers.j2
+++ b/vagrant_support/checksetup_answers.j2
@@ -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;