40 lines
1.8 KiB
Diff
40 lines
1.8 KiB
Diff
|
diff --git a/app/mailers/notify.rb b/app/mailers/notify.rb
|
||
|
index 84a0da0..9cb359e 100644
|
||
|
--- a/app/mailers/notify.rb
|
||
|
+++ b/app/mailers/notify.rb
|
||
|
@@ -16,7 +16,7 @@ class Notify < ActionMailer::Base
|
||
|
default_url_options[:script_name] = Gitlab.config.gitlab.relative_url_root
|
||
|
|
||
|
default from: Proc.new { default_sender_address.format }
|
||
|
- default reply_to: "noreply@#{Gitlab.config.gitlab.host}"
|
||
|
+ default reply_to: Gitlab.config.gitlab.email_reply_to
|
||
|
|
||
|
# Just send email with 2 seconds delay
|
||
|
def self.delay
|
||
|
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
|
||
|
index b2b8f56..173924c 100644
|
||
|
--- a/config/gitlab.yml.example
|
||
|
+++ b/config/gitlab.yml.example
|
||
|
@@ -35,6 +35,9 @@ production: &base
|
||
|
# Email address used in the "From" field in mails sent by GitLab
|
||
|
email_from: example@example.com
|
||
|
|
||
|
+ # Email address used in the "Reply-To" field in mails send by GitLab (default: no-reply@<host>)
|
||
|
+ email_reply_to: no-reply@example.com
|
||
|
+
|
||
|
# Email server smtp settings are in [a separate file](initializers/smtp_settings.rb.sample).
|
||
|
|
||
|
## User settings
|
||
|
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
|
||
|
index f55e69c..997ff2e 100644
|
||
|
--- a/config/initializers/1_settings.rb
|
||
|
+++ b/config/initializers/1_settings.rb
|
||
|
@@ -79,6 +79,7 @@ Settings.gitlab['port'] ||= Settings.gitlab.https ? 443 : 80
|
||
|
Settings.gitlab['relative_url_root'] ||= ENV['RAILS_RELATIVE_URL_ROOT'] || ''
|
||
|
Settings.gitlab['protocol'] ||= Settings.gitlab.https ? "https" : "http"
|
||
|
Settings.gitlab['email_from'] ||= "gitlab@#{Settings.gitlab.host}"
|
||
|
+Settings.gitlab['email_reply_to'] ||= "no-reply@#{Settings.gitlab.host}"
|
||
|
Settings.gitlab['url'] ||= Settings.send(:build_gitlab_url)
|
||
|
Settings.gitlab['user'] ||= 'git'
|
||
|
Settings.gitlab['user_home'] ||= begin
|