Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
4d7c4fe9
Commit
4d7c4fe9
authored
May 09, 2020
by
Diego Louzán
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add expunge deleted messages option to mailroom
parent
cd42cccf
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
33 additions
and
3 deletions
+33
-3
changelogs/unreleased/feat-add-expunge-option-mailroom.yml
changelogs/unreleased/feat-add-expunge-option-mailroom.yml
+5
-0
config/gitlab.yml.example
config/gitlab.yml.example
+3
-0
config/mail_room.yml
config/mail_room.yml
+1
-0
doc/administration/incoming_email.md
doc/administration/incoming_email.md
+12
-0
doc/development/emails.md
doc/development/emails.md
+3
-0
doc/user/project/service_desk.md
doc/user/project/service_desk.md
+1
-0
lib/gitlab/mail_room.rb
lib/gitlab/mail_room.rb
+2
-1
spec/config/mail_room_spec.rb
spec/config/mail_room_spec.rb
+2
-1
spec/fixtures/config/mail_room_enabled.yml
spec/fixtures/config/mail_room_enabled.yml
+2
-0
spec/lib/gitlab/mail_room/mail_room_spec.rb
spec/lib/gitlab/mail_room/mail_room_spec.rb
+2
-1
No files found.
changelogs/unreleased/feat-add-expunge-option-mailroom.yml
0 → 100644
View file @
4d7c4fe9
---
title
:
Add expunge deleted messages option to mailroom
merge_request
:
31531
author
:
Diego Louzán
type
:
added
config/gitlab.yml.example
View file @
4d7c4fe9
...
@@ -202,6 +202,9 @@ production: &base
...
@@ -202,6 +202,9 @@ production: &base
#
#
# log_path: log/mail_room_json.log
# log_path: log/mail_room_json.log
# Whether to expunge (permanently remove) messages from the mailbox when they are deleted after delivery
expunge_deleted: false
## Build Artifacts
## Build Artifacts
artifacts:
artifacts:
enabled: true
enabled: true
...
...
config/mail_room.yml
View file @
4d7c4fe9
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
:name: <%= config[:mailbox].to_json %>
:name: <%= config[:mailbox].to_json %>
:delete_after_delivery:
true
:delete_after_delivery:
true
:expunge_deleted: <%= config[:expunge_deleted].to_json %>
:delivery_method: sidekiq
:delivery_method: sidekiq
:delivery_options:
:delivery_options:
...
...
doc/administration/incoming_email.md
View file @
4d7c4fe9
...
@@ -182,6 +182,9 @@ gitlab_rails['incoming_email_start_tls'] = false
...
@@ -182,6 +182,9 @@ gitlab_rails['incoming_email_start_tls'] = false
gitlab_rails
[
'incoming_email_mailbox_name'
]
=
"inbox"
gitlab_rails
[
'incoming_email_mailbox_name'
]
=
"inbox"
# The IDLE command timeout.
# The IDLE command timeout.
gitlab_rails
[
'incoming_email_idle_timeout'
]
=
60
gitlab_rails
[
'incoming_email_idle_timeout'
]
=
60
# Whether to expunge (permanently remove) messages from the mailbox when they are deleted after delivery
gitlab_rails
[
'incoming_email_expunge_deleted'
]
=
true
```
```
Example for source installs:
Example for source installs:
...
@@ -214,6 +217,9 @@ incoming_email:
...
@@ -214,6 +217,9 @@ incoming_email:
mailbox
:
"
inbox"
mailbox
:
"
inbox"
# The IDLE command timeout.
# The IDLE command timeout.
idle_timeout
:
60
idle_timeout
:
60
# Whether to expunge (permanently remove) messages from the mailbox when they are deleted after delivery
expunge_deleted
:
true
```
```
#### Gmail
#### Gmail
...
@@ -249,6 +255,9 @@ gitlab_rails['incoming_email_start_tls'] = false
...
@@ -249,6 +255,9 @@ gitlab_rails['incoming_email_start_tls'] = false
gitlab_rails
[
'incoming_email_mailbox_name'
]
=
"inbox"
gitlab_rails
[
'incoming_email_mailbox_name'
]
=
"inbox"
# The IDLE command timeout.
# The IDLE command timeout.
gitlab_rails
[
'incoming_email_idle_timeout'
]
=
60
gitlab_rails
[
'incoming_email_idle_timeout'
]
=
60
# Whether to expunge (permanently remove) messages from the mailbox when they are deleted after delivery
gitlab_rails
[
'incoming_email_expunge_deleted'
]
=
true
```
```
Example for source installs:
Example for source installs:
...
@@ -281,6 +290,9 @@ incoming_email:
...
@@ -281,6 +290,9 @@ incoming_email:
mailbox
:
"
inbox"
mailbox
:
"
inbox"
# The IDLE command timeout.
# The IDLE command timeout.
idle_timeout
:
60
idle_timeout
:
60
# Whether to expunge (permanently remove) messages from the mailbox when they are deleted after delivery
expunge_deleted
:
true
```
```
#### Microsoft Exchange Server
#### Microsoft Exchange Server
...
...
doc/development/emails.md
View file @
4d7c4fe9
...
@@ -57,6 +57,9 @@ See the [Rails guides](https://guides.rubyonrails.org/action_mailer_basics.html#
...
@@ -57,6 +57,9 @@ See the [Rails guides](https://guides.rubyonrails.org/action_mailer_basics.html#
mailbox
:
"
inbox"
mailbox
:
"
inbox"
# The IDLE command timeout.
# The IDLE command timeout.
idle_timeout
:
60
idle_timeout
:
60
# Whether to expunge (permanently remove) messages from the mailbox when they are deleted after delivery
expunge_deleted
:
false
```
```
As mentioned, the part after
`+`
is ignored, and this will end up in the mailbox for
`gitlab-incoming@gmail.com`
.
As mentioned, the part after
`+`
is ignored, and this will end up in the mailbox for
`gitlab-incoming@gmail.com`
.
...
...
doc/user/project/service_desk.md
View file @
4d7c4fe9
...
@@ -151,6 +151,7 @@ service_desk_email:
...
@@ -151,6 +151,7 @@ service_desk_email:
log_path
:
"
log/mailroom.log"
log_path
:
"
log/mailroom.log"
mailbox
:
"
inbox"
mailbox
:
"
inbox"
idle_timeout
:
60
idle_timeout
:
60
expunge_deleted
:
true
```
```
In this case, suppose the
`mygroup/myproject`
project Service Desk settings has the project name
In this case, suppose the
`mygroup/myproject`
project Service Desk settings has the project name
...
...
lib/gitlab/mail_room.rb
View file @
4d7c4fe9
...
@@ -19,7 +19,8 @@ module Gitlab
...
@@ -19,7 +19,8 @@ module Gitlab
start_tls:
false
,
start_tls:
false
,
mailbox:
'inbox'
,
mailbox:
'inbox'
,
idle_timeout:
60
,
idle_timeout:
60
,
log_path:
RAILS_ROOT_DIR
.
join
(
'log'
,
'mail_room_json.log'
)
log_path:
RAILS_ROOT_DIR
.
join
(
'log'
,
'mail_room_json.log'
),
expunge_deleted:
false
}.
freeze
}.
freeze
# Email specific configuration which is merged with configuration
# Email specific configuration which is merged with configuration
...
...
spec/config/mail_room_spec.rb
View file @
4d7c4fe9
...
@@ -53,7 +53,8 @@ describe 'mail_room.yml' do
...
@@ -53,7 +53,8 @@ describe 'mail_room.yml' do
email:
'gitlab-incoming@gmail.com'
,
email:
'gitlab-incoming@gmail.com'
,
password:
'[REDACTED]'
,
password:
'[REDACTED]'
,
name:
'inbox'
,
name:
'inbox'
,
idle_timeout:
60
idle_timeout:
60
,
expunge_deleted:
true
}
}
expected_options
=
{
expected_options
=
{
redis_url:
gitlab_redis_queues
.
url
,
redis_url:
gitlab_redis_queues
.
url
,
...
...
spec/fixtures/config/mail_room_enabled.yml
View file @
4d7c4fe9
...
@@ -9,6 +9,7 @@ test:
...
@@ -9,6 +9,7 @@ test:
ssl
:
true
ssl
:
true
start_tls
:
false
start_tls
:
false
mailbox
:
"
inbox"
mailbox
:
"
inbox"
expunge_deleted
:
true
service_desk_email
:
service_desk_email
:
enabled
:
true
enabled
:
true
...
@@ -20,3 +21,4 @@ test:
...
@@ -20,3 +21,4 @@ test:
ssl
:
true
ssl
:
true
start_tls
:
false
start_tls
:
false
mailbox
:
"
inbox"
mailbox
:
"
inbox"
expunge_deleted
:
true
spec/lib/gitlab/mail_room/mail_room_spec.rb
View file @
4d7c4fe9
...
@@ -13,7 +13,8 @@ describe Gitlab::MailRoom do
...
@@ -13,7 +13,8 @@ describe Gitlab::MailRoom do
start_tls:
false
,
start_tls:
false
,
mailbox:
'inbox'
,
mailbox:
'inbox'
,
idle_timeout:
60
,
idle_timeout:
60
,
log_path:
Rails
.
root
.
join
(
'log'
,
'mail_room_json.log'
).
to_s
log_path:
Rails
.
root
.
join
(
'log'
,
'mail_room_json.log'
).
to_s
,
expunge_deleted:
false
}
}
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment