[DRE-commits] [gitlab] 01/01: Add smtp configuration

Balasankar C balasankarc-guest at moszumanska.debian.org
Wed Feb 10 16:38:28 UTC 2016


This is an automated email from the git hooks/post-receive script.

balasankarc-guest pushed a commit to branch fix_email
in repository gitlab.

commit 2286e3c817cfdfa641fc0772f69f80b71fec8857
Author: Balasankar C <balasankarc at autistici.org>
Date:   Wed Feb 10 22:08:01 2016 +0530

    Add smtp configuration
---
 debian/conf/smtp_settings.rb | 15 +++++++++++++++
 debian/install               |  1 +
 2 files changed, 16 insertions(+)

diff --git a/debian/conf/smtp_settings.rb b/debian/conf/smtp_settings.rb
new file mode 100644
index 0000000..13b2931
--- /dev/null
+++ b/debian/conf/smtp_settings.rb
@@ -0,0 +1,15 @@
+# To enable smtp email delivery for your GitLab instance do the following:
+# 1. Rename this file to smtp_settings.rb
+# 2. Edit settings inside this file
+# 3. Restart GitLab instance
+#
+# For full list of options and their values see http://api.rubyonrails.org/classes/ActionMailer/Base.html
+#
+# If you change this file in a Merge Request, please also create a Merge Request on https://gitlab.com/gitlab-org/omnibus-gitlab/merge_requests
+
+if Rails.env.production?
+  Rails.application.config.action_mailer.delivery_method = :smtp
+  Rails.application.config.action_mailer.default_options = {from: "#{ENV['GITLAB_EMAIL_FROM']}" || "#{Settings.gitlab['email_from']}" || ''}
+
+  ActionMailer::Base.sendmail_settings = {}
+end
diff --git a/debian/install b/debian/install
index 7c50ba6..be0540e 100644
--- a/debian/install
+++ b/debian/install
@@ -6,6 +6,7 @@ debian/conf/resque.yml etc/gitlab
 debian/conf/gitlab-debian.conf etc/gitlab
 debian/conf/*.target lib/systemd/system
 debian/conf/*.service lib/systemd/system
+debian/conf/smtp_settings.rb usr/share/gitlab/config/initializers/
 debian/adduser.sh usr/lib/gitlab/scripts
 debian/grantpriv.sh usr/lib/gitlab/scripts
 debian/rake-tasks.sh usr/lib/gitlab/scripts

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/gitlab.git



More information about the Pkg-ruby-extras-commits mailing list