aboutsummaryrefslogblamecommitdiffstats
path: root/doc/mailman-install/qmail-issues.html
blob: bee51ec4e68ceb2dc4ee614683305a22b589825f (plain) (tree)
































































































































































































































                                                                                                               




























                                                                                                      














































                                                                              
                                                                                        




                              
<!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="prev" href="node31.html" />
<link rel="parent" href="mail-server.html" />
<link rel="next" href="node36.html" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name='aesop' content='information' />
<title>6.4 Using the Qmail mail server</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.3.3 performance notes"
  href="node34.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 set up your"
  href="mail-server.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.4.1 information on VERP"
  href="node36.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="node34.html">6.3.3 Performance notes</a>
<b class="navlabel">Up:</b>
<a class="sectref" rel="parent" href="mail-server.html">6 Set up your</a>
<b class="navlabel">Next:</b>
<a class="sectref" rel="next" href="node36.html">6.4.1 Information on VERP</a>
</div>
<hr /></div>
</div>
<!--End of Navigation Panel-->

<h2><a name="SECTION001640000000000000000"></a><a name="qmail-issues"></a>
<br>
6.4 Using the Qmail mail server
</h2>

<p>
There are some issues that users of the qmail mail transport agent have
encountered.  None of the core maintainers use qmail, so all of this
information has been contributed by the Mailman user community, especially
Martin Preishuber and Christian Tismer, with notes by Balazs Nagy (BN) and
Norbert Bollow (NB).

<p>

<ul>
<li>You might need to set the mail-gid user to either <code>qmail</code>,
      <code>mailman</code>, or <code>nofiles</code> by using the
      <b class="programopt">--with-mail-gid</b> <b class="program">configure</b> option.

<p>
<em>BN:</em> it highly depends on your mail storing policy.  For example
      if you use the simple <span class="file">~alias/.qmail-*</span> files, you can use
      <b class="program">`id -g alias`</b>.  But if you use <span class="file">/var/qmail/users</span>, the
      specified mail gid can be used.

<p>
If you are going to be directing virtual domains directly to the
      <code>mailman</code> user (using ``virtualdomains'' on a list-only domain, for
      example), you will have to use <b class="programopt">--with-mail-gid</b>=<var>gid
      of mailman user's group</var>.  This is incompatible with having list aliases
      in <span class="file">~alias</span>, unless that alias simply forwards to
      <code>mailman-listname*</code>.

<p>
</li>
<li>If there is a user <code>mailman</code> on your system, the alias
      <code>mailman-owner</code> will work only in <span class="file">~mailman</span>.  You have to do
      a <b class="program">touch .qmail-owner</b> in <span class="file">~mailman</span> directory to create
      this alias.

<p>
<em>NB:</em> An alternative, IMHO better solution is to <b class="program">chown
      root ~mailman</b>, that will stop qmail from considering <code>mailman</code> to
      be a user to whom mail can be delivered.  (See ``man 8 qmail-getpw''.)

<p>
</li>
<li>In a related issue, if you have any users with the same name as one of
      your mailing lists, you will have problems if list names contain
      "<tt class="samp">-</tt>" in them.  Putting <span class="file">.qmail</span> redirections into the user's
      home directory doesn't work because the Mailman wrappers will not get
      spawned with the proper GID.  The solution is to put the following lines
      in the <span class="file">/var/qmail/users/assign</span> file:

<p>
<div class="verbatim"><pre>
  +zope-:alias:112:11:/var/qmail/alias:-:zope-:
  .
</pre></div>

<p>
where in this case the listname is e.g. <code>zope-users</code>.

<p>
<em>NB:</em> Alternatively, you could host the lists on a virtual domain,
      and use the <span class="file">/var/qmail/control/virtualdomains</span> file to put the
      <code>mailman</code> user in charge of this virtual domain.

<p>
</li>
<li><em>BN:</em>If inbound messages are delivered by another user than
      <code>mailman</code>, it's necessary to allow it to access <span class="file">~mailman</span>.
      Be sure that <span class="file">~mailman</span> has group writing access and setgid bit is
      set.  Then put the delivering user to <code>mailman</code> group, and you can
      deny access to <span class="file">~mailman</span> to others.  Be sure that you can do the
      same with the WWW service.

<p>
By the way the best thing is to make a virtual mail server to handle all
      of the mail.  <em>NB:</em> E.g. make an additional "A" DNS record for the
      virtual mailserver pointing to your IP address, add the line
      <code>lists.kva.hu:mailman</code> to <span class="file">/var/qmail/control/virtualdomains</span>
      and a <code>lists.kva.hu</code> line to <span class="file">/var/qmail/control/rcpthosts</span>
      file.  Don't forget to HUP the qmail-send after modifying
      ``virtualdomains''.  Then every mail to lists.kva.hu will arrive to
      mail.kva.hu's mailman user.

<p>
Then make your aliases:

<p>
<div class="verbatim"><pre>
          .qmail              =&gt; mailman@...'s letters
          .qmail-owner        =&gt; mailman-owner's letters
</pre></div>

<p>
For list aliases, you can either create them manually:

<p>
<div class="verbatim"><pre>
          .qmail-list         =&gt; posts to the 'list' list
          .qmail-list-admin   =&gt; posts to the 'list's owner
          .qmail-list-request =&gt; requests to 'list'
          etc
</pre></div>

