Sha256: a62ac56a2ae91ce2ab1ae88c293c161bedc893ba8e2128e558fc329562a07fa3

Contents?: true

Size: 662 Bytes

Versions: 4

Compression:

Stored size: 662 Bytes

Contents

#!/usr/bin/ruby

require 'socket'
require 'optparse'
require 'yaml'

include Socket::Constants
include YAML

mail_sender = nil

opts=OptionParser.new do |o|
    o.on "-s SENDER", "--sender SENDER", 
         "Explicity specify SENDER as sender" do |sender|
        mail_sender = sender
    end
end

recipients = opts.parse ARGV

serverinfo = { 
    :sender => mail_sender,
    :recipients => recipients,
    :rulesfile => 
        File.expand_path(File.join(File.dirname(__FILE__), "..", "lib", 
                         "gurgitate-rules.rb")),
    :message => $stdin.read
}

s=UNIXSocket.new("/var/run/mailproxy/mailpsocket")
Marshal.dump serverinfo, s
s.close

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sugoi-mail-0.0.3 bin/mailc
sugoi-mail-0.0.0 bin/mailc
sugoi-mail-0.0.1 bin/mailc
sugoi-mail-0.0.2 bin/mailc