mail_autoconfig_revived 0.0.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.
Files changed (197) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +4 -0
  3. data/.standard.yml +2 -0
  4. data/.yardopts +1 -0
  5. data/Gemfile +4 -0
  6. data/Gemfile.lock +80 -0
  7. data/LICENSE.txt +26 -0
  8. data/README.md +62 -0
  9. data/Rakefile +38 -0
  10. data/doc/MailAutoconfig/ClientConfig.html +1418 -0
  11. data/doc/MailAutoconfig/EmailAddress.html +651 -0
  12. data/doc/MailAutoconfig/IncomingServer.html +155 -0
  13. data/doc/MailAutoconfig/OutgoingServer.html +155 -0
  14. data/doc/MailAutoconfig/Server.html +972 -0
  15. data/doc/MailAutoconfig.html +428 -0
  16. data/doc/_index.html +182 -0
  17. data/doc/class_list.html +51 -0
  18. data/doc/css/common.css +1 -0
  19. data/doc/css/full_list.css +58 -0
  20. data/doc/css/style.css +497 -0
  21. data/doc/file.README.html +134 -0
  22. data/doc/file_list.html +56 -0
  23. data/doc/frames.html +17 -0
  24. data/doc/index.html +134 -0
  25. data/doc/js/app.js +314 -0
  26. data/doc/js/full_list.js +216 -0
  27. data/doc/js/jquery.js +4 -0
  28. data/doc/method_list.html +315 -0
  29. data/doc/top-level-namespace.html +110 -0
  30. data/ispdb_data/126.com.xml +21 -0
  31. data/ispdb_data/163.com.xml +21 -0
  32. data/ispdb_data/1und1.de.xml +75 -0
  33. data/ispdb_data/a1.net.xml +22 -0
  34. data/ispdb_data/active24.com.xml +36 -0
  35. data/ispdb_data/alice.it.xml +30 -0
  36. data/ispdb_data/aol.com.xml +76 -0
  37. data/ispdb_data/arcor.de.xml +68 -0
  38. data/ispdb_data/arubapec.it.xml +34 -0
  39. data/ispdb_data/att.net.xml +34 -0
  40. data/ispdb_data/bay.wind.ne.jp.xml +28 -0
  41. data/ispdb_data/bb-niigata.jp.xml +22 -0
  42. data/ispdb_data/bell.net.xml +30 -0
  43. data/ispdb_data/biglobe.ne.jp.xml +23 -0
  44. data/ispdb_data/bigpond.com.xml +35 -0
  45. data/ispdb_data/bluewin.ch.xml +34 -0
  46. data/ispdb_data/blueyonder.co.uk.xml +38 -0
  47. data/ispdb_data/bol.com.br.xml +40 -0
  48. data/ispdb_data/broba.cc.xml +25 -0
  49. data/ispdb_data/btinternet.com.xml +35 -0
  50. data/ispdb_data/cc9.ne.jp.xml +21 -0
  51. data/ispdb_data/cek.ne.jp.xml +21 -0
  52. data/ispdb_data/centurylink.net.xml +57 -0
  53. data/ispdb_data/centurytel.net.xml +55 -0
  54. data/ispdb_data/cgl.ucsf.edu.xml +22 -0
  55. data/ispdb_data/charter.net.xml +34 -0
  56. data/ispdb_data/clio.ne.jp.xml +22 -0
  57. data/ispdb_data/clustermail.de.xml +58 -0
  58. data/ispdb_data/co1.wind.ne.jp.xml +25 -0
  59. data/ispdb_data/co2.wind.ne.jp.xml +25 -0
  60. data/ispdb_data/co3.wind.ne.jp.xml +25 -0
  61. data/ispdb_data/comcast.net.xml +54 -0
  62. data/ispdb_data/cox.net.xml +36 -0
  63. data/ispdb_data/cty-net.ne.jp.xml +35 -0
  64. data/ispdb_data/dan.wind.ne.jp.xml +28 -0
  65. data/ispdb_data/dd.iij4u.or.jp.xml +33 -0
  66. data/ispdb_data/df.eu.xml +42 -0
  67. data/ispdb_data/dondominio.com.xml +32 -0
  68. data/ispdb_data/earthlink.net.xml +35 -0
  69. data/ispdb_data/educa.madrid.org.xml +48 -0
  70. data/ispdb_data/elpasotel.net.xml +53 -0
  71. data/ispdb_data/email.it.xml +33 -0
  72. data/ispdb_data/emailsrvr.com.xml +22 -0
  73. data/ispdb_data/fastwebnet.it.xml +23 -0
  74. data/ispdb_data/francetelecom.fr.xml +35 -0
  75. data/ispdb_data/free.fr.xml +48 -0
  76. data/ispdb_data/freenet.de.xml +37 -0
  77. data/ispdb_data/gandi.net.xml +58 -0
  78. data/ispdb_data/gigahost.dk.xml +32 -0
  79. data/ispdb_data/gmx.com.xml +72 -0
  80. data/ispdb_data/gmx.net.xml +66 -0
  81. data/ispdb_data/go.tvm.ne.jp.xml +22 -0
  82. data/ispdb_data/goneo.de.xml +56 -0
  83. data/ispdb_data/goo.jp.xml +22 -0
  84. data/ispdb_data/googlemail.com.xml +79 -0
  85. data/ispdb_data/gransy.com.xml +62 -0
  86. data/ispdb_data/hal.ne.jp.xml +22 -0
  87. data/ispdb_data/hana.or.jp.xml +22 -0
  88. data/ispdb_data/hotmail.com.xml +148 -0
  89. data/ispdb_data/i.softbank.jp.xml +22 -0
  90. data/ispdb_data/ic-net.or.jp.xml +22 -0
  91. data/ispdb_data/iijmio-mail.jp.xml +26 -0
  92. data/ispdb_data/iiyama-catv.ne.jp.xml +21 -0
  93. data/ispdb_data/inbox.lv.xml +57 -0
  94. data/ispdb_data/inet-shibata.or.jp.xml +22 -0
  95. data/ispdb_data/internode.on.net.xml +32 -0
  96. data/ispdb_data/ipax.at.xml +28 -0
  97. data/ispdb_data/iwafune.ne.jp.xml +22 -0
  98. data/ispdb_data/janis.or.jp.xml +23 -0
  99. data/ispdb_data/jet.ne.jp.xml +37 -0
  100. data/ispdb_data/ji.jet.ne.jp.xml +22 -0
  101. data/ispdb_data/kabelmail.de.xml +43 -0
  102. data/ispdb_data/kelcom.net.xml +21 -0
  103. data/ispdb_data/kl.wind.ne.jp.xml +32 -0
  104. data/ispdb_data/kokuyou.ne.jp.xml +21 -0
  105. data/ispdb_data/kpnmail.nl.xml +69 -0
  106. data/ispdb_data/laposte.net.xml +37 -0
  107. data/ispdb_data/libero.it.xml +34 -0
  108. data/ispdb_data/mahoroba.ne.jp.xml +22 -0
  109. data/ispdb_data/mail.com.xml +248 -0
  110. data/ispdb_data/mail.dk.xml +30 -0
  111. data/ispdb_data/mail.ee.xml +54 -0
  112. data/ispdb_data/mail.iwafune.ne.jp.xml +22 -0
  113. data/ispdb_data/mail.ru.xml +72 -0
  114. data/ispdb_data/mail.telenor.dk.xml +121 -0
  115. data/ispdb_data/mail.wind.ne.jp.xml +29 -0
  116. data/ispdb_data/me.com.xml +24 -0
  117. data/ispdb_data/messagingengine.com.xml +35 -0
  118. data/ispdb_data/ml.murakami.ne.jp.xml +22 -0
  119. data/ispdb_data/mnet.ne.jp.xml +48 -0
  120. data/ispdb_data/mopera.net.xml +50 -0
  121. data/ispdb_data/mx1.tiki.ne.jp.xml +54 -0
  122. data/ispdb_data/nifty.com.xml +22 -0
  123. data/ispdb_data/nsat.jp.xml +22 -0
  124. data/ispdb_data/ntlworld.com.xml +38 -0
  125. data/ispdb_data/o2.pl.xml +47 -0
  126. data/ispdb_data/ocn.ne.jp.xml +23 -0
  127. data/ispdb_data/office365.com.xml +55 -0
  128. data/ispdb_data/one.com.xml +22 -0
  129. data/ispdb_data/one.cz.xml +29 -0
  130. data/ispdb_data/onet.pl.xml +55 -0
  131. data/ispdb_data/outlook.com.xml +54 -0
  132. data/ispdb_data/ovh.net.xml +32 -0
  133. data/ispdb_data/pal.kijimadaira.jp.xml +21 -0
  134. data/ispdb_data/parabox.or.jp.xml +22 -0
  135. data/ispdb_data/pdx.edu.xml +41 -0
  136. data/ispdb_data/peoplepc.com.xml +29 -0
  137. data/ispdb_data/po.dcn.ne.jp.xml +21 -0
  138. data/ispdb_data/po.wind.ne.jp.xml +28 -0
  139. data/ispdb_data/pobox.com.xml +53 -0
  140. data/ispdb_data/pop.shibata.ne.jp.xml +23 -0
  141. data/ispdb_data/posteo.de.xml +25 -0
  142. data/ispdb_data/ptd.net.xml +53 -0
  143. data/ispdb_data/q.com.xml +53 -0
  144. data/ispdb_data/qq.com.xml +21 -0
  145. data/ispdb_data/rambler.ru.xml +35 -0
  146. data/ispdb_data/rr.com.xml +30 -0
  147. data/ispdb_data/runestone.net.xml +26 -0
  148. data/ispdb_data/sakunet.ne.jp.xml +21 -0
  149. data/ispdb_data/sapo.pt.xml +37 -0
  150. data/ispdb_data/schwaz.net.xml +49 -0
  151. data/ispdb_data/seznam.cz.xml +32 -0
  152. data/ispdb_data/sfr.fr.xml +33 -0
  153. data/ispdb_data/sky.com.xml +35 -0
  154. data/ispdb_data/skynet.be.xml +35 -0
  155. data/ispdb_data/so.wind.ne.jp.xml +25 -0
  156. data/ispdb_data/strato.de.xml +43 -0
  157. data/ispdb_data/studenti.univr.it.xml +37 -0
  158. data/ispdb_data/t-online.de.xml +56 -0
  159. data/ispdb_data/terra.es.xml +29 -0
  160. data/ispdb_data/thinline.cz.xml +60 -0
  161. data/ispdb_data/tiki.ne.jp.xml +24 -0
  162. data/ispdb_data/tiscali.cz.xml +25 -0
  163. data/ispdb_data/tiscali.it.xml +31 -0
  164. data/ispdb_data/umich.edu.xml +32 -0
  165. data/ispdb_data/uol.com.br.xml +42 -0
  166. data/ispdb_data/verizon.net.xml +21 -0
  167. data/ispdb_data/versatel.de.xml +43 -0
  168. data/ispdb_data/virgin.net.xml +38 -0
  169. data/ispdb_data/virginmedia.com.xml +35 -0
  170. data/ispdb_data/vm.aikis.or.jp.xml +22 -0
  171. data/ispdb_data/vp.tiki.ne.jp.xml +24 -0
  172. data/ispdb_data/web.de.xml +55 -0
  173. data/ispdb_data/webhuset.no.xml +42 -0
  174. data/ispdb_data/websupport.sk.xml +50 -0
  175. data/ispdb_data/wildwestdomains.com.xml +37 -0
  176. data/ispdb_data/wp.pl.xml +34 -0
  177. data/ispdb_data/xp.wind.jp.xml +24 -0
  178. data/ispdb_data/xtra.co.nz.xml +22 -0
  179. data/ispdb_data/yahoo.co.jp.xml +22 -0
  180. data/ispdb_data/yahoo.com.xml +84 -0
  181. data/ispdb_data/yandex.ru.xml +49 -0
  182. data/ispdb_data/ybb.ne.jp.xml +22 -0
  183. data/ispdb_data/yeah.net.xml +21 -0
  184. data/ispdb_data/zeelandnet.nl.xml +29 -0
  185. data/ispdb_data/ziggo.nl.xml +46 -0
  186. data/ispdb_data/zoho.com.xml +62 -0
  187. data/lib/mail_autoconfig/client_config.rb +113 -0
  188. data/lib/mail_autoconfig/email_address.rb +52 -0
  189. data/lib/mail_autoconfig/server.rb +72 -0
  190. data/lib/mail_autoconfig/version.rb +4 -0
  191. data/lib/mail_autoconfig.rb +33 -0
  192. data/mail_autoconfig_revived.gemspec +25 -0
  193. data/test/client_config_test.rb +45 -0
  194. data/test/email_address_test.rb +49 -0
  195. data/test/examples/client_config_yahoo.xml +40 -0
  196. data/test/server_test.rb +89 -0
  197. metadata +336 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 806e499278fbd9016a1edb1fbb8432baff4205dd03ed3a70ad926c96e4847e75