<p>
or for automatic list alias handling (when using the lists.kva.hu
      virtual as above), see <span class="file">contrib/qmail-to-mailman.py</span> in the Mailman
      source distribution.  Modify the <span class="file">~mailman/.qmail-default</span> to
      include:

<p>
<div class="verbatim"><pre>
          |preline /path/to/python /path/to/qmail-to-mailman.py
</pre></div>

<p>
and new lists will automatically be picked up.

<p>
</li>
<li>You have to make sure that the localhost can relay.  If you start qmail
      via inetd and tcpenv, you need some line the following in your
      <span class="file">/etc/hosts.allow</span> file:

<p>
<div class="verbatim"><pre>
      tcp-env: 127. 10.205.200. : setenv RELAYCLIENT
</pre></div>

<p>
where 10.205.200. is your IP address block.  If you use tcpserver, then
      you need something like the following in your <span class="file">/etc/tcp.smtp</span> file:

<p>
<div class="verbatim"><pre>
      10.205.200.:allow,RELAYCLIENT=""
      127.:allow,RELAYCLIENT=""
</pre></div>

<p>
</li>
<li><em>BN:</em> Bigger <span class="file">/var/qmail/control/concurrencyremote</span> values
      work better sending outbound messages, within reason.  Unless you know
      your system can handle it (many if not most cannot) this should not be
      set to a value greater than 120.

<p>
</li>
<li>More information about setting up qmail and relaying can be found in the
      qmail documentation.
</li>
</ul>

<p>
<em>BN:</em> Last but not least, here's a little script to generate aliases to
your lists (if for some reason you can/will not have them automatically picked
up using <span class="file">contrib/qmail-to-mailman.py</span>):

<p>
This script is for the Mailman 2.0 series:

<p>
<div class="verbatim"><pre>
#!/bin/sh
if [ $# = 1 ]; then
    i=$1
    echo Making links to $i in the current directory...
    echo "|preline /home/mailman/mail/mailman post $i" &gt; .qmail-$i
    echo "|preline /home/mailman/mail/mailman mailowner $i" &gt; .qmail-$i-admin
    echo "|preline /home/mailman/mail/mailman mailowner $i" &gt; .qmail-$i-owner
    echo "|preline /home/mailman/mail/mailman mailowner $i" &gt; .qmail-owner-$i
    echo "|preline /home/mailman/mail/mailman mailcmd $i" &gt; .qmail-$i-request
fi
</pre></div>
<p>
<div class="note"><b class="label">Note:</b>

This is for a new Mailman 2.1 installation.  Users upgrading from
Mailman 2.0 would most likely change <span class="file">/usr/local/mailman</span> to
<span class="file">/home/mailman</span>.  If in doubt, refer to the <b class="programopt">--prefix</b>
option passed to <b class="program">configure</b> during compile time.
</div>

<p>
<div class="verbatim"><pre>
#!/bin/sh
if [ $# = 1 ]; then
    i=$1
    echo Making links to $i in the current directory...
    echo "|preline /usr/local/mailman/mail/mailman post $i" &gt; .qmail-$i
    echo "|preline /usr/local/mailman/mail/mailman admin $i" &gt; .qmail-$i-admin
    echo "|preline /usr/local/mailman/mail/mailman bounces $i" &gt; .qmail-$i-bounces
    # The following line is for VERP
    # echo "|preline /usr/local/mailman/mail/mailman bounces $i" &gt; .qmail-$i-bounces-default
    echo "|preline /usr/local/mailman/mail/mailman confirm $i" &gt; .qmail-$i-confirm
    echo "|preline /usr/local/mailman/mail/mailman join $i" &gt; .qmail-$i-join
    echo "|preline /usr/local/mailman/mail/mailman leave $i" &gt; .qmail-$i-leave
    echo "|preline /usr/local/mailman/mail/mailman owner $i" &gt; .qmail-$i-owner
    echo "|preline /usr/local/mailman/mail/mailman request $i" &gt; .qmail-$i-request
    echo "|preline /usr/local/mailman/mail/mailman subscribe $i" &gt; .qmail-$i-subscribe
    echo "|preline /usr/local/mailman/mail/mailman unsubscribe $i" &gt; .qmail-$i-unsubscribe
fi
</pre></div>
<p>

<p><br /></p><hr class='online-navigation' />
<div class='online-navigation'>
<!--Table of Child-Links-->
<a name="CHILD_LINKS"><strong>Subsections</strong></a>

<ul class="ChildLinks">
<li><a href="node36.html">6.4.1 Information on VERP</a>
<li><a href="node37.html">6.4.2 Virtual mail server</a>
<li><a href="node38.html">6.4.3 More information</a>
</ul>
<!--End of Table of Child-Links-->
</div>

<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.3.3 performance notes"
  href="node34.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 set up your"
  href="mail-server.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.4.1 information on VERP"
  href="node36.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="node34.html">6.3.3 Performance notes</a>
<b class="navlabel">Up:</b>
<a class="sectref" rel="parent" href="mail-server.html">6 Set up your</a>
<b class="navlabel">Next:</b>
<a class="sectref" rel="next" href="node36.html">6.4.1 Information on VERP</a>
</div>
</div>
<hr />
<span class="release-info">Release 2.1, documentation updated on August 26, 2016.</span>
</div>
<!--End of Navigation Panel-->

</body>
</html>