4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/dkim/interceptor.rb', line 4
def self.delivering_email(message)
require 'mail/dkim_field'
if message['DKIM-Signature']
warn "WARNING: Dkim::Interceptor given a message with an existing signature, which it has replaced."
warn "If you really want to add a second signature to the message, you should be using the dkim gem directly."
message['DKIM-Signature'] = nil
end
dkim_signature = SignedMail.new(message.encoded)..value
message..fields.unshift Mail::DkimField.new(dkim_signature)
message
end
|