From 3c980b7201a9fa0a871221f27dd638292e46ca22 Mon Sep 17 00:00:00 2001 From: Jonne Hass Date: Sat, 12 Nov 2011 11:24:49 +0100 Subject: [PATCH] added fix for using sendmail with exim, the default -t argument behaves different so lets take it out --- config/application.yml.example | 3 +++ config/initializers/mailer_config.rb | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/config/application.yml.example b/config/application.yml.example index a5cf105d4..94470aacf 100644 --- a/config/application.yml.example +++ b/config/application.yml.example @@ -127,6 +127,9 @@ defaults: &defaults # The path to the sendmail binary. Ignored if mailer_method is not set to sendmail sendmail_location: '/usr/sbin/sendmail' + + # Set this to true if you want to use exim and sendmail + sendmail_exim_fix: false # Authentication required to send mail. Use one of 'one', 'plain', # 'login' or 'cram-md5'. Use 'none' if server does not support diff --git a/config/initializers/mailer_config.rb b/config/initializers/mailer_config.rb index 4e98dcbbf..9c6d42741 100644 --- a/config/initializers/mailer_config.rb +++ b/config/initializers/mailer_config.rb @@ -17,7 +17,8 @@ Diaspora::Application.configure do elsif AppConfig[:mailer_method] == "sendmail" config.action_mailer.delivery_method = :sendmail config.action_mailer.sendmail_settings = { - :location => AppConfig[:sendmail_location] + :location => AppConfig[:sendmail_location], + :arguments => "-i" if AppConfig[:sendmail_exim_fix] } else config.action_mailer.delivery_method = :smtp