This file is indexed.

/usr/share/doc/vmm/api/vmm.html is in vmm-doc 0.6.2-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>1. VirtualMailManager — Initialization code and some functions &#8212; vmm 0.6.x documentation</title>
    
    <link rel="stylesheet" href="_static/classic.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    './',
        VERSION:     '0.6.x',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="top" title="vmm 0.6.x documentation" href="index.html" />
    <link rel="next" title="2. VirtualMailManager.Config — Simplified configuration access" href="vmm_config.html" />
    <link rel="prev" title="VirtualMailManager API" href="index.html" /> 
  </head>
  <body role="document">
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="vmm_config.html" title="2. VirtualMailManager.Config — Simplified configuration access"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="index.html" title="VirtualMailManager API"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">vmm 0.6.x documentation</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="module-VirtualMailManager">
<span id="virtualmailmanager-initialization-code-and-some-functions"></span><h1>1. <a class="reference internal" href="#module-VirtualMailManager" title="VirtualMailManager: Initialization code and some functions"><code class="xref py py-mod docutils literal"><span class="pre">VirtualMailManager</span></code></a> &#8212;  Initialization code and some functions<a class="headerlink" href="#module-VirtualMailManager" title="Permalink to this headline"></a></h1>
<div class="toctree-wrapper compound">
</div>
<p>When the VirtualMailManager module, or one of its sub modules, is imported,
the following actions will be performed:</p>
<blockquote>
<div><ul class="simple">
<li><code class="xref py py-func docutils literal"><span class="pre">locale.setlocale()</span></code> (with <code class="xref py py-const docutils literal"><span class="pre">locale.LC_ALL</span></code>) is called, to set
<a class="reference internal" href="#VirtualMailManager.ENCODING" title="VirtualMailManager.ENCODING"><code class="xref py py-const docutils literal"><span class="pre">ENCODING</span></code></a></li>
<li><code class="xref py py-func docutils literal"><span class="pre">gettext.install()</span></code> is called, to have 18N support.</li>
</ul>
</div></blockquote>
<div class="section" id="constants-and-data">
<h2>1.1. Constants and data<a class="headerlink" href="#constants-and-data" title="Permalink to this headline"></a></h2>
<dl class="data">
<dt id="VirtualMailManager.ENCODING">
<code class="descclassname">VirtualMailManager.</code><code class="descname">ENCODING</code><a class="headerlink" href="#VirtualMailManager.ENCODING" title="Permalink to this definition"></a></dt>
<dd><p>The systems current character encoding, e.g. <code class="docutils literal"><span class="pre">'UTF-8'</span></code> or
<code class="docutils literal"><span class="pre">'ANSI_X3.4-1968'</span></code> (aka ASCII).</p>
</dd></dl>

