--Multipart_Fri_Aug_11_15:44:09_2006-1
Content-Type: text/plain; charset=ISO-2022-JP

西山和広です。

>>> Thu, 10 Aug 2006 11:23:38 +0900 の刻に
>>> yahatah / agr.kyushu-u.ac.jp("Hisashi Yahata") 氏曰く
> 
> 解説をいただきましたが、まだ理解できない内容です。
> 結論的には、rubyを1.9に更新しても、portF5では、SMTP over SSLではつながらな
> い可が高いということでしょうか。
> ややがっかりですが、試してみる価値はあるでしょう。

1.9のnet/smtp.rbを1.9のnet/pop.rbを参考にして、
SMTP over SSLにも対応させてみました。

localhostのpostfixに以下のスクリプトで接続茲襪海箸
確認しています。

本当は証明鮖慊蠅靴進が良いのですが;滝閭瘡蓖鵑造箸いΔ海箸
nilにして検証を省略しています。


#!/usr/bin/ruby

require 'net/smtp'

def smtp_test(host, port, authtype, use_ssl_tls)
  p [host, port]
  smtp  et::SMTP.new(host, port)
  smtp.set_debug_output($stderr)
  case use_ssl_tls
  when :ssl
    smtp.enable_ssl(nil)
  when :tls
    smtp.enable_tls(nil)
  end
  smtp.start('localhost', 'testuser', 'testpass', authtype) do |smtp|
  end
rescue Net::SMTPAuthenticationError, Net::SMTPUnknownError
  p $!
end

if __FILE__ $0
  host  192.168.0.43'
  [
   [25, false],
   [465, :ssl],
   [587, :tls],
  ].each do |port, use_ssl_tls|
    [
     :plain,
     :login,
     :cram_md5,
    ].each do |authtype|
      smtp_test(host, port, authtype, use_ssl_tls)
    end
  end
end



1.9のnet/smtp.rbをままだと、[ruby-dev:29240]の
ordの件にひっかかってしまうのはどうするのがいいんでしょうか?


-- 
|ZnZ(ゼット エヌ ゼット)
|西山和広(Kazuhiro NISHIYAMA)

--Multipart_Fri_Aug_11_15:44:09_2006-1
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="smtp.rb"
Content-Transfer-Encoding: base64

IyA9IG5ldC9zbXRwLnJiCiMgCiMgQ29weXJpZ2h0IChjKSAxOTk5LTIwMDQgWXVraWhpcm8gTWF0
c3Vtb3RvLgojCiMgQ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n
cykKICAgICAgcmVjdl9yZXNwb25zZSgpCiAgICBlbmQKCiAgICBkZWYgcmVjdl9yZXNwb25zZQog
ICAgICByZXMgPSAnJwogICAgICB3aGlsZSB0cnVlCiAgICAgICAgbGluZSA9IEBzb2NrZXQucmVh
ZGxpbmUKICAgICAgICByZXMgPDwgbGluZSA8PCAiXG4iCiAgICAgICAgYnJlYWsgdW5sZXNzIGxp
bmVbM10gPT0gPy0gICAjICIyMTAtUElQRUxJTklORyIKICAgICAgZW5kCiAgICAgIHJlcwogICAg
ZW5kCgogICAgZGVmIGNoZWNrX3Jlc3BvbnNlKHJlcywgYWxsb3dfY29udGludWUgPSBmYWxzZSkK
ICAgICAgcmV0dXJuIHJlcyBpZiAvXEEyLyA9PT0gcmVzCiAgICAgIHJldHVybiByZXMgaWYgYWxs
b3dfY29udGludWUgYW5kIC9cQTMvID09PSByZXMKICAgICAgZXJyID0gY2FzZSByZXMKICAgICAg
ICAgICAgd2hlbiAvXEE0LyAgdGhlbiBTTVRQU2VydmVyQnVzeQogICAgICAgICAgICB3aGVuIC9c
QTUwLyB0aGVuIFNNVFBTeW50YXhFcnJvcgogICAgICAgICAgICB3aGVuIC9cQTU1LyB0aGVuIFNN
VFBGYXRhbEVycm9yCiAgICAgICAgICAgIGVsc2UgU01UUFVua25vd25FcnJvcgogICAgICAgICAg
ICBlbmQKICAgICAgcmFpc2UgZXJyLCByZXMKICAgIGVuZAoKICAgIGRlZiBjcml0aWNhbCgmYmxv
Y2spCiAgICAgIHJldHVybiAnMjAwIGR1bW15IHJlcGx5IGNvZGUnIGlmIEBlcnJvcl9vY2N1cmVk
CiAgICAgIGJlZ2luCiAgICAgICAgcmV0dXJuIHlpZWxkKCkKICAgICAgcmVzY3VlIEV4Y2VwdGlv
bgogICAgICAgIEBlcnJvcl9vY2N1cmVkID0gdHJ1ZQogICAgICAgIHJhaXNlCiAgICAgIGVuZAog
ICAgZW5kCgogICAgZGVmIGxvZ2dpbmcobXNnKQogICAgICBAZGVidWdfb3V0cHV0IDw8IG1zZyAr
ICJcbiIgaWYgQGRlYnVnX291dHB1dAogICAgZW5kCgogIGVuZCAgICMgY2xhc3MgU01UUAoKICBT
TVRQU2Vzc2lvbiA9IFNNVFAKCmVuZCAgICMgbW9kdWxlIE5ldAo-Multipart_Fri_Aug_11_15:44:09_2006-1--