maildiode 0.2 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/lib/engine.rb CHANGED
@@ -197,7 +197,7 @@ module MailDiode
197
197
  end
198
198
  filterable_data = apply_filters(@envelope.sender, recipient)
199
199
  if !@mail_handler.valid_recipient?(filterable_data.recipient)
200
- raise_smtp_error(SMTPError::UNKNOWN_RECIPIENT + filterable_data.recipient)
200
+ raise_smtp_error(SMTPError::UNKNOWN_RECIPIENT + ": " + recipient)
201
201
  end
202
202
  @envelope.add_recipient(recipient)
203
203
  return RESULT_OK
@@ -265,7 +265,7 @@ module MailDiode
265
265
  full_text = received + NEWLINE + text.join(NEWLINE)
266
266
 
267
267
  filterable_data = apply_filters(sender, recipient)
268
- id = @mail_handler.process_message(filterable_data.recipient, full_text)
268
+ id = @mail_handler.process_message(recipient, filterable_data.recipient, full_text)
269
269
  return id
270
270
  end
271
271
 
@@ -30,7 +30,7 @@ module MailDiode
30
30
  @blacklisted_recipients.each do | pattern |
31
31
  re = Regexp.new(pattern, Regexp::IGNORECASE)
32
32
  if(recipient.match(re))
33
- raise MailDiode::SMTPError.new(MailDiode::SMTPError::UNKNOWN_RECIPIENT)
33
+ raise MailDiode::SMTPError.new(MailDiode::SMTPError::UNKNOWN_RECIPIENT + ": " + recipient)
34
34
  end
35
35
  end
36
36
  end
data/lib/maildir.rb CHANGED
@@ -50,12 +50,12 @@ module MailDiode
50
50
  return get_maildir(recipient)
51
51
  end
52
52
 
53
- def process_message(recipient, full_text)
53
+ def process_message(original_recipient, recipient, full_text)
54
54
  message = DeliverableMessage.new(full_text)
55
55
  raw_dir = get_maildir(recipient)
56
56
  folder = ''
57
57
  dir = "#{raw_dir.chomp('/')}#{folder}/"
58
- MailDiode::log_info "Delivering to #{dir} for #{recipient}"
58
+ MailDiode::log_info "Delivering to #{dir} for #{original_recipient}"
59
59
  if !File.exist?(dir)
60
60
  MailDiode::log_error "ERROR: Missing maildir folder: #{dir}"
61
61
  raise FolderMissingError.new(File.basename(dir))
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maildiode
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.2"
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Smith
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-01-10 00:00:00 -05:00
12
+ date: 2009-02-08 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency