rubymta 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 87cbfaf3b9718feb0968b30d487bd36c528d4718
4
- data.tar.gz: b1e46f9bb97fc3d3ef43a0d3a003001f1794bfe7
3
+ metadata.gz: 5bdfc3b08cef62adc0c3dd94734b329bbb66b965
4
+ data.tar.gz: f1958ebd5cd0bc24c3614684b48183abc367648b
5
5
  SHA512:
6
- metadata.gz: 97c704a3036488d6b665f95f181e35f363c0696ca6ee1fe397d1740a5a26df02f1c184b183c0f185c8e3c68cc989fdbd8eeb13f3a7aacf4cc16cb5942819ae1b
7
- data.tar.gz: 56083c4d14f72bc6640fe8dffe120c4370f84e999bc7c1a7e5b2cb27079b96b46f6259bc069c34618f88f8373a21b666678ff8a0a3cd2d9a987ca50cc95c57d6
6
+ metadata.gz: f68f8e2369d32a6275b05ceb741887e48dbb41c3e39515a100069968a59f46d94d7041160b8ffeebd653b13e130d340bab63a2f230ba9175ac5f42cb847f46b6
7
+ data.tar.gz: 70aad9ee52184c6b29015c6b0d8774569deed6155fa640188f6ad423529825181550e6f6112970b9aa045bfebb0f46cc405b80649cb9e71ad1d9f8e969da2047
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # v0.0.7
2
+
3
+ * In `Receiver#starttls` I added a `begin` block to catch errors I believe are caused by spammers sending random data as a certificate. It's open at this moment, `rescue => e`, but as soon as I discover what the spammers are doing, I'll tighten this up by specifying the proper exception.
4
+ * I modified the "authentication mechanism not supported" message to add "use TLS and PLAIN." The LOGIN authentication will be added eventually, but it has been replaced by TLS+PLAIN in practice. The EHLO response specifies that only PLAIN is accepted, so if a sender uses LOGIN, it's not a commercial server, but a spammer.
5
+ * The README.md was updated with the app I use to drive queue_runner.
6
+
7
+
1
8
  # v0.0.6
2
9
 
3
10
  * Replaced a call to a legacy method 'add_block' to the proper method 'violation'. This bug only activated if the sender slammed the connection shut during the data block transfer.
data/README.md CHANGED
@@ -60,6 +60,51 @@ I use Linux Mint, but any linux will work. I don't use Windows, so if you want t
60
60
  * It can deliver locally via LMTP (for Dovecot) or remotely via a remote server.
61
61
  * You can program your own app to use `queue_runner` or write your own queue runner.
62
62
 
63
+ The little app I use to run the queue manually (or with crontab) looks like this:
64
+
65
+ ```ruby
66
+ #! /usr/bin/ruby
67
+
68
+ # Set up the $app hash for systemwide parameters
69
+ $app = {}
70
+ $app[:path] = Dir::pwd
71
+ $app[:mode] = ENV['MODE']
72
+
73
+ require 'sequel'
74
+ require 'sqlite3'
75
+ require 'rubymta/queue_runner'
76
+ require 'rubymta/item_of_mail'
77
+
78
+ # Make sure the MODE environmental variable is valid
79
+ if ['dev','live'].index(ENV['MODE']).nil?
80
+ msg = "Environmental variable MODE not set properly--must be dev or live"
81
+ LOG.fatal(msg)
82
+ puts msg
83
+ exit(1)
84
+ end
85
+
86
+ require_relative 'config'
87
+ include Config
88
+
89
+ # get setup and open the log
90
+ LOG = Logger::new(LogPathAndFile, LogFileLife)
91
+ LOG.formatter = proc do |severity, datetime, progname, msg|
92
+ pname = if progname then '('+progname+') ' else nil end
93
+ "#{datetime.strftime("%Y-%m-%d %H:%M:%S")} [#{severity}] #{pname}#{msg}\n"
94
+ end
95
+
96
+ # This changed as of Sequel v.4.40.0
97
+ # This is false by default, but was supposed to be
98
+ # true by default so we have to forcefully set it
99
+ Sequel.split_symbols = true
100
+
101
+ # Open the sqlite3 database for rubymta use
102
+ S3DB = Sequel.connect("sqlite://#{S3DBPath}")
103
+ LOG.info("Database '#{S3DBPath}' opened")
104
+
105
+ manually_run_queue_runner
106
+ ```
107
+
63
108
  ### TODO!
64
109
 
65
110
  * The queue runner is a very basic class. Bounce and forwarding need to be implemented. Since I add a rule to reject relays in my server, bounce messages only need to be delivered locally with LMTP. In a relaying server, bounce messages may be sent back to a remote sender; if that address is spoofed, and it turns out to be a trap address, your server will get blacklisted. Hence the rule: I don't relay. There is an example rule in the demo configuration which implements a "no relay" error message, and now you know why email admins don't allow relays anymore.
@@ -94,10 +94,7 @@ end
94
94
 
95
95
  # load the DKIM private key for this domain, if any
96
96
  $app[:dkim] = nil
97
- puts "--> *666* fn=>'#{$app[:path]}/#{DKIMPrivateKeyFile}'"
98
-
99
- File::open("#{$app[:path]}/#{DKIMPrivateKeyFile}", "r") { |f| $app[:dkim] = f.read } if DKIMPrivateKeyFile
100
- puts "--> *777* #{$app[:dkim]}"
97
+ File::open(DKIMPrivateKeyFile, "r") { |f| $app[:dkim] = f.read } if DKIMPrivateKeyFile
101
98
 
102
99
  # MAIN server class -- starts at Server#start
103
100
  class Server
@@ -1,5 +1,5 @@
1
1
  module Version
2
- VERSION = "0.0.7"
3
- MODIFIED = "2017-10-12"
2
+ VERSION = "0.0.8"
3
+ MODIFIED = "2017-10-13"
4
4
  end
5
5
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubymta
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael J. Welch, Ph.D.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-12 00:00:00.000000000 Z
11
+ date: 2017-10-13 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: RubyMta is an experimental mail transport agent written in Ruby. See
14
14
  the README.