Skip to content
Snippets Groups Projects
Commit 82da19ce authored by Robert Speicher's avatar Robert Speicher
Browse files

Merge branch 'mailroom-arbitration' into 'master'

Enable arbitration in MailRoom

Fixes #2870.

See merge request !1566
parents 52983a84 c2c8f8ac
No related branches found
No related tags found
No related merge requests found
Pipeline #
Loading
@@ -290,7 +290,7 @@ gem 'newrelic-grape'
Loading
@@ -290,7 +290,7 @@ gem 'newrelic-grape'
   
gem 'octokit', '~> 3.7.0' gem 'octokit', '~> 3.7.0'
   
gem "mail_room", "~> 0.5.2" gem "mail_room", "~> 0.6.0"
   
gem 'email_reply_parser', '~> 0.5.8' gem 'email_reply_parser', '~> 0.5.8'
   
Loading
Loading
Loading
@@ -392,7 +392,7 @@ GEM
Loading
@@ -392,7 +392,7 @@ GEM
systemu (~> 2.6.2) systemu (~> 2.6.2)
mail (2.6.3) mail (2.6.3)
mime-types (>= 1.16, < 3) mime-types (>= 1.16, < 3)
mail_room (0.5.2) mail_room (0.6.0)
method_source (0.8.2) method_source (0.8.2)
mime-types (1.25.1) mime-types (1.25.1)
mimemagic (0.3.0) mimemagic (0.3.0)
Loading
@@ -854,7 +854,7 @@ DEPENDENCIES
Loading
@@ -854,7 +854,7 @@ DEPENDENCIES
jquery-ui-rails (~> 4.2.1) jquery-ui-rails (~> 4.2.1)
kaminari (~> 0.16.3) kaminari (~> 0.16.3)
letter_opener (~> 1.1.2) letter_opener (~> 1.1.2)
mail_room (~> 0.5.2) mail_room (~> 0.6.0)
minitest (~> 5.7.0) minitest (~> 5.7.0)
mousetrap-rails (~> 1.4.6) mousetrap-rails (~> 1.4.6)
mysql2 (~> 0.3.16) mysql2 (~> 0.3.16)
Loading
Loading
Loading
@@ -12,8 +12,10 @@
Loading
@@ -12,8 +12,10 @@
# :email: "gitlab-incoming@gmail.com" # :email: "gitlab-incoming@gmail.com"
# # Email account password # # Email account password
# :password: "password" # :password: "password"
# # The name of the mailbox where incoming mail will end up. Usually "inbox". # # The name of the mailbox where incoming mail will end up. Usually "inbox".
# :name: "inbox" # :name: "inbox"
# # Always "sidekiq". # # Always "sidekiq".
# :delivery_method: sidekiq # :delivery_method: sidekiq
# # Always true. # # Always true.
Loading
@@ -25,5 +27,13 @@
Loading
@@ -25,5 +27,13 @@
# :namespace: resque:gitlab # :namespace: resque:gitlab
# # Always "incoming_email". # # Always "incoming_email".
# :queue: incoming_email # :queue: incoming_email
# # Always "EmailReceiverWorker" # # Always "EmailReceiverWorker".
# :worker: EmailReceiverWorker # :worker: EmailReceiverWorker
# # Always "redis".
# :arbitration_method: redis
# :arbitration_options:
# # The URL to the Redis server. Should match the URL in config/resque.yml.
# :redis_url: redis://localhost:6379
# # Always "mail_room:gitlab".
# :namespace: mail_room:gitlab
Loading
@@ -2,10 +2,6 @@
Loading
@@ -2,10 +2,6 @@
   
GitLab can be set up to allow users to comment on issues and merge requests by replying to notification emails. GitLab can be set up to allow users to comment on issues and merge requests by replying to notification emails.
   
**Warning**: Do not enable Reply by email if you have **multiple GitLab application servers**.
Due to an issue with the way incoming emails are read from the mail server, every incoming reply-by-email email will result in as many comments being created as you have application servers.
[A fix is being worked on.](https://github.com/tpitale/mail_room/issues/46)
## Get a mailbox ## Get a mailbox
   
Reply by email requires an IMAP-enabled email account, with a provider or server that supports [email sub-addressing](https://en.wikipedia.org/wiki/Email_address#Sub-addressing). Sub-addressing is a feature where any email to `user+some_arbitrary_tag@example.com` will end up in the mailbox for `user@example.com`, and is supported by providers such as Gmail, Yahoo! Mail, Outlook.com and iCloud, as well as the Postfix mail server which you can run on-premises. Reply by email requires an IMAP-enabled email account, with a provider or server that supports [email sub-addressing](https://en.wikipedia.org/wiki/Email_address#Sub-addressing). Sub-addressing is a feature where any email to `user+some_arbitrary_tag@example.com` will end up in the mailbox for `user@example.com`, and is supported by providers such as Gmail, Yahoo! Mail, Outlook.com and iCloud, as well as the Postfix mail server which you can run on-premises.
Loading
@@ -118,8 +114,10 @@ To set up a basic Postfix mail server with IMAP access on Ubuntu, follow [these
Loading
@@ -118,8 +114,10 @@ To set up a basic Postfix mail server with IMAP access on Ubuntu, follow [these
:email: "incoming" :email: "incoming"
# Email account password # Email account password
:password: "[REDACTED]" :password: "[REDACTED]"
# The name of the mailbox where incoming mail will end up. Usually "inbox". # The name of the mailbox where incoming mail will end up. Usually "inbox".
:name: "inbox" :name: "inbox"
# Always "sidekiq". # Always "sidekiq".
:delivery_method: sidekiq :delivery_method: sidekiq
# Always true. # Always true.
Loading
@@ -133,6 +131,14 @@ To set up a basic Postfix mail server with IMAP access on Ubuntu, follow [these
Loading
@@ -133,6 +131,14 @@ To set up a basic Postfix mail server with IMAP access on Ubuntu, follow [these
:queue: incoming_email :queue: incoming_email
# Always "EmailReceiverWorker" # Always "EmailReceiverWorker"
:worker: EmailReceiverWorker :worker: EmailReceiverWorker
# Always "redis".
:arbitration_method: redis
:arbitration_options:
# The URL to the Redis server. Should match the URL in config/resque.yml.
:redis_url: redis://localhost:6379
# Always "mail_room:gitlab".
:namespace: mail_room:gitlab
``` ```
   
```yaml ```yaml
Loading
@@ -151,8 +157,10 @@ To set up a basic Postfix mail server with IMAP access on Ubuntu, follow [these
Loading
@@ -151,8 +157,10 @@ To set up a basic Postfix mail server with IMAP access on Ubuntu, follow [these
:email: "gitlab-incoming@gmail.com" :email: "gitlab-incoming@gmail.com"
# Email account password # Email account password
:password: "[REDACTED]" :password: "[REDACTED]"
# The name of the mailbox where incoming mail will end up. Usually "inbox". # The name of the mailbox where incoming mail will end up. Usually "inbox".
:name: "inbox" :name: "inbox"
# Always "sidekiq". # Always "sidekiq".
:delivery_method: sidekiq :delivery_method: sidekiq
# Always true. # Always true.
Loading
@@ -166,6 +174,14 @@ To set up a basic Postfix mail server with IMAP access on Ubuntu, follow [these
Loading
@@ -166,6 +174,14 @@ To set up a basic Postfix mail server with IMAP access on Ubuntu, follow [these
:queue: incoming_email :queue: incoming_email
# Always "EmailReceiverWorker" # Always "EmailReceiverWorker"
:worker: EmailReceiverWorker :worker: EmailReceiverWorker
# Always "redis".
:arbitration_method: redis
:arbitration_options:
# The URL to the Redis server. Should match the URL in config/resque.yml.
:redis_url: redis://localhost:6379
# Always "mail_room:gitlab".
:namespace: mail_room:gitlab
``` ```
   
5. Edit the init script configuration at `/etc/default/gitlab` to enable `mail_room`: 5. Edit the init script configuration at `/etc/default/gitlab` to enable `mail_room`:
Loading
@@ -228,8 +244,10 @@ To set up a basic Postfix mail server with IMAP access on Ubuntu, follow [these
Loading
@@ -228,8 +244,10 @@ To set up a basic Postfix mail server with IMAP access on Ubuntu, follow [these
:email: "gitlab-incoming@gmail.com" :email: "gitlab-incoming@gmail.com"
# Email account password # Email account password
:password: "[REDACTED]" :password: "[REDACTED]"
# The name of the mailbox where incoming mail will end up. Usually "inbox". # The name of the mailbox where incoming mail will end up. Usually "inbox".
:name: "inbox" :name: "inbox"
# Always "sidekiq". # Always "sidekiq".
:delivery_method: sidekiq :delivery_method: sidekiq
# Always true. # Always true.
Loading
@@ -243,6 +261,14 @@ To set up a basic Postfix mail server with IMAP access on Ubuntu, follow [these
Loading
@@ -243,6 +261,14 @@ To set up a basic Postfix mail server with IMAP access on Ubuntu, follow [these
:queue: incoming_email :queue: incoming_email
# Always "EmailReceiverWorker" # Always "EmailReceiverWorker"
:worker: EmailReceiverWorker :worker: EmailReceiverWorker
# Always "redis".
:arbitration_method: redis
:arbitration_options:
# The URL to the Redis server. Should match the URL in config/resque.yml.
:redis_url: redis://localhost:6379
# Always "mail_room:gitlab".
:namespace: mail_room:gitlab
``` ```
   
4. Uncomment the `mail_room` line in your `Procfile`: 4. Uncomment the `mail_room` line in your `Procfile`:
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment