summaryrefslogtreecommitdiff
path: root/docs/en/services/mx.html
blob: 8f5a36da97f0a13f8198c8768e72d5981b2beaaa (plain)
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
<!DOCTYPE html>
<html lang='en'>
<head>
<title>
mx - LEAP Platform Documentation
</title>
<meta content='width=device-width, initial-scale=1.0' name='viewport'>
<meta charset='UTF-8'>
<base href="" />
<style>
  body {
    background: #444;
    display: flex;
    flex-direction: row;
    padding: 10px;
    margin: 0px;
  }
  #sidebar {
    flex: 0 0 250px;
    background: white;
    margin-right: 10px;
    padding: 20px;
  }
  #sidebar ul {
    list-style-type: none;
    padding-left: 0px;
    margin: 0;
  }
  #sidebar li { padding: 4px }
  #sidebar li a { text-decoration: none }
  #sidebar li.active { background: #444 }
  #sidebar li.active a { color: white }
  #sidebar li.level1 { padding-left: 20px }
  #sidebar li.level2 { padding-left: 40px }
  #main {
    flex: 1 1 auto;
    background: white;
    padding: 20px;
  }
  #title-box {
    padding-bottom: 20px;
    border-bottom: 5px solid #eee;
  }
  #title-box h1 {
    margin-top: 0px;
  }
  pre {
    padding: 10px;
    background: #eef;
  }
  code {
    background: #eef;
  }
  table {border-collapse: collapse}
  table td {
    border: 1px solid #ccc;
    padding: 4px;
    vertical-align: top;
  }
</style>
</head>
<body>
<div id='sidebar'>
<ul>
<li class=''>
<a href='../../index.html'>Home</a>
</li>
<li class=' level0'>
<a class='' href='../guide.html'>Guide</a>
</li>
<li class=' level0'>
<a class='' href='../tutorials.html'>Tutorials</a>
</li>
<li class='semi-active level0'>
<a class='' href='../services.html'>Services</a>
</li>
<li class=' level1'>
<a class='' href='couchdb.html'>couchdb</a>
</li>
<li class=' level1'>
<a class='' href='openvpn.html'>openvpn</a>
</li>
<li class=' level1'>
<a class='' href='monitor.html'>monitor</a>
</li>
<li class='active level1'>
<a class='' href='mx.html'>mx</a>
</li>
<li class=' level1'>
<a class='' href='soledad.html'>soledad</a>
</li>
<li class=' level1'>
<a class='' href='tor.html'>tor</a>
</li>
<li class=' level1'>
<a class='' href='webapp.html'>webapp</a>
</li>
<li class=' level0'>
<a class='' href='../upgrading.html'>Upgrading</a>
</li>
<li class=' level0'>
<a class='' href='../troubleshooting.html'>Troubleshooting</a>
</li>
<li class=' level0'>
<a class='' href='../details.html'>Details</a>
</li>
</ul>
</div>
<div id='main'>
<div id='title-box'>
<h1>mx</h1>

<div id='summary'>Incoming and outgoing MX servers.</div>
</div>
<div id='content-box'>
<div id="TOC"><ol>
  <li>
    <a href="mx/index.html#topology">Topology</a>
  </li>
  <li>
    <a href="mx/index.html#configuration">Configuration</a>
    <ol>
      <li>
        <a href="mx/index.html#aliases">Aliases</a>
      </li>
    </ol>
  </li>
</ol></div>

<h2><a name="topology"></a>Topology</h2>

<p><code>mx</code> nodes communicate with the public internet, clients, and <code>couchdb</code> nodes.</p>

<h2><a name="configuration"></a>Configuration</h2>

<h3><a name="aliases"></a>Aliases</h3>

<p>Using the <code>mx.aliases</code> property, you can specify your own hard-coded email aliases that precedence over the aliases in the user database. The <code>mx.aliases</code> property consists of a hash, where source address points to one or more destination addresses.</p>

<p>For example:</p>

<p><code>services/mx.json</code>:</p>

<pre><code>"mx": {
  "aliases": {
    "rook": "crow",
    "robin": "robin@bird.org",
    "flock": ["junco@bird.org", "robin", "crow"],
    "chickadee@avian.org": "chickadee@bird.org",
    "flicker": ["flicker@bird.org", "flicker@deliver.local"]
  }
}
</code></pre>

<p>This example demonstrates several of the features with <code>mx.aliases</code>:</p>

<ol>
<li>alias lists: by specifying an array of destination addresses, as in the case of &ldquo;flock&rdquo;, the single email will get copied to each address.</li>
<li>chained resolution: alias resolution will recursively continue until there are no more matching aliases. For example, &ldquo;flock&rdquo; is resolved to &ldquo;robin&rdquo;, which then gets resolved to &ldquo;<a href="&#x6d;&#x61;&#x69;&#108;&#x74;&#x6f;&#x3a;&#x72;&#111;&#98;&#105;&#110;&#x40;&#98;&#105;&#114;&#100;&#46;&#111;&#x72;&#x67;">&#x72;&#111;&#x62;&#x69;&#110;&#64;&#x62;&#105;&#114;&#x64;&#46;&#x6f;&#x72;&#103;</a>&rdquo;.</li>
<li>virtual domains: by specifying the full domain, as in the case of &ldquo;<a href="&#109;&#97;&#x69;&#108;&#116;&#x6f;&#58;&#x63;&#104;&#105;&#x63;&#x6b;&#97;&#100;&#x65;&#x65;&#x40;&#97;&#x76;&#x69;&#97;&#110;&#x2e;&#x6f;&#114;&#x67;">&#x63;&#104;&#x69;&#99;&#107;&#x61;&#100;&#x65;&#x65;&#64;&#97;&#x76;&#x69;&#x61;&#110;&#x2e;&#111;&#114;&#x67;</a>&rdquo;, the alias will work for any domain you want. Of course, the MX record for that domain must point to appropriate MX servers, but otherwise you don&rsquo;t need to do any additional configuration.</li>
<li>local delivery: for testing purposes, it is often useful to copy all incoming mail for a particular address and send those copies to another address. You can do this by adding &ldquo;@deliver.local&rdquo; as one of the destination addresses. When &ldquo;@local.delivery&rdquo; is found, alias resolution stops and the mail is delivered to that username.</li>
</ol>


</div>
</div>
</body>
</html>