mail_autoconfig 0.0.1
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/.yardopts +1 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +39 -0
- data/LICENSE.txt +25 -0
- data/README.md +57 -0
- data/Rakefile +11 -0
- data/doc/MailAutoconfig/ClientConfig.html +1353 -0
- data/doc/MailAutoconfig/EmailAddress.html +572 -0
- data/doc/MailAutoconfig/IncomingServer.html +154 -0
- data/doc/MailAutoconfig/OutgoingServer.html +154 -0
- data/doc/MailAutoconfig/Server.html +807 -0
- data/doc/MailAutoconfig.html +424 -0
- data/doc/_index.html +185 -0
- data/doc/class_list.html +54 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +339 -0
- data/doc/file.README.html +135 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +26 -0
- data/doc/index.html +135 -0
- data/doc/js/app.js +219 -0
- data/doc/js/full_list.js +178 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +227 -0
- data/doc/top-level-namespace.html +112 -0
- data/ispdb_data/1und1.de +65 -0
- data/ispdb_data/abc.plala.or.jp +24 -0
- data/ispdb_data/agate.plala.or.jp +24 -0
- data/ispdb_data/alice.it +30 -0
- data/ispdb_data/amail.plala.or.jp +24 -0
- data/ispdb_data/amber.plala.or.jp +24 -0
- data/ispdb_data/aol.com +45 -0
- data/ispdb_data/apost.plala.or.jp +24 -0
- data/ispdb_data/aqua.plala.or.jp +24 -0
- data/ispdb_data/arcor.de +57 -0
- data/ispdb_data/arubapec.it +34 -0
- data/ispdb_data/att.net +34 -0
- data/ispdb_data/ballade.plala.or.jp +24 -0
- data/ispdb_data/bay.wind.ne.jp +28 -0
- data/ispdb_data/bb-niigata.jp +22 -0
- data/ispdb_data/beige.plala.or.jp +24 -0
- data/ispdb_data/biglobe.ne.jp +23 -0
- data/ispdb_data/bigpond.com +28 -0
- data/ispdb_data/blue.plala.or.jp +24 -0
- data/ispdb_data/bluemail.ch +31 -0
- data/ispdb_data/bluewin.ch +30 -0
- data/ispdb_data/bmail.plala.or.jp +24 -0
- data/ispdb_data/bol.com.br +40 -0
- data/ispdb_data/bolero.plala.or.jp +24 -0
- data/ispdb_data/bpost.plala.or.jp +24 -0
- data/ispdb_data/broba.cc +25 -0
- data/ispdb_data/brown.plala.or.jp +24 -0
- data/ispdb_data/camel.plala.or.jp +24 -0
- data/ispdb_data/cameo.plala.or.jp +24 -0
- data/ispdb_data/cc9.ne.jp +21 -0
- data/ispdb_data/cek.ne.jp +21 -0
- data/ispdb_data/cgl.ucsf.edu +22 -0
- data/ispdb_data/charter.com +52 -0
- data/ispdb_data/clio.ne.jp +22 -0
- data/ispdb_data/cmail.plala.or.jp +24 -0
- data/ispdb_data/co1.wind.ne.jp +25 -0
- data/ispdb_data/co2.wind.ne.jp +25 -0
- data/ispdb_data/co3.wind.ne.jp +25 -0
- data/ispdb_data/cocoa.plala.or.jp +24 -0
- data/ispdb_data/coda.plala.or.jp +24 -0
- data/ispdb_data/comcast.net +57 -0
- data/ispdb_data/concerto.plala.or.jp +24 -0
- data/ispdb_data/coral.plala.or.jp +24 -0
- data/ispdb_data/courante.plala.or.jp +24 -0
- data/ispdb_data/cox.net +36 -0
- data/ispdb_data/cpost.plala.or.jp +24 -0
- data/ispdb_data/cream.plala.or.jp +24 -0
- data/ispdb_data/dan.wind.ne.jp +28 -0
- data/ispdb_data/dance.plala.or.jp +24 -0
- data/ispdb_data/dd.iij4u.or.jp +33 -0
- data/ispdb_data/df.eu +33 -0
- data/ispdb_data/dmail.plala.or.jp +24 -0
- data/ispdb_data/earthlink.net +35 -0
- data/ispdb_data/ebony.plala.or.jp +24 -0
- data/ispdb_data/email.it +33 -0
- data/ispdb_data/email.plala.or.jp +24 -0
- data/ispdb_data/ewetel.de +23 -0
- data/ispdb_data/fantasy.plala.or.jp +24 -0
- data/ispdb_data/flamenco.plala.or.jp +24 -0
- data/ispdb_data/fmail.plala.or.jp +24 -0
- data/ispdb_data/francetelecom.fr +31 -0
- data/ispdb_data/free.fr +62 -0
- data/ispdb_data/freenet.de +56 -0
- data/ispdb_data/fuga.plala.or.jp +24 -0
- data/ispdb_data/gandi.net +58 -0
- data/ispdb_data/gmail.plala.or.jp +24 -0
- data/ispdb_data/gmx.com +72 -0
- data/ispdb_data/gmx.net +66 -0
- data/ispdb_data/go.tvm.ne.jp +22 -0
- data/ispdb_data/goneo.de +56 -0
- data/ispdb_data/goo.jp +22 -0
- data/ispdb_data/googlemail.com +52 -0
- data/ispdb_data/grape.plala.or.jp +24 -0
- data/ispdb_data/gray.plala.or.jp +24 -0
- data/ispdb_data/hal.ne.jp +22 -0
- data/ispdb_data/hana.or.jp +22 -0
- data/ispdb_data/hotmail.com +58 -0
- data/ispdb_data/i.softbank.jp +22 -0
- data/ispdb_data/ic-net.or.jp +22 -0
- data/ispdb_data/iijmio-mail.jp +26 -0
- data/ispdb_data/iiyama-catv.ne.jp +21 -0
- data/ispdb_data/imail.plala.or.jp +24 -0
- data/ispdb_data/inbox.lt +26 -0
- data/ispdb_data/inbox.lv +26 -0
- data/ispdb_data/indigo.plala.or.jp +24 -0
- data/ispdb_data/inet-shibata.or.jp +22 -0
- data/ispdb_data/internode.on.net +32 -0
- data/ispdb_data/ipax.at +28 -0
- data/ispdb_data/ivory.plala.or.jp +24 -0
- data/ispdb_data/iwafune.ne.jp +22 -0
- data/ispdb_data/jade.plala.or.jp +24 -0
- data/ispdb_data/janis.or.jp +23 -0
- data/ispdb_data/jet.ne.jp +29 -0
- data/ispdb_data/ji.jet.ne.jp +22 -0
- data/ispdb_data/jmail.plala.or.jp +24 -0
- data/ispdb_data/kabelmail.de +31 -0
- data/ispdb_data/kelcom.net +21 -0
- data/ispdb_data/khaki.plala.or.jp +24 -0
- data/ispdb_data/kl.wind.ne.jp +32 -0
- data/ispdb_data/kmail.plala.or.jp +24 -0
- data/ispdb_data/kokuyou.ne.jp +21 -0
- data/ispdb_data/lapis.plala.or.jp +24 -0
- data/ispdb_data/laposte.net +37 -0
- data/ispdb_data/lemon.plala.or.jp +24 -0
- data/ispdb_data/libero.it +34 -0
- data/ispdb_data/lilac.plala.or.jp +24 -0
- data/ispdb_data/lime.plala.or.jp +24 -0
- data/ispdb_data/mahoroba.ne.jp +22 -0
- data/ispdb_data/mail.com +248 -0
- data/ispdb_data/mail.dk +22 -0
- data/ispdb_data/mail.iwafune.ne.jp +22 -0
- data/ispdb_data/mail.ru +57 -0
- data/ispdb_data/mail.telenor.dk +121 -0
- data/ispdb_data/mail.wind.ne.jp +29 -0
- data/ispdb_data/maroon.plala.or.jp +24 -0
- data/ispdb_data/me.com +31 -0
- data/ispdb_data/minuet.plala.or.jp +24 -0
- data/ispdb_data/ml.murakami.ne.jp +22 -0
- data/ispdb_data/mnet.ne.jp +22 -0
- data/ispdb_data/mopera.net +50 -0
- data/ispdb_data/mozilla.com +23 -0
- data/ispdb_data/mx1.tiki.ne.jp +54 -0
- data/ispdb_data/navy.plala.or.jp +24 -0
- data/ispdb_data/nifty.com +22 -0
- data/ispdb_data/nsat.jp +22 -0
- data/ispdb_data/o2.pl +35 -0
- data/ispdb_data/olive.plala.or.jp +24 -0
- data/ispdb_data/onet.pl +38 -0
- data/ispdb_data/opal.plala.or.jp +24 -0
- data/ispdb_data/orange.plala.or.jp +24 -0
- data/ispdb_data/orchid.plala.or.jp +24 -0
- data/ispdb_data/ovh.net +32 -0
- data/ispdb_data/pal.kijimadaira.jp +21 -0
- data/ispdb_data/palette.plala.or.jp +24 -0
- data/ispdb_data/parabox.or.jp +22 -0
- data/ispdb_data/pdx.edu +41 -0
- data/ispdb_data/peach.plala.or.jp +24 -0
- data/ispdb_data/peoplepc.com +29 -0
- data/ispdb_data/plum.plala.or.jp +24 -0
- data/ispdb_data/po.dcn.ne.jp +21 -0
- data/ispdb_data/po.wind.ne.jp +28 -0
- data/ispdb_data/pobox.com +53 -0
- data/ispdb_data/polka.plala.or.jp +24 -0
- data/ispdb_data/pop.shibata.ne.jp +23 -0
- data/ispdb_data/posteo.de +25 -0
- data/ispdb_data/purple.plala.or.jp +24 -0
- data/ispdb_data/rainbow.plala.or.jp +24 -0
- data/ispdb_data/rambler.ru +35 -0
- data/ispdb_data/red.plala.or.jp +24 -0
- data/ispdb_data/rmail.plala.or.jp +24 -0
- data/ispdb_data/rondo.plala.or.jp +24 -0
- data/ispdb_data/rose.plala.or.jp +24 -0
- data/ispdb_data/rouge.plala.or.jp +24 -0
- data/ispdb_data/rr.com +25 -0
- data/ispdb_data/ruby.plala.or.jp +24 -0
- data/ispdb_data/sakunet.ne.jp +21 -0
- data/ispdb_data/sea.plala.or.jp +24 -0
- data/ispdb_data/sepia.plala.or.jp +24 -0
- data/ispdb_data/serenade.plala.or.jp +24 -0
- data/ispdb_data/seznam.cz +26 -0
- data/ispdb_data/sfr.fr +36 -0
- data/ispdb_data/silk.plala.or.jp +24 -0
- data/ispdb_data/silver.plala.or.jp +24 -0
- data/ispdb_data/sky.plala.or.jp +24 -0
- data/ispdb_data/skynet.be +35 -0
- data/ispdb_data/smail.plala.or.jp +24 -0
- data/ispdb_data/snow.plala.or.jp +24 -0
- data/ispdb_data/so.wind.ne.jp +25 -0
- data/ispdb_data/sonata.plala.or.jp +24 -0
- data/ispdb_data/strato.de +43 -0
- data/ispdb_data/studenti.univr.it +22 -0
- data/ispdb_data/suite.plala.or.jp +24 -0
- data/ispdb_data/sympatico.ca +30 -0
- data/ispdb_data/symphony.plala.or.jp +24 -0
- data/ispdb_data/t-online.de +37 -0
- data/ispdb_data/taupe.plala.or.jp +24 -0
- data/ispdb_data/terra.es +29 -0
- data/ispdb_data/tiki.ne.jp +24 -0
- data/ispdb_data/tiscali.cz +25 -0
- data/ispdb_data/tiscali.it +31 -0
- data/ispdb_data/tmail.plala.or.jp +24 -0
- data/ispdb_data/toccata.plala.or.jp +24 -0
- data/ispdb_data/topaz.plala.or.jp +24 -0
- data/ispdb_data/trio.plala.or.jp +24 -0
- data/ispdb_data/umail.plala.or.jp +24 -0
- data/ispdb_data/umich.edu +22 -0
- data/ispdb_data/uol.com.br +42 -0
- data/ispdb_data/upcmail.nl +23 -0
- data/ispdb_data/verizon.net +21 -0
- data/ispdb_data/versatel.de +43 -0
- data/ispdb_data/violet.plala.or.jp +24 -0
- data/ispdb_data/vm.aikis.or.jp +22 -0
- data/ispdb_data/vmail.plala.or.jp +24 -0
- data/ispdb_data/vp.tiki.ne.jp +24 -0
- data/ispdb_data/waltz.plala.or.jp +24 -0
- data/ispdb_data/wave.plala.or.jp +24 -0
- data/ispdb_data/web.de +55 -0
- data/ispdb_data/white.plala.or.jp +24 -0
- data/ispdb_data/wildwestdomains.com +37 -0
- data/ispdb_data/wine.plala.or.jp +24 -0
- data/ispdb_data/wmail.plala.or.jp +24 -0
- data/ispdb_data/wp.pl +22 -0
- data/ispdb_data/xmail.plala.or.jp +24 -0
- data/ispdb_data/xp.wind.jp +24 -0
- data/ispdb_data/xpost.plala.or.jp +24 -0
- data/ispdb_data/xs4all.nl +22 -0
- data/ispdb_data/xtra.co.nz +22 -0
- data/ispdb_data/yahoo.co.jp +22 -0
- data/ispdb_data/yahoo.com +41 -0
- data/ispdb_data/yandex.ru +39 -0
- data/ispdb_data/ybb.ne.jp +22 -0
- data/ispdb_data/yellow.plala.or.jp +24 -0
- data/ispdb_data/ymail.plala.or.jp +24 -0
- data/ispdb_data/ypost.plala.or.jp +24 -0
- data/ispdb_data/ziggo.nl +25 -0
- data/ispdb_data/zmail.plala.or.jp +24 -0
- data/ispdb_data/zpost.plala.or.jp +24 -0
- data/lib/mail_autoconfig/client_config.rb +118 -0
- data/lib/mail_autoconfig/email_address.rb +53 -0
- data/lib/mail_autoconfig/server.rb +73 -0
- data/lib/mail_autoconfig/version.rb +4 -0
- data/lib/mail_autoconfig.rb +35 -0
- data/mail_autoconfig.gemspec +27 -0
- data/spec/client_config_spec.rb +50 -0
- data/spec/email_address_spec.rb +42 -0
- data/spec/examples/client_config_yahoo.xml +40 -0
- data/spec/server_spec.rb +84 -0
- metadata +416 -0
@@ -0,0 +1,135 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII" />
|
6
|
+
<title>
|
7
|
+
File: README
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.7.4
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '';
|
20
|
+
framesUrl = "frames.html#!file.README.html";
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="_index.html">Index</a> »
|
35
|
+
<span class="title">File: README</span>
|
36
|
+
|
37
|
+
|
38
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
39
|
+
</div>
|
40
|
+
|
41
|
+
<div id="search">
|
42
|
+
|
43
|
+
<a class="full_list_link" id="class_list_link"
|
44
|
+
href="class_list.html">
|
45
|
+
Class List
|
46
|
+
</a>
|
47
|
+
|
48
|
+
<a class="full_list_link" id="method_list_link"
|
49
|
+
href="method_list.html">
|
50
|
+
Method List
|
51
|
+
</a>
|
52
|
+
|
53
|
+
<a class="full_list_link" id="file_list_link"
|
54
|
+
href="file_list.html">
|
55
|
+
File List
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<iframe id="search_frame"></iframe>
|
63
|
+
|
64
|
+
<div id="content"><div id='filecontents'><h1>Mail Autoconfig</h1>
|
65
|
+
|
66
|
+
<p>A ruby gem to detect and parse any Thunderbird autoconfig file for a domain. Includes a copy of the Mozilla ISPDB.</p>
|
67
|
+
|
68
|
+
<p>For general information about autoconf visit (<a href="https://developer.mozilla.org/en-US/docs/Mozilla/Thunderbird/Autoconfiguration">https://developer.mozilla.org/en-US/docs/Mozilla/Thunderbird/Autoconfiguration</a>),
|
69
|
+
for the autoconfig schema you should have a look at (<a href="https://wiki.mozilla.org/Thunderbird:Autoconfiguration:ConfigFileFormat">https://wiki.mozilla.org/Thunderbird:Autoconfiguration:ConfigFileFormat</a>).</p>
|
70
|
+
|
71
|
+
<p>Although I've tried to keep parsing as accurate as possible, there may be omissions or errors. Please feel free
|
72
|
+
to submit a patch in these cases.</p>
|
73
|
+
|
74
|
+
<h2>Installation</h2>
|
75
|
+
|
76
|
+
<p>Add this line to your application's Gemfile:</p>
|
77
|
+
|
78
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>mail_autoconfig</span><span class='tstring_end'>'</span></span>
|
79
|
+
</code></pre>
|
80
|
+
|
81
|
+
<p>And then execute:</p>
|
82
|
+
|
83
|
+
<pre class="code ruby"><code class="ruby">$ bundle
|
84
|
+
</code></pre>
|
85
|
+
|
86
|
+
<p>Or install it yourself as:</p>
|
87
|
+
|
88
|
+
<pre class="code ruby"><code class="ruby">$ gem install mail_autoconfig
|
89
|
+
</code></pre>
|
90
|
+
|
91
|
+
<h2>Usage</h2>
|
92
|
+
|
93
|
+
<p>Generally, you just want to get any associated configuration for an email address. In this case we'll use
|
94
|
+
'<a href="mailto:example@gmail.com">example@gmail.com</a>'.</p>
|
95
|
+
|
96
|
+
<pre class="code ruby"><code class="ruby">client_config = MailAutoconfig::for_address('example@gmail.com')
|
97
|
+
client_config.short_name
|
98
|
+
=> "GMail"
|
99
|
+
outbound_server = client_config.outgoing_servers.first
|
100
|
+
outbound_server.protocol
|
101
|
+
=> "smtp"
|
102
|
+
outnound_server.hostname
|
103
|
+
=> "smtp.googlemail.com"
|
104
|
+
</code></pre>
|
105
|
+
|
106
|
+
<p>When searching for a configuration, autoconfig first looks to it's local database for the domain of the address,
|
107
|
+
if this fails it will check <code>http://autoconfig.#{domain}/mail/config-v1.1.xml</code> and then
|
108
|
+
<code>http://#{domain}/.well-known/autoconfig/mail/config-v1.1.xml</code>. If both of these fail, Autoconfig will then look up
|
109
|
+
the MX records for the address, and perform the same searches on the domain of the primary MX record.</p>
|
110
|
+
|
111
|
+
<h3>Updating the database</h3>
|
112
|
+
|
113
|
+
<p>You may wish to update the database at some point to fetch the latest from Mozilla's ISPDB,
|
114
|
+
just run the rake task <code>rake fetch_ispdb</code>.</p>
|
115
|
+
|
116
|
+
<h2>Contributing</h2>
|
117
|
+
|
118
|
+
<ol>
|
119
|
+
<li>Fork it ( <a href="http://github.com/atech/mail_autoconfig/fork">http://github.com/atech/mail_autoconfig/fork</a> )</li>
|
120
|
+
<li>Create your feature branch (<code>git checkout -b my-new-feature</code>)</li>
|
121
|
+
<li>Run the test suite, check out haven't broken anything (<code>bundle exec rspec spec</code>)</li>
|
122
|
+
<li>Commit your changes (<code>git commit -am 'Add some feature'</code>)</li>
|
123
|
+
<li>Push to the branch (<code>git push origin my-new-feature</code>)</li>
|
124
|
+
<li>Create new Pull Request</li>
|
125
|
+
</ol>
|
126
|
+
</div></div>
|
127
|
+
|
128
|
+
<div id="footer">
|
129
|
+
Generated on Tue Apr 22 22:04:36 2014 by
|
130
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
131
|
+
0.8.7.4 (ruby-1.9.3).
|
132
|
+
</div>
|
133
|
+
|
134
|
+
</body>
|
135
|
+
</html>
|
data/doc/file_list.html
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
|
7
|
+
<link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" charset="utf-8" />
|
8
|
+
|
9
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
14
|
+
|
15
|
+
<script type="text/javascript" charset="utf-8" src="js/full_list.js"></script>
|
16
|
+
|
17
|
+
|
18
|
+
<title>File List</title>
|
19
|
+
<base id="base_target" target="_parent" />
|
20
|
+
</head>
|
21
|
+
<body>
|
22
|
+
<script type="text/javascript" charset="utf-8">
|
23
|
+
if (window.top.frames.main) {
|
24
|
+
document.getElementById('base_target').target = 'main';
|
25
|
+
document.body.className = 'frames';
|
26
|
+
}
|
27
|
+
</script>
|
28
|
+
<div id="content">
|
29
|
+
<h1 id="full_list_header">File List</h1>
|
30
|
+
<div id="nav">
|
31
|
+
|
32
|
+
<span><a target="_self" href="class_list.html">
|
33
|
+
Classes
|
34
|
+
</a></span>
|
35
|
+
|
36
|
+
<span><a target="_self" href="method_list.html">
|
37
|
+
Methods
|
38
|
+
</a></span>
|
39
|
+
|
40
|
+
<span><a target="_self" href="file_list.html">
|
41
|
+
Files
|
42
|
+
</a></span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
<div id="search">Search: <input type="text" /></div>
|
46
|
+
|
47
|
+
<ul id="full_list" class="file">
|
48
|
+
|
49
|
+
|
50
|
+
<li class="r1"><span class="object_link"><a href="index.html" title="README">README</a></a></li>
|
51
|
+
|
52
|
+
|
53
|
+
</ul>
|
54
|
+
</div>
|
55
|
+
</body>
|
56
|
+
</html>
|
data/doc/frames.html
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
|
3
|
+
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
<head>
|
6
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
7
|
+
<title>Documentation by YARD 0.8.7.4</title>
|
8
|
+
</head>
|
9
|
+
<script type="text/javascript" charset="utf-8">
|
10
|
+
window.onload = function() {
|
11
|
+
var match = unescape(window.location.hash).match(/^#!(.+)/);
|
12
|
+
var name = match ? match[1] : 'index.html';
|
13
|
+
name = name.replace(/^(\w+):\/\//, '').replace(/^\/\//, '');
|
14
|
+
document.writeln('<frameset cols="20%,*">' +
|
15
|
+
'<frame name="list" src="class_list.html" />' +
|
16
|
+
'<frame name="main" src="' + escape(name) + '" />' +
|
17
|
+
'</frameset>');
|
18
|
+
}
|
19
|
+
</script>
|
20
|
+
<noscript>
|
21
|
+
<frameset cols="20%,*">
|
22
|
+
<frame name="list" src="class_list.html" />
|
23
|
+
<frame name="main" src="index.html" />
|
24
|
+
</frameset>
|
25
|
+
</noscript>
|
26
|
+
</html>
|
data/doc/index.html
ADDED
@@ -0,0 +1,135 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII" />
|
6
|
+
<title>
|
7
|
+
File: README
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.7.4
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '';
|
20
|
+
framesUrl = "frames.html#!file.README.html";
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="_index.html">Index</a> »
|
35
|
+
<span class="title">File: README</span>
|
36
|
+
|
37
|
+
|
38
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
39
|
+
</div>
|
40
|
+
|
41
|
+
<div id="search">
|
42
|
+
|
43
|
+
<a class="full_list_link" id="class_list_link"
|
44
|
+
href="class_list.html">
|
45
|
+
Class List
|
46
|
+
</a>
|
47
|
+
|
48
|
+
<a class="full_list_link" id="method_list_link"
|
49
|
+
href="method_list.html">
|
50
|
+
Method List
|
51
|
+
</a>
|
52
|
+
|
53
|
+
<a class="full_list_link" id="file_list_link"
|
54
|
+
href="file_list.html">
|
55
|
+
File List
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<iframe id="search_frame"></iframe>
|
63
|
+
|
64
|
+
<div id="content"><div id='filecontents'><h1>Mail Autoconfig</h1>
|
65
|
+
|
66
|
+
<p>A ruby gem to detect and parse any Thunderbird autoconfig file for a domain. Includes a copy of the Mozilla ISPDB.</p>
|
67
|
+
|
68
|
+
<p>For general information about autoconf visit (<a href="https://developer.mozilla.org/en-US/docs/Mozilla/Thunderbird/Autoconfiguration">https://developer.mozilla.org/en-US/docs/Mozilla/Thunderbird/Autoconfiguration</a>),
|
69
|
+
for the autoconfig schema you should have a look at (<a href="https://wiki.mozilla.org/Thunderbird:Autoconfiguration:ConfigFileFormat">https://wiki.mozilla.org/Thunderbird:Autoconfiguration:ConfigFileFormat</a>).</p>
|
70
|
+
|
71
|
+
<p>Although I've tried to keep parsing as accurate as possible, there may be omissions or errors. Please feel free
|
72
|
+
to submit a patch in these cases.</p>
|
73
|
+
|
74
|
+
<h2>Installation</h2>
|
75
|
+
|
76
|
+
<p>Add this line to your application's Gemfile:</p>
|
77
|
+
|
78
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>mail_autoconfig</span><span class='tstring_end'>'</span></span>
|
79
|
+
</code></pre>
|
80
|
+
|
81
|
+
<p>And then execute:</p>
|
82
|
+
|
83
|
+
<pre class="code ruby"><code class="ruby">$ bundle
|
84
|
+
</code></pre>
|
85
|
+
|
86
|
+
<p>Or install it yourself as:</p>
|
87
|
+
|
88
|
+
<pre class="code ruby"><code class="ruby">$ gem install mail_autoconfig
|
89
|
+
</code></pre>
|
90
|
+
|
91
|
+
<h2>Usage</h2>
|
92
|
+
|
93
|
+
<p>Generally, you just want to get any associated configuration for an email address. In this case we'll use
|
94
|
+
'<a href="mailto:example@gmail.com">example@gmail.com</a>'.</p>
|
95
|
+
|
96
|
+
<pre class="code ruby"><code class="ruby">client_config = MailAutoconfig::for_address('example@gmail.com')
|
97
|
+
client_config.short_name
|
98
|
+
=> "GMail"
|
99
|
+
outbound_server = client_config.outgoing_servers.first
|
100
|
+
outbound_server.protocol
|
101
|
+
=> "smtp"
|
102
|
+
outnound_server.hostname
|
103
|
+
=> "smtp.googlemail.com"
|
104
|
+
</code></pre>
|
105
|
+
|
106
|
+
<p>When searching for a configuration, autoconfig first looks to it's local database for the domain of the address,
|
107
|
+
if this fails it will check <code>http://autoconfig.#{domain}/mail/config-v1.1.xml</code> and then
|
108
|
+
<code>http://#{domain}/.well-known/autoconfig/mail/config-v1.1.xml</code>. If both of these fail, Autoconfig will then look up
|
109
|
+
the MX records for the address, and perform the same searches on the domain of the primary MX record.</p>
|
110
|
+
|
111
|
+
<h3>Updating the database</h3>
|
112
|
+
|
113
|
+
<p>You may wish to update the database at some point to fetch the latest from Mozilla's ISPDB,
|
114
|
+
just run the rake task <code>rake fetch_ispdb</code>.</p>
|
115
|
+
|
116
|
+
<h2>Contributing</h2>
|
117
|
+
|
118
|
+
<ol>
|
119
|
+
<li>Fork it ( <a href="http://github.com/atech/mail_autoconfig/fork">http://github.com/atech/mail_autoconfig/fork</a> )</li>
|
120
|
+
<li>Create your feature branch (<code>git checkout -b my-new-feature</code>)</li>
|
121
|
+
<li>Run the test suite, check out haven't broken anything (<code>bundle exec rspec spec</code>)</li>
|
122
|
+
<li>Commit your changes (<code>git commit -am 'Add some feature'</code>)</li>
|
123
|
+
<li>Push to the branch (<code>git push origin my-new-feature</code>)</li>
|
124
|
+
<li>Create new Pull Request</li>
|
125
|
+
</ol>
|
126
|
+
</div></div>
|
127
|
+
|
128
|
+
<div id="footer">
|
129
|
+
Generated on Tue Apr 22 22:04:36 2014 by
|
130
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
131
|
+
0.8.7.4 (ruby-1.9.3).
|
132
|
+
</div>
|
133
|
+
|
134
|
+
</body>
|
135
|
+
</html>
|
data/doc/js/app.js
ADDED
@@ -0,0 +1,219 @@
|
|
1
|
+
function createSourceLinks() {
|
2
|
+
$('.method_details_list .source_code').
|
3
|
+
before("<span class='showSource'>[<a href='#' class='toggleSource'>View source</a>]</span>");
|
4
|
+
$('.toggleSource').toggle(function() {
|
5
|
+
$(this).parent().nextAll('.source_code').slideDown(100);
|
6
|
+
$(this).text("Hide source");
|
7
|
+
},
|
8
|
+
function() {
|
9
|
+
$(this).parent().nextAll('.source_code').slideUp(100);
|
10
|
+
$(this).text("View source");
|
11
|
+
});
|
12
|
+
}
|
13
|
+
|
14
|
+
function createDefineLinks() {
|
15
|
+
var tHeight = 0;
|
16
|
+
$('.defines').after(" <a href='#' class='toggleDefines'>more...</a>");
|
17
|
+
$('.toggleDefines').toggle(function() {
|
18
|
+
tHeight = $(this).parent().prev().height();
|
19
|
+
$(this).prev().show();
|
20
|
+
$(this).parent().prev().height($(this).parent().height());
|
21
|
+
$(this).text("(less)");
|
22
|
+
},
|
23
|
+
function() {
|
24
|
+
$(this).prev().hide();
|
25
|
+
$(this).parent().prev().height(tHeight);
|
26
|
+
$(this).text("more...");
|
27
|
+
});
|
28
|
+
}
|
29
|
+
|
30
|
+
function createFullTreeLinks() {
|
31
|
+
var tHeight = 0;
|
32
|
+
$('.inheritanceTree').toggle(function() {
|
33
|
+
tHeight = $(this).parent().prev().height();
|
34
|
+
$(this).parent().toggleClass('showAll');
|
35
|
+
$(this).text("(hide)");
|
36
|
+
$(this).parent().prev().height($(this).parent().height());
|
37
|
+
},
|
38
|
+
function() {
|
39
|
+
$(this).parent().toggleClass('showAll');
|
40
|
+
$(this).parent().prev().height(tHeight);
|
41
|
+
$(this).text("show all");
|
42
|
+
});
|
43
|
+
}
|
44
|
+
|
45
|
+
function fixBoxInfoHeights() {
|
46
|
+
$('dl.box dd.r1, dl.box dd.r2').each(function() {
|
47
|
+
$(this).prev().height($(this).height());
|
48
|
+
});
|
49
|
+
}
|
50
|
+
|
51
|
+
function searchFrameLinks() {
|
52
|
+
$('.full_list_link').click(function() {
|
53
|
+
toggleSearchFrame(this, $(this).attr('href'));
|
54
|
+
return false;
|
55
|
+
});
|
56
|
+
}
|
57
|
+
|
58
|
+
function toggleSearchFrame(id, link) {
|
59
|
+
var frame = $('#search_frame');
|
60
|
+
$('#search a').removeClass('active').addClass('inactive');
|
61
|
+
if (frame.attr('src') == link && frame.css('display') != "none") {
|
62
|
+
frame.slideUp(100);
|
63
|
+
$('#search a').removeClass('active inactive');
|
64
|
+
}
|
65
|
+
else {
|
66
|
+
$(id).addClass('active').removeClass('inactive');
|
67
|
+
frame.attr('src', link).slideDown(100);
|
68
|
+
}
|
69
|
+
}
|
70
|
+
|
71
|
+
function linkSummaries() {
|
72
|
+
$('.summary_signature').click(function() {
|
73
|
+
document.location = $(this).find('a').attr('href');
|
74
|
+
});
|
75
|
+
}
|
76
|
+
|
77
|
+
function framesInit() {
|
78
|
+
if (hasFrames) {
|
79
|
+
document.body.className = 'frames';
|
80
|
+
$('#menu .noframes a').attr('href', document.location);
|
81
|
+
try {
|
82
|
+
window.top.document.title = $('html head title').text();
|
83
|
+
} catch(error) {
|
84
|
+
// some browsers will not allow this when serving from file://
|
85
|
+
// but we don't want to stop the world.
|
86
|
+
}
|
87
|
+
}
|
88
|
+
else {
|
89
|
+
$('#menu .noframes a').text('frames').attr('href', framesUrl);
|
90
|
+
}
|
91
|
+
}
|
92
|
+
|
93
|
+
function keyboardShortcuts() {
|
94
|
+
if (window.top.frames.main) return;
|
95
|
+
$(document).keypress(function(evt) {
|
96
|
+
if (evt.altKey || evt.ctrlKey || evt.metaKey || evt.shiftKey) return;
|
97
|
+
if (typeof evt.target !== "undefined" &&
|
98
|
+
(evt.target.nodeName == "INPUT" ||
|
99
|
+
evt.target.nodeName == "TEXTAREA")) return;
|
100
|
+
switch (evt.charCode) {
|
101
|
+
case 67: case 99: $('#class_list_link').click(); break; // 'c'
|
102
|
+
case 77: case 109: $('#method_list_link').click(); break; // 'm'
|
103
|
+
case 70: case 102: $('#file_list_link').click(); break; // 'f'
|
104
|
+
default: break;
|
105
|
+
}
|
106
|
+
});
|
107
|
+
}
|
108
|
+
|
109
|
+
function summaryToggle() {
|
110
|
+
$('.summary_toggle').click(function() {
|
111
|
+
if (localStorage) {
|
112
|
+
localStorage.summaryCollapsed = $(this).text();
|
113
|
+
}
|
114
|
+
$('.summary_toggle').each(function() {
|
115
|
+
$(this).text($(this).text() == "collapse" ? "expand" : "collapse");
|
116
|
+
var next = $(this).parent().parent().nextAll('ul.summary').first();
|
117
|
+
if (next.hasClass('compact')) {
|
118
|
+
next.toggle();
|
119
|
+
next.nextAll('ul.summary').first().toggle();
|
120
|
+
}
|
121
|
+
else if (next.hasClass('summary')) {
|
122
|
+
var list = $('<ul class="summary compact" />');
|
123
|
+
list.html(next.html());
|
124
|
+
list.find('.summary_desc, .note').remove();
|
125
|
+
list.find('a').each(function() {
|
126
|
+
$(this).html($(this).find('strong').html());
|
127
|
+
$(this).parent().html($(this)[0].outerHTML);
|
128
|
+
});
|
129
|
+
next.before(list);
|
130
|
+
next.toggle();
|
131
|
+
}
|
132
|
+
});
|
133
|
+
return false;
|
134
|
+
});
|
135
|
+
if (localStorage) {
|
136
|
+
if (localStorage.summaryCollapsed == "collapse") {
|
137
|
+
$('.summary_toggle').first().click();
|
138
|
+
}
|
139
|
+
else localStorage.summaryCollapsed = "expand";
|
140
|
+
}
|
141
|
+
}
|
142
|
+
|
143
|
+
function fixOutsideWorldLinks() {
|
144
|
+
$('a').each(function() {
|
145
|
+
if (window.location.host != this.host) this.target = '_parent';
|
146
|
+
});
|
147
|
+
}
|
148
|
+
|
149
|
+
function generateTOC() {
|
150
|
+
if ($('#filecontents').length === 0) return;
|
151
|
+
var _toc = $('<ol class="top"></ol>');
|
152
|
+
var show = false;
|
153
|
+
var toc = _toc;
|
154
|
+
var counter = 0;
|
155
|
+
var tags = ['h2', 'h3', 'h4', 'h5', 'h6'];
|
156
|
+
var i;
|
157
|
+
if ($('#filecontents h1').length > 1) tags.unshift('h1');
|
158
|
+
for (i = 0; i < tags.length; i++) { tags[i] = '#filecontents ' + tags[i]; }
|
159
|
+
var lastTag = parseInt(tags[0][1], 10);
|
160
|
+
$(tags.join(', ')).each(function() {
|
161
|
+
if ($(this).parents('.method_details .docstring').length != 0) return;
|
162
|
+
if (this.id == "filecontents") return;
|
163
|
+
show = true;
|
164
|
+
var thisTag = parseInt(this.tagName[1], 10);
|
165
|
+
if (this.id.length === 0) {
|
166
|
+
var proposedId = $(this).attr('toc-id');
|
167
|
+
if (typeof(proposedId) != "undefined") this.id = proposedId;
|
168
|
+
else {
|
169
|
+
var proposedId = $(this).text().replace(/[^a-z0-9-]/ig, '_');
|
170
|
+
if ($('#' + proposedId).length > 0) { proposedId += counter; counter++; }
|
171
|
+
this.id = proposedId;
|
172
|
+
}
|
173
|
+
}
|
174
|
+
if (thisTag > lastTag) {
|
175
|
+
for (i = 0; i < thisTag - lastTag; i++) {
|
176
|
+
var tmp = $('<ol/>'); toc.append(tmp); toc = tmp;
|
177
|
+
}
|
178
|
+
}
|
179
|
+
if (thisTag < lastTag) {
|
180
|
+
for (i = 0; i < lastTag - thisTag; i++) toc = toc.parent();
|
181
|
+
}
|
182
|
+
var title = $(this).attr('toc-title');
|
183
|
+
if (typeof(title) == "undefined") title = $(this).text();
|
184
|
+
toc.append('<li><a href="#' + this.id + '">' + title + '</a></li>');
|
185
|
+
lastTag = thisTag;
|
186
|
+
});
|
187
|
+
if (!show) return;
|
188
|
+
html = '<div id="toc"><p class="title"><a class="hide_toc" href="#"><strong>Table of Contents</strong></a> <small>(<a href="#" class="float_toc">left</a>)</small></p></div>';
|
189
|
+
$('#content').prepend(html);
|
190
|
+
$('#toc').append(_toc);
|
191
|
+
$('#toc .hide_toc').toggle(function() {
|
192
|
+
$('#toc .top').slideUp('fast');
|
193
|
+
$('#toc').toggleClass('hidden');
|
194
|
+
$('#toc .title small').toggle();
|
195
|
+
}, function() {
|
196
|
+
$('#toc .top').slideDown('fast');
|
197
|
+
$('#toc').toggleClass('hidden');
|
198
|
+
$('#toc .title small').toggle();
|
199
|
+
});
|
200
|
+
$('#toc .float_toc').toggle(function() {
|
201
|
+
$(this).text('float');
|
202
|
+
$('#toc').toggleClass('nofloat');
|
203
|
+
}, function() {
|
204
|
+
$(this).text('left');
|
205
|
+
$('#toc').toggleClass('nofloat');
|
206
|
+
});
|
207
|
+
}
|
208
|
+
|
209
|
+
$(framesInit);
|
210
|
+
$(createSourceLinks);
|
211
|
+
$(createDefineLinks);
|
212
|
+
$(createFullTreeLinks);
|
213
|
+
$(fixBoxInfoHeights);
|
214
|
+
$(searchFrameLinks);
|
215
|
+
$(linkSummaries);
|
216
|
+
$(keyboardShortcuts);
|
217
|
+
$(summaryToggle);
|
218
|
+
$(fixOutsideWorldLinks);
|
219
|
+
$(generateTOC);
|