diff options
-rw-r--r-- | app/models/exim_log.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/app/models/exim_log.rb b/app/models/exim_log.rb index e52d3c017..0c129139e 100644 --- a/app/models/exim_log.rb +++ b/app/models/exim_log.rb @@ -56,10 +56,8 @@ class EximLog < ActiveRecord::Base done.save! # scan the file - f = is_gz ? Zlib::GzipReader.open(file_name) : File.open(file_name, 'r') - order = 0 - for line in f + (is_gz ? Zlib::GzipReader.open(file_name) : File.open(file_name, 'r')).each do |line| order = order + 1 email_domain = Configuration::incoming_email_domain emails = line.scan(/request-[^\s]+@#{email_domain}/).sort.uniq |