rubymta 0.0.12 → 0.0.13

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: 9f2f695c59541a20a8e34337ba317ed506f133cd
4
- data.tar.gz: c8c8a8de990c8c5be242d9ebfd0045752412acb6
3
+ metadata.gz: 2300f8a4d7ef99c5500ef87f19bb71f41b5c97da
4
+ data.tar.gz: 096043e53d78adaa7c639dbe721f5a5e33c6c026
5
5
  SHA512:
6
- metadata.gz: 9278791fe76b519f1346170f53bdecd9d49c7016e932db7d3efdb9525c6482ae14d214303c40c8f1e4da2c2d78aeb3771e2db3a605755fb8724f2863ea679532
7
- data.tar.gz: 95803e0c36063ec5b425cf374b345d547f7db38084be49eba421694798039e235b5172951d97803d9a5918ef76c77226db06726f78e48a7e8b4a14603537c746
6
+ metadata.gz: 44aff1177adcf639cc6c4b16ef5efe14f7fb65ea8b77ef6e60a47a5fa0a52b75a33e37f0236d54a8c5edfabfa1793d735eab7aee99c04cb5e386a94ff400b940
7
+ data.tar.gz: d84934a81e7f623e57fb9b808231208fe0b99a46c7be36b57979af124b328196bb79178747f4b403ffe728a1137aa9f63b400c8b82564484b2cae612cd1b5633
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # v0.0.13
2
+
3
+ * Removed code (by commenting it out) that saves partially received emails. I originally added it to help see what *exactly* spammers were sending that caused program faults. In my opinion, it's no longer needed.
4
+ * Added code to call Spam Assassin just before saving. If you have spamassassin installed and you want to use it, add `
5
+ SpamAssassinInstalled = true` to your config.rb. (I added it in mine after `MailQueue` in `# item of mail configuration`.
6
+
7
+
1
8
  # v0.0.12
2
9
 
3
10
  * Fixed the `send_text` in `QueueRunner` to not echo the data into the log when `LogQueueRunnerConversation` is set to `true`.
@@ -1,5 +1,6 @@
1
1
  require_relative 'base-x'
2
2
  require_relative 'deepclone'
3
+ require 'open3'
3
4
  require "./config" # config.rb is in user space
4
5
 
5
6
  class SaveError < StandardError; end
@@ -97,7 +98,10 @@ class ItemOfMail < Hash
97
98
  f.write("#{tmp.lines.count}\n")
98
99
  f.write(tmp)
99
100
  f.write("\n")
100
- f.write(text.join("\n"))
101
+ text_out = text_in = text.join("\n")
102
+ text_out, e, s = Open3.capture3("spamc", :stdin_data=>text_in) if defined?(SpamAssassinInstalled)
103
+ LOG.error(self[:mail_id]) {e} unless e.empty?
104
+ f.write(text_out)
101
105
  end
102
106
  self[:saved] = true
103
107
  rescue => e
@@ -246,6 +246,7 @@ class Receiver
246
246
  (LOG.info(@mail[:mail_id]) { "Received Mail:\n#{@mail.pretty_inspect}" }) if DumpMailIntoLog
247
247
 
248
248
  ensure
249
+ =begin # this is debugging logic
249
250
  # make sure the incoming email is saved, in case there was a receive error;
250
251
  # otherwise, it gets saved just before the "250 OK" in the DATA section
251
252
  if @mail && !@mail[:saved]
@@ -259,6 +260,7 @@ class Receiver
259
260
  LOG.error(@mail[:mail_id]) {"#{ServerName} error: unable to save queue id=#{@mail[:mail_id]}"}
260
261
  end
261
262
  end
263
+ =end
262
264
 
263
265
  # run the mail queue queue runner now, if it's not running already
264
266
  ok = nil
@@ -1,5 +1,5 @@
1
1
  module Version
2
- VERSION = "0.0.12"
3
- MODIFIED = "2017-10-25"
2
+ VERSION = "0.0.13"
3
+ MODIFIED = "2017-10-29"
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.12
4
+ version: 0.0.13
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-25 00:00:00.000000000 Z
11
+ date: 2017-10-29 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.