Sha256: f8c80834377610d833e632863dd72db689bbadfade4440878577d465f373346d

Contents?: true

Size: 539 Bytes

Versions: 3

Compression:

Stored size: 539 Bytes

Contents

#!/usr/bin/ruby
# Reads an email in from standard input and tries to verify it
require "dkim"

# read the email
verifier = DKIM::Verifier.new
STDIN.each_line do |line|
  verifier.feed(line)
end

# grab the list of signatures found
signatures = verifier.finish

# display the results
if signatures.empty?
  puts "No signatures found!"
else
  signatures.each do |signature|
    dnsname = "#{signature.selector}._domainkey.#{signature.domain}"
    puts "signature: #{dnsname} passed? #{signature.passed?}"
    puts signature.inspect
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
iragsdale-rubydkim-0.2 bin/dkim_verify.rb
rubydkim-0.3.1 bin/dkim_verify.rb
iragsdale-rubydkim-0.3 bin/dkim_verify.rb