Sha256: 32912121f6b19fed469e947c925f55207a6b6ea67b957638f185424c59fada04

Contents?: true

Size: 417 Bytes

Versions: 1

Compression:

Stored size: 417 Bytes

Contents

#!/usr/bin/ruby

if ARGV.length != 2 && ARGV.length != 3
  puts "Usage: dkimsign.rb SELECTOR KEYFILE [MAILFILE]"
  exit 0
end

require 'dkim'

selector, keyfile,mailfile = ARGV

keyfile  = File.open(keyfile)
mailfile = mailfile ? File.open(mailfile) : STDIN

mail = mailfile.read.gsub(/\r?\n/, "\r\n")
key  = keyfile.read

Dkim::selector    = selector
Dkim::private_key = key

print Dkim::SignedMail.new(mail).to_s


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dkim-0.0.1 bin/dkimsign.rb