4
+ data.tar.gz: 316cbcd6d68bf77819ce31b8e12319cdf17c19bcc74884e62630bbdda96325c6
5
+ SHA512:
6
+ metadata.gz: '044818760b79a98fb8068995c6f5a0681c6b6f612a739d45619832f7dd65e9a51a45a816a9347cf50fe01814447460b9bde487c96ea7f774f631a62734d5e36b'
7
+ data.tar.gz: a2b5a453cf7d04d35a1aab9e4d2bdf18f6e9b96d2af08da0422a7fd6f084e00cd2d58ae4ecef7cce8e68bfc430c7add8b7af87e5c5625a61fd5d7a70bb6430fd
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ .DS_Store
2
+ /.tags
3
+ /.tags_sorted_by_file
4
+ /.yardoc/
data/.standard.yml ADDED
@@ -0,0 +1,2 @@
1
+ ignore:
2
+ - 'ispdb_data/**/*'
data/.yardopts ADDED
@@ -0,0 +1 @@
1
+ --markup=markdown
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in mail_autoconfig.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,80 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ mail_autoconfig_revived (0.0.3)
5
+ faraday (~> 2.7)
6
+ nokogiri (~> 1.15)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ ast (2.4.2)
12
+ base64 (0.2.0)
13
+ faraday (2.7.11)
14
+ base64
15
+ faraday-net_http (>= 2.0, < 3.1)
16
+ ruby2_keywords (>= 0.0.4)
17
+ faraday-net_http (3.0.2)
18
+ json (2.6.3)
19
+ language_server-protocol (3.17.0.3)
20
+ lint_roller (1.1.0)
21
+ mini_portile2 (2.8.5)
22
+ nokogiri (1.15.4)
23
+ mini_portile2 (~> 2.8.2)
24
+ racc (~> 1.4)
25
+ parallel (1.23.0)
26
+ parser (3.2.2.4)
27
+ ast (~> 2.4.1)
28
+ racc
29
+ racc (1.7.3)
30
+ rainbow (3.1.1)
31
+ rake (13.1.0)
32
+ redcarpet (3.6.0)
33
+ regexp_parser (2.8.2)
34
+ rexml (3.2.6)
35
+ rubocop (1.57.2)
36
+ json (~> 2.3)
37
+ language_server-protocol (>= 3.17.0)
38
+ parallel (~> 1.10)
39
+ parser (>= 3.2.2.4)
40
+ rainbow (>= 2.2.2, < 4.0)
41
+ regexp_parser (>= 1.8, < 3.0)
42
+ rexml (>= 3.2.5, < 4.0)
43
+ rubocop-ast (>= 1.28.1, < 2.0)
44
+ ruby-progressbar (~> 1.7)
45
+ unicode-display_width (>= 2.4.0, < 3.0)
46
+ rubocop-ast (1.30.0)
47
+ parser (>= 3.2.1.0)
48
+ rubocop-performance (1.19.1)
49
+ rubocop (>= 1.7.0, < 2.0)
50
+ rubocop-ast (>= 0.4.0)
51
+ ruby-progressbar (1.13.0)
52
+ ruby2_keywords (0.0.5)
53
+ standard (1.32.0)
54
+ language_server-protocol (~> 3.17.0.2)
55
+ lint_roller (~> 1.0)
56
+ rubocop (~> 1.57.2)
57
+ standard-custom (~> 1.0.0)
58
+ standard-performance (~> 1.2)
59
+ standard-custom (1.0.2)
60
+ lint_roller (~> 1.0)
61
+ rubocop (~> 1.50)
62
+ standard-performance (1.2.1)
63
+ lint_roller (~> 1.1)
64
+ rubocop-performance (~> 1.19.1)
65
+ unicode-display_width (2.5.0)
66
+ yard (0.9.34)
67
+
68
+ PLATFORMS
69
+ ruby
70
+
71
+ DEPENDENCIES
72
+ bundler (~> 2.4)
73
+ mail_autoconfig_revived!
74
+ rake (~> 13.1)
75
+ redcarpet (~> 3.6)
76
+ standard (~> 1.32)
77
+ yard (~> 0.9)
78
+
79
+ BUNDLED WITH
80
+ 2.4.22
data/LICENSE.txt ADDED
@@ -0,0 +1,26 @@
1
+ Copyright (c) 2023 Bijan Rahnema
2
+ Copyright (c) 2014 Dan Wentworth
3
+
4
+ MIT License
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining
7
+ a copy of this software and associated documentation files (the
8
+ "Software"), to deal in the Software without restriction, including
9
+ without limitation the rights to use, copy, modify, merge, publish,
10
+ distribute, sublicense, and/or sell copies of the Software, and to
11
+ permit persons to whom the Software is furnished to do so, subject to
12
+ the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be
15
+ included in all copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24
+
25
+
26
+ Includes the Mozilla ISPDb, which is public domain (http://creativecommons.org/licenses/publicdomain/)
data/README.md ADDED
@@ -0,0 +1,62 @@
1
+ # Mail Autoconfig Revived
2
+
3
+ This fork revives mail_autoconfig for my Email-API [Sunnybox.io](https://sunnybox.io).
4
+ It has been updated to support the latest Mozilla ISPDB location and format.
5
+ I plan on adding new features like DNS SRV Records and general DNS lookups.
6
+ ---
7
+
8
+ A ruby gem to detect and parse any Thunderbird autoconfig file for a domain. Includes a copy of the Mozilla ISPDB (Nov 2023).
9
+
10
+ For general information about autoconf visit (https://developer.mozilla.org/en-US/docs/Mozilla/Thunderbird/Autoconfiguration),
11
+ for the autoconfig schema you should have a look at (https://wiki.mozilla.org/Thunderbird:Autoconfiguration:ConfigFileFormat).
12
+
13
+ Although I've tried to keep parsing as accurate as possible, there may be omissions or errors. Please feel free
14
+ to submit a patch in these cases.
15
+
16
+ ## Installation
17
+
18
+ Add this line to your application's Gemfile:
19
+
20
+ gem 'mail_autoconfig_revived'
21
+
22
+ And then execute:
23
+
24
+ $ bundle
25
+
26
+ Or install it yourself as:
27
+
28
+ $ gem install mail_autoconfig_revived
29
+
30
+ ## Usage
31
+
32
+ Generally, you just want to get any associated configuration for an email address. In this case we'll use
33
+ 'example@gmail.com'.
34
+
35
+ ```ruby
36
+ client_config = MailAutoconfig::for_address('example@gmail.com')
37
+ client_config.short_name
38
+ => "GMail"
39
+ outbound_server = client_config.outgoing_servers.first
40
+ outbound_server.protocol
41
+ => "smtp"
42
+ outnound_server.hostname
43
+ => "smtp.googlemail.com"
44
+ ```
45
+
46
+ When searching for a configuration, autoconfig first looks to it's local database for the domain of the address,
47
+ if this fails it will check `http://autoconfig.#{domain}/mail/config-v1.1.xml` and then
48
+ `http://#{domain}/.well-known/autoconfig/mail/config-v1.1.xml`. If both of these fail, Autoconfig will then look up
49
+ the MX records for the address, and perform the same searches on the domain of the primary MX record.
50
+
51
+ ### Updating the database
52
+ You may wish to update the database at some point to fetch the latest from Mozilla's ISPDB,
53
+ just run the rake task `rake fetch_ispdb`.
54
+
55
+ ## Contributing
56
+
57
+ 1. Fork it ( https://github.com/gobijan/mail-autoconfig-revived/fork )
58
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
59
+ 2. Run the test suite, check out haven't broken anything (`bundle exec rspec spec`)
60
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
61
+ 4. Push to the branch (`git push origin my-new-feature`)
62
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,38 @@
1
+ require "bundler/gem_tasks"
2
+ require "mail_autoconfig"
3
+ require "minitest/test_task"
4
+ require "fileutils"
5
+
6
+ # desc "Checkout the latest copy of the mozilla ispdb"
7
+ # task :fetch_ispdb do
8
+ # svn_url = MailAutoconfig.ispdb_url
9
+ # local_path = MailAutoconfig.local_ispdb_path
10
+ # puts "Exporting..."
11
+ # `svn export --force #{svn_url} #{local_path}`
12
+ # `rm #{local_path}/README`
13
+ # end
14
+
15
+ desc "Checkout the latest copy of the mozilla ispdb from GitHub"
16
+ task :fetch_ispdb do
17
+ repo_url = MailAutoconfig.ispdb_github_url
18
+ local_path = MailAutoconfig.local_ispdb_path
19
+ temp_clone_path = File.join(local_path, "temp_autoconfig_clone")
20
+ ispdb_dir = "ispdb"
21
+
22
+ puts "Cloning repository to temporary location..."
23
+ FileUtils.rm_rf(temp_clone_path) if Dir.exist?(temp_clone_path)
24
+ system("git clone --depth 1 #{repo_url} #{temp_clone_path}")
25
+
26
+ # Copying the ispdb directory contents to the local path
27
+ FileUtils.mkdir_p(local_path) unless Dir.exist?(local_path)
28
+ source_path = File.join(temp_clone_path, ispdb_dir)
29
+ FileUtils.cp_r(Dir.glob("#{source_path}/*"), local_path)
30
+
31
+ # Cleanup: Removing the temporary clone
32
+ FileUtils.rm_rf(temp_clone_path)
33
+
34
+ puts "The latest copy of ispdb has been fetched to #{local_path}"
35
+ end
36
+
37
+ Minitest::TestTask.create # named test, sensible defaults
38
+ task default: :test