postfix-xforward 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.rdoc +3 -3
- data/lib/postfix-xforward/smtp.rb +3 -4
- data/lib/postfix-xforward/utils.rb +1 -1
- data/lib/postfix-xforward/version.rb +1 -1
- metadata +3 -3
data/CHANGELOG.rdoc
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
= 0.1.
|
1
|
+
= 0.1.3, release 2010-08-26
|
2
2
|
|
3
|
-
* fixed #xtext to allow non-string arguments (returns
|
4
|
-
* fixed it so XFORWARD attribute
|
3
|
+
* fixed #xtext to allow non-string arguments (returns empty string)
|
4
|
+
* fixed it so that any provided XFORWARD attribute that are set to anything other than non-blank strings won't be sent
|
5
5
|
|
6
6
|
= 0.1.0, release 2010-08-19
|
7
7
|
|
@@ -247,16 +247,15 @@ module PostfixXForward
|
|
247
247
|
cmd = XCMD.dup
|
248
248
|
cap = capable_xforward_attrs
|
249
249
|
@xforward_attrs.each do |attr, value|
|
250
|
-
if cap.include?(attr)
|
251
|
-
|
252
|
-
tmp = " #{attr}=#{Utils.xtext(value)}"
|
250
|
+
if cap.include?(attr) and value.is_a?(String) and value.strip != ''
|
251
|
+
tmp = " #{attr}=#{Utils.xtext(value.strip)}"
|
253
252
|
if cmd.length + tmp.length > MAXLEN
|
254
253
|
getok(cmd)
|
255
254
|
cmd = XCMD.dup
|
256
255
|
end
|
257
256
|
cmd << tmp
|
258
257
|
else
|
259
|
-
logging("ignoring XFORWARD attribute '#{attr}': unsupported by server")
|
258
|
+
logging("ignoring XFORWARD attribute '#{attr}': unsupported by server or no valid value specified")
|
260
259
|
end
|
261
260
|
end
|
262
261
|
getok(cmd) if cmd != XCMD
|
@@ -2,7 +2,7 @@ module PostfixXForward
|
|
2
2
|
class Utils
|
3
3
|
# Convert the txt string to "xtext" as defined in RFC 1891
|
4
4
|
def Utils.xtext(txt)
|
5
|
-
return
|
5
|
+
return '' unless txt.respond_to?(:gsub)
|
6
6
|
txt.gsub(/[+=\x00-\x20\x7f-\xff]/) do |c|
|
7
7
|
"+#{c.unpack('H2').first.upcase}"
|
8
8
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: postfix-xforward
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 3
|
10
|
+
version: 0.1.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Kendall Gifford
|