1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
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>
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">
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>
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>
48
<!--End of Navigation Panel-->
50
<h3><a name="SECTION001612000000000000000"></a><a name="postfix-virtual"></a>
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.
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.
73
Next, add a path to Postfix's <var>virtual_alias_maps</var> variable, pointing to
74
the virtual-mailman file, e.g.:
77
<div class="verbatim"><pre>
78
virtual_alias_maps = <your normal virtual alias files>,
79
hash:/usr/local/mailman/data/virtual-mailman
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.
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
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:
101
<div class="verbatim"><pre>
102
myhostname = mail.dom1.ain
104
mydestination = $myhostname, localhost.$mydomain
106
hash:/some/path/to/virtual-dom1,
107
hash:/some/path/to/virtual-dom2,
108
hash:/some/path/to/virtual-dom2
112
If in your <span class="file">virtual-dom1</span> file, you've got the following lines:
115
<div class="verbatim"><pre>
117
@dom1.ain @mail.dom1.ain
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.
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
130
<div class="verbatim"><pre>
131
mylist@dom1.ain mylist
132
mylist-request@dom1.ain mylist-request
137
The more specific entries trump your more general entries, thus breaking the
138
delivery of any <code>dom1.ain</code> mailing list.
141
However, you would include <code>dom2.ain</code> and <code>dom3.ain</code> in
142
<span class="file">mm_cfg.py</span>:
145
<div class="verbatim"><pre>
146
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['dom2.ain', 'dom3.ain']
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>.
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>.
160
<div class="navigation">
161
<div class='online-navigation'>
163
<table align="center" width="100%" cellpadding="0" cellspacing="2">
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>
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>
192
<span class="release-info">Release 2.1, documentation updated on April 21, 2008.</span>
194
<!--End of Navigation Panel-->