</div>
<div class="section" id="functions">
<h2>1.2. Functions<a class="headerlink" href="#functions" title="Permalink to this headline"></a></h2>
<dl class="function">
<dt id="VirtualMailManager.ace2idna">
<code class="descclassname">VirtualMailManager.</code><code class="descname">ace2idna</code><span class="sig-paren">(</span><em>domainname</em><span class="sig-paren">)</span><a class="headerlink" href="#VirtualMailManager.ace2idna" title="Permalink to this definition"></a></dt>
<dd><p>Converts the idn domain name <em>domainname</em> into punycode.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>domainname</strong> (<em>str</em>) &#8211; the domain-ace representation (<code class="docutils literal"><span class="pre">xn--…</span></code>)</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="vmm_config.html#VirtualMailManager.Config.Config.unicode" title="VirtualMailManager.Config.Config.unicode">unicode</a></td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="VirtualMailManager.check_domainname">
<code class="descclassname">VirtualMailManager.</code><code class="descname">check_domainname</code><span class="sig-paren">(</span><em>domainname</em><span class="sig-paren">)</span><a class="headerlink" href="#VirtualMailManager.check_domainname" title="Permalink to this definition"></a></dt>
<dd><p>Returns the validated domain name <em>domainname</em>.</p>
<p>It also converts the name of the domain from IDN to ASCII, if necessary.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>domainname</strong> (<code class="xref py py-obj docutils literal"><span class="pre">basestring</span></code>) &#8211; the name of the domain</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">str</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference internal" href="vmm_errors.html#VirtualMailManager.errors.VMMError" title="VirtualMailManager.errors.VMMError"><strong>VirtualMailManager.errors.VMMError</strong></a> &#8211; if the domain name is
too long or doesn&#8217;t look like a valid domain name (label.label.label).</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="VirtualMailManager.check_localpart">
<code class="descclassname">VirtualMailManager.</code><code class="descname">check_localpart</code><span class="sig-paren">(</span><em>localpart</em><span class="sig-paren">)</span><a class="headerlink" href="#VirtualMailManager.check_localpart" title="Permalink to this definition"></a></dt>
<dd><p>Returns the validated local-part <em>localpart</em> of an e-mail address.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>localpart</strong> (<em>str</em>) &#8211; The local-part of an e-mail address.</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">str</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference internal" href="vmm_errors.html#VirtualMailManager.errors.VMMError" title="VirtualMailManager.errors.VMMError"><strong>VirtualMailManager.errors.VMMError</strong></a> &#8211; if the local-part is too
long or contains invalid characters.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="VirtualMailManager.exec_ok">
<code class="descclassname">VirtualMailManager.</code><code class="descname">exec_ok</code><span class="sig-paren">(</span><em>binary</em><span class="sig-paren">)</span><a class="headerlink" href="#VirtualMailManager.exec_ok" title="Permalink to this definition"></a></dt>
<dd><p>Checks if the <em>binary</em> exists and if it is executable.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>binary</strong> (<em>str</em>) &#8211; path to the binary</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">str</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference internal" href="vmm_errors.html#VirtualMailManager.errors.VMMError" title="VirtualMailManager.errors.VMMError"><strong>VirtualMailManager.errors.VMMError</strong></a> &#8211; if <em>binary</em> isn&#8217;t a file
or is not executable.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="VirtualMailManager.expand_path">
<code class="descclassname">VirtualMailManager.</code><code class="descname">expand_path</code><span class="sig-paren">(</span><em>path</em><span class="sig-paren">)</span><a class="headerlink" href="#VirtualMailManager.expand_path" title="Permalink to this definition"></a></dt>
<dd><p>Expands paths, starting with <code class="docutils literal"><span class="pre">.</span></code> or <code class="docutils literal"><span class="pre">~</span></code>, to an absolute path.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>path</strong> (<em>str</em>) &#8211; Path to a file or directory</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">str</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="VirtualMailManager.get_unicode">
<code class="descclassname">VirtualMailManager.</code><code class="descname">get_unicode</code><span class="sig-paren">(</span><em>string</em><span class="sig-paren">)</span><a class="headerlink" href="#VirtualMailManager.get_unicode" title="Permalink to this definition"></a></dt>
<dd><p>Converts <cite>string</cite> to <cite>unicode</cite>, if necessary.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>string</strong> (<em>str</em>) &#8211; The string taht should be converted</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="vmm_config.html#VirtualMailManager.Config.Config.unicode" title="VirtualMailManager.Config.Config.unicode">unicode</a></td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="VirtualMailManager.idn2ascii">
<code class="descclassname">VirtualMailManager.</code><code class="descname">idn2ascii</code><span class="sig-paren">(</span><em>domainname</em><span class="sig-paren">)</span><a class="headerlink" href="#VirtualMailManager.idn2ascii" title="Permalink to this definition"></a></dt>
<dd><p>Converts the idn domain name <em>domainname</em> into punycode.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>domainname</strong> (<a class="reference internal" href="vmm_config.html#VirtualMailManager.Config.Config.unicode" title="VirtualMailManager.Config.Config.unicode"><em>unicode</em></a>) &#8211; the unicode representation of the domain name</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">str</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="VirtualMailManager.is_dir">
<code class="descclassname">VirtualMailManager.</code><code class="descname">is_dir</code><span class="sig-paren">(</span><em>path</em><span class="sig-paren">)</span><a class="headerlink" href="#VirtualMailManager.is_dir" title="Permalink to this definition"></a></dt>
<dd><p>Checks if <em>path</em> is a directory.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>path</strong> (<em>str</em>) &#8211; Path to a directory</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">str</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference internal" href="vmm_errors.html#VirtualMailManager.errors.VMMError" title="VirtualMailManager.errors.VMMError"><strong>VirtualMailManager.errors.VMMError</strong></a> &#8211; if <em>path</em> is not a directory.</td>
</tr>
</tbody>
</table>
</dd></dl>

