aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/crontab.ugly4
-rw-r--r--config/environment.rb4
-rw-r--r--config/general.yml-example6
-rw-r--r--config/initializers/fast_gettext.rb1
-rw-r--r--config/initializers/missing_source_file.rb2
5 files changed, 14 insertions, 3 deletions
diff --git a/config/crontab.ugly b/config/crontab.ugly
index 3e44f6153..894b464cf 100644
--- a/config/crontab.ugly
+++ b/config/crontab.ugly
@@ -16,8 +16,8 @@ MAILTO=cron-!!(*= $site *)!!@mysociety.org
# Once an hour
09 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/alert-comment-on-request.lock /data/vhost/!!(*= $vhost *)!!/!!(*= $vcspath *)!!/script/alert-comment-on-request || echo "stalled?"
-# Only root can read the exim log files
-31 * * * * root run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/load-exim-logs.lock /data/vhost/!!(*= $vhost *)!!/!!(*= $vcspath *)!!/script/load-exim-logs || echo "stalled?"
+# Only root can read the log files
+31 * * * * root run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/load-mail-server-logs.lock /data/vhost/!!(*= $vhost *)!!/!!(*= $vcspath *)!!/script/load-mail-server-logs || echo "stalled?"
# Once a day, early morning
23 4 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/delete-old-things.lock /data/vhost/!!(*= $vhost *)!!/!!(*= $vcspath *)!!/script/delete-old-things || echo "stalled?"
diff --git a/config/environment.rb b/config/environment.rb
index db537c14e..3ce887c03 100644
--- a/config/environment.rb
+++ b/config/environment.rb
@@ -1,5 +1,9 @@
# Be sure to restart your web server when you modify this file.
+# the default encoding for IO is utf-8, and we use utf-8 internally
+if RUBY_VERSION.to_f >= 1.9
+ Encoding.default_external = Encoding.default_internal = Encoding::UTF_8
+end
# Uncomment below to force Rails into production mode when
# you don't control web/app server and can't set it the proper way
diff --git a/config/general.yml-example b/config/general.yml-example
index b457b5ed6..9646e45c8 100644
--- a/config/general.yml-example
+++ b/config/general.yml-example
@@ -172,3 +172,9 @@ GA_CODE: ''
# Search path for external commandline utilities (such as pdftohtml, pdftk, unrtf)
UTILITY_SEARCH_PATH: ["/usr/bin", "/usr/local/bin"]
+
+# Path to your exim or postfix log files that will get sucked up by script/load-mail-server-logs
+MTA_LOG_PATH: '/var/log/exim4/exim-mainlog-*'
+
+# Whether we are using "exim" or "postfix" for our MTA
+MTA_LOG_TYPE: "exim"
diff --git a/config/initializers/fast_gettext.rb b/config/initializers/fast_gettext.rb
index 721c49cd0..2ecf5cb5d 100644
--- a/config/initializers/fast_gettext.rb
+++ b/config/initializers/fast_gettext.rb
@@ -1,4 +1,3 @@
-Encoding.default_external = 'UTF-8' if RUBY_VERSION.to_f >= 1.9
FastGettext.add_text_domain 'app', :path => File.join(Rails.root, 'locale'), :type => :po
FastGettext.default_text_domain = 'app'
diff --git a/config/initializers/missing_source_file.rb b/config/initializers/missing_source_file.rb
new file mode 100644
index 000000000..a114fa972
--- /dev/null
+++ b/config/initializers/missing_source_file.rb
@@ -0,0 +1,2 @@
+# For Rails 2.3 on Ruby 1.9.3 @see https://github.com/rails/rails/pull/3745
+MissingSourceFile::REGEXPS << [/^cannot load such file -- (.+)$/i, 1]