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
#
# 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
artifacts:
enabled: true
...
...
config/mail_room.yml
View file @
4d7c4fe9
...
...
@@ -17,6 +17,7 @@
:name: <%= config[:mailbox].to_json %>
:delete_after_delivery:
true
:expunge_deleted: <%= config[:expunge_deleted].to_json %>
:delivery_method: sidekiq
:delivery_options:
...
...
doc/administration/incoming_email.md
View file @
4d7c4fe9
...
...
@@ -182,6 +182,9 @@ gitlab_rails['incoming_email_start_tls'] = false
gitlab_rails
[
'incoming_email_mailbox_name'
]
=
"inbox"
# The IDLE command timeout.
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:
...
...
@@ -214,6 +217,9 @@ incoming_email:
mailbox
:
"
inbox"
# The IDLE command timeout.
idle_timeout
:
60
# Whether to expunge (permanently remove) messages from the mailbox when they are deleted after delivery
expunge_deleted
:
true
```
#### Gmail
...
...
@@ -249,6 +255,9 @@ gitlab_rails['incoming_email_start_tls'] = false
gitlab_rails
[
'incoming_email_mailbox_name'
]
=
"inbox"
# The IDLE command timeout.
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:
...
...
@@ -281,6 +290,9 @@ incoming_email:
mailbox
:
"
inbox"
# The IDLE command timeout.
idle_timeout
:
60
# Whether to expunge (permanently remove) messages from the mailbox when they are deleted after delivery
expunge_deleted
:
true
```
#### 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#
mailbox
:
"
inbox"
# The IDLE command timeout.
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`
.
...
...
doc/user/project/service_desk.md
View file @
4d7c4fe9
...
...
@@ -151,6 +151,7 @@ service_desk_email:
log_path
:
"
log/mailroom.log"
mailbox
:
"
inbox"
idle_timeout
:
60
expunge_deleted
:
true
```
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
start_tls:
false
,
mailbox:
'inbox'
,
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
# 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
email:
'gitlab-incoming@gmail.com'
,
password:
'[REDACTED]'
,
name:
'inbox'
,
idle_timeout:
60
idle_timeout:
60
,
expunge_deleted:
true
}
expected_options
=
{
redis_url:
gitlab_redis_queues
.
url
,
...
...
spec/fixtures/config/mail_room_enabled.yml
View file @
4d7c4fe9
...
...
@@ -9,6 +9,7 @@ test:
ssl
:
true
start_tls
:
false
mailbox
:
"
inbox"
expunge_deleted
:
true
service_desk_email
:
enabled
:
true
...
...
@@ -20,3 +21,4 @@ test:
ssl
:
true
start_tls
:
false
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
start_tls:
false
,
mailbox:
'inbox'
,
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
...
...
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