aboutsummaryrefslogtreecommitdiffstats
path: root/doc/mailman-install/qmail-issues.html
blob: 4ea5d5ca3ad941a009df169b50fa7c61ffc0b142 (plain) (blame)
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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
<!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 January 29, 2015.</span>
</div>
<!--End of Navigation Panel-->

</body>
</html>