aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/models/exim_log.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/exim_log.rb b/app/models/exim_log.rb
index a823bf806..fc7fd38e5 100644
--- a/app/models/exim_log.rb
+++ b/app/models/exim_log.rb
@@ -145,6 +145,12 @@ class EximLog < ActiveRecord::Base
found
end
+ def EximLog.request_postfix_sent?(ir)
+ # dsn=2.0.0 is the magic word that says that postfix delivered the email
+ # See http://tools.ietf.org/html/rfc3464
+ ir.exim_logs.any? { |l| l.line.include?("dsn=2.0.0") }
+ end
+
# Check that the last day of requests has been sent in Exim and we got the
# lines. Writes any errors to STDERR. This check is really mainly to
# check the envelope from is the request address, as Ruby is quite