aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Landauer <matthew@openaustralia.org>2012-10-11 08:26:44 +1100
committerMatthew Landauer <matthew@openaustralia.org>2012-10-11 08:26:44 +1100
commit90af30c034a87f9ccb3f0f461db9e7d482edaacd (patch)
tree098b674c3289df95bbc479a9106912074c576685
parent93014db13566917f3625b8fe9055e55ae6c4dad9 (diff)
request_sent? now handles postfix and exim
-rw-r--r--app/models/exim_log.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/app/models/exim_log.rb b/app/models/exim_log.rb
index 2af87ba1f..83d79d433 100644
--- a/app/models/exim_log.rb
+++ b/app/models/exim_log.rb
@@ -125,8 +125,19 @@ class EximLog < ActiveRecord::Base
line.scan(/request-[^\s]+@#{Configuration::incoming_email_domain}/).sort.uniq
end
- # Look at the log for a request and check that an email was delivered
def EximLog.request_sent?(ir)
+ case(Configuration::mta_log_type.to_sym)
+ when :exim
+ request_exim_sent?(ir)
+ when :postfix
+ request_postfix_sent?(ir)
+ else
+ raise "Unexpected MTA type: #{type}"
+ end
+ end
+
+ # Look at the log for a request and check that an email was delivered
+ def EximLog.request_exim_sent?(ir)
# Look for line showing request was sent
found = false
ir.exim_logs.each do |exim_log|