diff options
Diffstat (limited to 'admin/www/mailman-install/postfix-virtual.html')
-rw-r--r-- | admin/www/mailman-install/postfix-virtual.html | 196 |
1 files changed, 196 insertions, 0 deletions
diff --git a/admin/www/mailman-install/postfix-virtual.html b/admin/www/mailman-install/postfix-virtual.html new file mode 100644 index 00000000..7d7a137e --- /dev/null +++ b/admin/www/mailman-install/postfix-virtual.html @@ -0,0 +1,196 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<html> +<head> +<link rel="STYLESHEET" href="mailman-install.css" type='text/css' /> +<link rel="first" href="mailman-install.html" title='GNU Mailman - Installation Manual' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="node15.html" /> +<link rel="prev" href="node13.html" /> +<link rel="parent" href="node12.html" /> +<link rel="next" href="node15.html" /> +<meta name='aesop' content='information' /> +<title>6.1.2 Virtual domains</title> +</head> +<body> +<DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> +<table align="center" width="100%" cellpadding="0" cellspacing="2"> +<tr> +<td class='online-navigation'><a rel="prev" title="6.1.1 Integrating Postfix and" + href="node13.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="6.1 Using the Postfix" + href="node12.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="6.1.3 An alternative approach" + href="node15.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> +<td align="center" width="100%">GNU Mailman - Installation Manual</td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +</tr></table> +<div class='online-navigation'> +<b class="navlabel">Previous:</b> +<a class="sectref" rel="prev" href="node13.html">6.1.1 Integrating Postfix and</A> +<b class="navlabel">Up:</b> +<a class="sectref" rel="parent" href="node12.html">6.1 Using the Postfix</A> +<b class="navlabel">Next:</b> +<a class="sectref" rel="next" href="node15.html">6.1.3 An alternative approach</A> +</div> +<hr /></div> +</DIV> +<!--End of Navigation Panel--> + +<H3><A NAME="SECTION001612000000000000000"></A><A NAME="postfix-virtual"></A> +<BR> +6.1.2 Virtual domains +</H3> + +<P> +Postfix 2.0 supports ``virtual alias domains'', essentially what used to be +called ``Postfix-style virtual domains'' in earlier Postfix versions. To make +virtual alias domains work with Mailman, you need to do some setup in both +Postfix and Mailman. Mailman will write all virtual alias mappings to a file +called, by default, <span class="file">/usr/local/mailman/data/virtual-mailman</span>. It will +also use <b class="program">postmap</b> to create the <b class="program">virtual-mailman.db</b> file +that Postfix will actually use. + +<P> +First, you need to set up the Postfix virtual alias domains as described in +the Postfix documentation (see Postfix's <code>virtual(5)</code> manpage). Note +that it's your responsibility to include the <code>virtual-alias.domain +anything</code> line as described manpage; Mailman will not include this line in +<span class="file">virtual-mailman</span>. You are highly encouraged to make sure your virtual +alias domains are working properly before integrating with Mailman. + +<P> +Next, add a path to Postfix's <var>virtual_alias_maps</var> variable, pointing to +the virtual-mailman file, e.g.: + +<P> +<div class="verbatim"><pre> + virtual_alias_maps = <your normal virtual alias files>, + hash:/usr/local/mailman/data/virtual-mailman +</pre></div> + +<P> +assuming you've installed Mailman in the default location. If you're using an +older version of Postfix which doesn't have the <var>virtual_alias_maps</var> +variable, use the <var>virtual_maps</var> variable instead. + +<P> +Next, in your <span class="file">mm_cfg.py</span> file, you will want to set the variable +<var>POSTFIX_STYLE_VIRTUAL_DOMAINS</var> to the list of virtual domains that Mailman +should update. This may not be all of the virtual alias domains that your +Postfix installation supports! The values in this list will be matched +against the <var>host_name</var> attribute of mailing lists objects, and must be an +exact match. + +<P> +Here's an example. Say that Postfix is configured to handle the virtual +domains <code>dom1.ain</code>, <code>dom2.ain</code>, and <code>dom3.ain</code>, and further +that in your <span class="file">main.cf</span> file you've got the following settings: + +<P> +<div class="verbatim"><pre> + myhostname = mail.dom1.ain + mydomain = dom1.ain + mydestination = $myhostname, localhost.$mydomain + virtual_alias_maps = + hash:/some/path/to/virtual-dom1, + hash:/some/path/to/virtual-dom2, + hash:/some/path/to/virtual-dom2 +</pre></div> + +<P> +If in your <span class="file">virtual-dom1</span> file, you've got the following lines: + +<P> +<div class="verbatim"><pre> + dom1.ain IGNORE + @dom1.ain @mail.dom1.ain +</pre></div> + +<P> +this tells Postfix to deliver anything addressed to <code>dom1.ain</code> to the +same mailbox at <code>mail.dom1.com</code>, its default destination. + +<P> +In this case you would not include <code>dom1.ain</code> in +<var>POSTFIX_STYLE_VIRTUAL_DOMAINS</var> because otherwise Mailman will write +entries for mailing lists in the dom1.ain domain as + +<P> +<div class="verbatim"><pre> + mylist@dom1.ain mylist + mylist-request@dom1.ain mylist-request + # and so on... +</pre></div> + +<P> +The more specific entries trump your more general entries, thus breaking the +delivery of any <code>dom1.ain</code> mailing list. + +<P> +However, you would include <code>dom2.ain</code> and <code>dom3.ain</code> in +<span class="file">mm_cfg.py</span>: + +<P> +<div class="verbatim"><pre> + POSTFIX_STYLE_VIRTUAL_DOMAINS = ['dom2.ain', 'dom3.ain'] +</pre></div> + +<P> +Now, any list that Mailman creates in either of those two domains, will have +the correct entries written to <span class="file">/usr/local/mailman/data/virtual-mailman</span>. + +<P> +As above with the <span class="file">data/aliases*</span> files, you want to make sure that both +<span class="file">data/virtual-mailman</span> and <span class="file">data/virtual-mailman.db</span> are user and +group owned by <code>mailman</code>. + +<P> + +<DIV CLASS="navigation"> +<div class='online-navigation'> +<p></p><hr /> +<table align="center" width="100%" cellpadding="0" cellspacing="2"> +<tr> +<td class='online-navigation'><a rel="prev" title="6.1.1 Integrating Postfix and" + href="node13.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="6.1 Using the Postfix" + href="node12.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="6.1.3 An alternative approach" + href="node15.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> +<td align="center" width="100%">GNU Mailman - Installation Manual</td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +</tr></table> +<div class='online-navigation'> +<b class="navlabel">Previous:</b> +<a class="sectref" rel="prev" href="node13.html">6.1.1 Integrating Postfix and</A> +<b class="navlabel">Up:</b> +<a class="sectref" rel="parent" href="node12.html">6.1 Using the Postfix</A> +<b class="navlabel">Next:</b> +<a class="sectref" rel="next" href="node15.html">6.1.3 An alternative approach</A> +</div> +</div> +<hr /> +<span class="release-info">Release 2.1, documentation updated on December 13, 2004.</span> +</DIV> +<!--End of Navigation Panel--> + +</BODY> +</HTML> |