~xav0989/ubuntu/vivid/mailman/ubuntu-logo

« back to all changes in this revision

Viewing changes to doc/mailman-install/postfix-virtual.html

  • Committer: Bazaar Package Importer
  • Author(s): Thijs Kinkhorst
  • Date: 2008-04-24 19:30:49 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20080424193049-jy5fa9tus40tjbmn
Tags: 1:2.1.10-2
Apply upstream patch to fix regression in cmd_subscribe
so that email subscribe to the -subscribe or -join address or the
-request address with a bare 'subscribe' command results in the message
being shunted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 
2
<html>
 
3
<head>
 
4
<link rel="STYLESHEET" href="mailman-install.css" type='text/css' />
 
5
<link rel="first" href="mailman-install.html" title='GNU mailman - installation Manual' />
 
6
<link rel='last' href='about.html' title='About this document...' />
 
7
<link rel='help' href='about.html' title='About this document...' />
 
8
<link rel="next" href="node15.html" />
 
9
<link rel="prev" href="node13.html" />
 
10
<link rel="parent" href="node12.html" />
 
11
<link rel="next" href="node15.html" />
 
12
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 
13
<meta name='aesop' content='information' />
 
14
<title>6.1.2 Virtual domains</title>
 
15
</head>
 
16
<body>
 
17
<div class="navigation">
 
18
<div id='top-navigation-panel' xml:id='top-navigation-panel'>
 
19
<table align="center" width="100%" cellpadding="0" cellspacing="2">
 
20
<tr>
 
21
<td class='online-navigation'><a rel="prev" title="6.1.1 integrating Postfix and"
 
22
  href="node13.html"><img src='previous.png'
 
23
  border='0' height='32'  alt='Previous Page' width='32' /></a></td>
 
24
<td class='online-navigation'><a rel="parent" title="6.1 using the Postfix"
 
25
  href="node12.html"><img src='up.png'
 
26
  border='0' height='32'  alt='Up one Level' width='32' /></a></td>
 
27
<td class='online-navigation'><a rel="next" title="6.1.3 an alternative approach"
 
28
  href="node15.html"><img src='next.png'
 
29
  border='0' height='32'  alt='Next Page' width='32' /></a></td>
 
30
<td align="center" width="100%">GNU Mailman - Installation Manual</td>
 
31
<td class='online-navigation'><img src='blank.png'
 
32
  border='0' height='32'  alt='' width='32' /></td>
 
33
<td class='online-navigation'><img src='blank.png'
 
34
  border='0' height='32'  alt='' width='32' /></td>
 
35
<td class='online-navigation'><img src='blank.png'
 
36
  border='0' height='32'  alt='' width='32' /></td>
 
37
</tr></table>
 
38
<div class='online-navigation'>
 
39
<b class="navlabel">Previous:</b>
 
40
<a class="sectref" rel="prev" href="node13.html">6.1.1 Integrating Postfix and</a>
 
41
<b class="navlabel">Up:</b>
 
42
<a class="sectref" rel="parent" href="node12.html">6.1 Using the Postfix</a>
 
43
<b class="navlabel">Next:</b>
 
44
<a class="sectref" rel="next" href="node15.html">6.1.3 An alternative approach</a>
 
45
</div>
 
46
<hr /></div>
 
47
</div>
 
48
<!--End of Navigation Panel-->
 
49
 
 
50
<h3><a name="SECTION001612000000000000000"></a><a name="postfix-virtual"></a>
 
51
<br>
 
52
6.1.2 Virtual domains
 
53
</h3>
 
54
 
 
55
<p>
 
56
Postfix 2.0 supports ``virtual alias domains'', essentially what used to be
 
57
called ``Postfix-style virtual domains'' in earlier Postfix versions.  To make
 
58
virtual alias domains work with Mailman, you need to do some setup in both
 
59
Postfix and Mailman.  Mailman will write all virtual alias mappings to a file
 
60
called, by default, <span class="file">/usr/local/mailman/data/virtual-mailman</span>.  It will
 
61
also use <b class="program">postmap</b> to create the <b class="program">virtual-mailman.db</b> file
 
62
that Postfix will actually use.
 
63
 
 
64
<p>
 
65
First, you need to set up the Postfix virtual alias domains as described in
 
66
the Postfix documentation (see Postfix's <code>virtual(5)</code> manpage).  Note
 
67
that it's your responsibility to include the <code>virtual-alias.domain
 
68
anything</code> line as described manpage; Mailman will not include this line in
 
69
<span class="file">virtual-mailman</span>.  You are highly encouraged to make sure your virtual
 
70
alias domains are working properly before integrating with Mailman.
 
71
 
 
72
<p>
 
73
Next, add a path to Postfix's <var>virtual_alias_maps</var> variable, pointing to
 
74
the virtual-mailman file, e.g.:
 
75
 
 
76
<p>
 
77
<div class="verbatim"><pre>
 
78
    virtual_alias_maps = &lt;your normal virtual alias files&gt;,
 
79
        hash:/usr/local/mailman/data/virtual-mailman
 
80
</pre></div>
 
81
 
 
82
<p>
 
83
assuming you've installed Mailman in the default location.  If you're using an
 
84
older version of Postfix which doesn't have the <var>virtual_alias_maps</var>
 
85
variable, use the <var>virtual_maps</var> variable instead.
 
86
 
 
87
<p>
 
88
Next, in your <span class="file">mm_cfg.py</span> file, you will want to set the variable
 
89
<var>POSTFIX_STYLE_VIRTUAL_DOMAINS</var> to the list of virtual domains that Mailman
 
90
should update.  This may not be all of the virtual alias domains that your
 
91
Postfix installation supports!  The values in this list will be matched
 
92
against the <var>host_name</var> attribute of mailing lists objects, and must be an
 
93
exact match.
 
94
 
 
95
<p>
 
96
Here's an example.  Say that Postfix is configured to handle the virtual
 
97
domains <code>dom1.ain</code>, <code>dom2.ain</code>, and <code>dom3.ain</code>, and further
 
98
that in your <span class="file">main.cf</span> file you've got the following settings:
 
99
 
 
100
<p>
 
101
<div class="verbatim"><pre>
 
102
    myhostname = mail.dom1.ain
 
103
    mydomain = dom1.ain
 
104
    mydestination = $myhostname, localhost.$mydomain
 
105
    virtual_alias_maps =
 
106
        hash:/some/path/to/virtual-dom1,
 
107
        hash:/some/path/to/virtual-dom2,
 
108
        hash:/some/path/to/virtual-dom2
 
109
</pre></div>
 
110
 
 
111
<p>
 
112
If in your <span class="file">virtual-dom1</span> file, you've got the following lines:
 
113
 
 
114
<p>
 
115
<div class="verbatim"><pre>
 
116
    dom1.ain  IGNORE
 
117
    @dom1.ain @mail.dom1.ain
 
118
</pre></div>
 
119
 
 
120
<p>
 
121
this tells Postfix to deliver anything addressed to <code>dom1.ain</code> to the
 
122
same mailbox at <code>mail.dom1.com</code>, its default destination.
 
123
 
 
124
<p>
 
125
In this case you would not include <code>dom1.ain</code> in
 
126
<var>POSTFIX_STYLE_VIRTUAL_DOMAINS</var> because otherwise Mailman will write
 
127
entries for mailing lists in the dom1.ain domain as
 
128
 
 
129
<p>
 
130
<div class="verbatim"><pre>
 
131
    mylist@dom1.ain         mylist
 
132
    mylist-request@dom1.ain mylist-request
 
133
    # and so on...
 
134
</pre></div>
 
135
 
 
136
<p>
 
137
The more specific entries trump your more general entries, thus breaking the
 
138
delivery of any <code>dom1.ain</code> mailing list.
 
139
 
 
140
<p>
 
141
However, you would include <code>dom2.ain</code> and <code>dom3.ain</code> in
 
142
<span class="file">mm_cfg.py</span>:
 
143
 
 
144
<p>
 
145
<div class="verbatim"><pre>
 
146
    POSTFIX_STYLE_VIRTUAL_DOMAINS = ['dom2.ain', 'dom3.ain']
 
147
</pre></div>
 
148
 
 
149
<p>
 
150
Now, any list that Mailman creates in either of those two domains, will have
 
151
the correct entries written to <span class="file">/usr/local/mailman/data/virtual-mailman</span>.
 
152
 
 
153
<p>
 
154
As above with the <span class="file">data/aliases*</span> files, you want to make sure that both
 
155
<span class="file">data/virtual-mailman</span> and <span class="file">data/virtual-mailman.db</span> are user and
 
156
group owned by <code>mailman</code>.
 
157
 
 
158
<p>
 
159
 
 
160
<div class="navigation">
 
161
<div class='online-navigation'>
 
162
<p></p><hr />
 
163
<table align="center" width="100%" cellpadding="0" cellspacing="2">
 
164
<tr>
 
165
<td class='online-navigation'><a rel="prev" title="6.1.1 integrating Postfix and"
 
166
  href="node13.html"><img src='previous.png'
 
167
  border='0' height='32'  alt='Previous Page' width='32' /></a></td>
 
168
<td class='online-navigation'><a rel="parent" title="6.1 using the Postfix"
 
169
  href="node12.html"><img src='up.png'
 
170
  border='0' height='32'  alt='Up one Level' width='32' /></a></td>
 
171
<td class='online-navigation'><a rel="next" title="6.1.3 an alternative approach"
 
172
  href="node15.html"><img src='next.png'
 
173
  border='0' height='32'  alt='Next Page' width='32' /></a></td>
 
174
<td align="center" width="100%">GNU Mailman - Installation Manual</td>
 
175
<td class='online-navigation'><img src='blank.png'
 
176
  border='0' height='32'  alt='' width='32' /></td>
 
177
<td class='online-navigation'><img src='blank.png'
 
178
  border='0' height='32'  alt='' width='32' /></td>
 
179
<td class='online-navigation'><img src='blank.png'
 
180
  border='0' height='32'  alt='' width='32' /></td>
 
181
</tr></table>
 
182
<div class='online-navigation'>
 
183
<b class="navlabel">Previous:</b>
 
184
<a class="sectref" rel="prev" href="node13.html">6.1.1 Integrating Postfix and</a>
 
185
<b class="navlabel">Up:</b>
 
186
<a class="sectref" rel="parent" href="node12.html">6.1 Using the Postfix</a>
 
187
<b class="navlabel">Next:</b>
 
188
<a class="sectref" rel="next" href="node15.html">6.1.3 An alternative approach</a>
 
189
</div>
 
190
</div>
 
191
<hr />
 
192
<span class="release-info">Release 2.1, documentation updated on April 21, 2008.</span>
 
193
</div>
 
194
<!--End of Navigation Panel-->
 
195
 
 
196
</body>
 
197
</html>