</div>
<div class="section" id="examples">
<h2>1.3. Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h2>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">VirtualMailManager</span> <span class="k">import</span> <span class="o">*</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">ace2idna</span><span class="p">(</span><span class="s1">&#39;xn--pypal-4ve.tld&#39;</span><span class="p">)</span>
<span class="go">u&#39;p\u0430ypal.tld&#39;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">idn2ascii</span><span class="p">(</span><span class="s1">u&#39;öko.de&#39;</span><span class="p">)</span>
<span class="go">&#39;xn--ko-eka.de&#39;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">check_domainname</span><span class="p">(</span><span class="s1">u&#39;pаypal.tld&#39;</span><span class="p">)</span>
<span class="go">&#39;xn--pypal-4ve.tld&#39;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">check_localpart</span><span class="p">(</span><span class="s1">&#39;john.doe&#39;</span><span class="p">)</span>
<span class="go">&#39;john.doe&#39;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">exec_ok</span><span class="p">(</span><span class="s1">&#39;usr/bin/vim&#39;</span><span class="p">)</span>
<span class="gt">Traceback (most recent call last):</span>
  File <span class="nb">&quot;&lt;stdin&gt;&quot;</span>, line <span class="m">1</span>, in <span class="n">&lt;module&gt;</span>
  File <span class="nb">&quot;./VirtualMailManager/__init__.py&quot;</span>, line <span class="m">93</span>, in <span class="n">exec_ok</span>
    <span class="n">NO_SUCH_BINARY</span><span class="p">)</span>
<span class="gr">VirtualMailManager.errors.VMMError</span>: <span class="n">&#39;usr/bin/vim&#39; is not a file</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">exec_ok</span><span class="p">(</span><span class="s1">&#39;/usr/bin/vim&#39;</span><span class="p">)</span>
<span class="go">&#39;/usr/bin/vim&#39;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">expand_path</span><span class="p">(</span><span class="s1">&#39;.&#39;</span><span class="p">)</span>
<span class="go">&#39;/home/user/hg/vmm&#39;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">get_unicode</span><span class="p">(</span><span class="s1">&#39;hello world&#39;</span><span class="p">)</span>
<span class="go">u&#39;hello world&#39;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">is_dir</span><span class="p">(</span><span class="s1">&#39;~/hg&#39;</span><span class="p">)</span>
<span class="go">&#39;/home/user/hg&#39;</span>
<span class="go">&gt;&gt;&gt;</span>
</pre></div>
</div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">1. <code class="docutils literal"><span class="pre">VirtualMailManager</span></code> &#8212;  Initialization code and some functions</a><ul>
<li><a class="reference internal" href="#constants-and-data">1.1. Constants and data</a></li>
<li><a class="reference internal" href="#functions">1.2. Functions</a></li>
<li><a class="reference internal" href="#examples">1.3. Examples</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="index.html"
                        title="previous chapter">VirtualMailManager API</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="vmm_config.html"
                        title="next chapter">2. <code class="docutils literal"><span class="pre">VirtualMailManager.Config</span></code> &#8212;  Simplified configuration access</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="_sources/vmm.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <div><input type="text" name="q" /></div>
      <div><input type="submit" value="Go" /></div>
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="vmm_config.html" title="2. VirtualMailManager.Config — Simplified configuration access"
             >next</a> |</li>
        <li class="right" >
          <a href="index.html" title="VirtualMailManager API"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">vmm 0.6.x documentation</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 2017, Pascal Volk.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9.
    </div>
  </body>
</html>