summaryrefslogtreecommitdiff
path: root/mail/mailman/files/FreeBSD-post-install-notes
blob: 020d833b015aba0523d286808e3640e2933f8512 (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
# ----------------------------------------------------------------------
# Post-installation instructions for the FreeBSD port/package of Mailman
# $FreeBSD$
# ----------------------------------------------------------------------


CONTENTS:
* VERY IMPORTANT NOTE
1) General post-installation instructions
2) Integrating Mailman with your web server
3) Integrating Mailman with various mail servers
   3.1) Sendmail
   3.2) Exim
   3.3) Postfix
   3.4) qmail
4) Apache configuration


VERY IMPORTANT NOTE

The Mailman port has a number of build time options.  Getting the values of
some of these right is CRUCIAL if you want your Mailman installation to work!

This is especially relevant to users of the binary package; the official
package will build with default options, and will not support alternative
mail server software (mail transfer agents, MTA) such as Exim, Postfix,
or qmail.  For proper support of these alternatives, the package needs to be
rebuilt with changed options.  The ports-mgmt/poudriere port (or
package) can help with that.


1) General post-installation instructions

   You should find two files named "INSTALL" and "README" in the same
   directory as this file.  You should read them for general
   post-installation instructions.  Bear in mind that the installation of
   Mailman from the FreeBSD port or package may have already taken care of
   many of the steps you may read about in these files.  Also, not everything
   in these files is necessarily relevant to the FreeBSD port.

   In most cases, you will want to override the host name settings (which
   default to 'localhost') by adding these lines to Mailman/mm_cfg.py:
   (the documentation is in Mailman/Defaults.py, but you need to override
   the defaults in mm_cfg.py instead, changes to Defaults.py are lost on
   upgrades):

   # adjust and add this to Mailman/mm_cfg.py:
   DEFAULT_URL_HOST = 'CHANGE_ME.example.org'
   DEFAULT_EMAIL_HOST = 'CHANGE_ME.example.org'
   add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)


2) Integrating Mailman with your web server

   You need to set up your webserver to find Mailman's CGI scripts.  The
   Mailman port works well with either Apache 2.2.x or Apache 2.4.x as
   installed from their respective ports (www/apache22 and www/apache24).
   Other options include lighttpd and nginx, also in the FreeBSD ports
   collection, but not documented in this file.

   If you are using Apache, you need to add at least two lines to your
   httpd.conf.  Assuming that you installed the Mailman port in the default
   location (/usr/local/mailman), they are:

     ScriptAlias /mailman "/usr/local/mailman/cgi-bin"
     Alias /pipermail "/usr/local/mailman/archives/public"

   If you installed the Mailman port to a non-standard location, replace
   "/usr/local/mailman" as appropriate.

   If your Apache is configured for multiple virtual servers, ensure that the
   above configuration lines appear in all the relevant <VirtualHost>
   sections.

   Remember to restart your Apache server after you have changed httpd.conf!

   No specific instructions exist at this time on how to integrate the
   Mailman port with web servers other than Apache.  Please submit any such
   information to the maintainer of the Mailman port.


3) Integrating Mailman with various mail servers


3.1) Sendmail

     The default option is SENDMAIL when the port is built. It will set
     MAIL_GID=mailnull for you.

     When your build is finished, please review the instructions found in
     mailman-install.txt in the same directory port.

     No further instructions exist at this time on how to integrate the
     Mailman port with Sendmail.  Please submit any such information to the
     maintainer of the Mailman port.


3.2) Exim

     The following instructions assume that Exim has been set up from the
     FreeBSD Exim port, and that it runs with a fairly default configuration.
     Specifically, it assumes that Exim runs under the default UID and GID as
     configured by the FreeBSD port.  In other words, that the following
     lines appear in Exim's configure file:

       exim_user = mailnull
       exim_group = mail

     For Exim 4.x, the value of MAIL_GID has to be set to 'mail' (or 6) when
     building the Mailman port; you can choose EXIM4 as build option to
     set it for you.

     Next, follow the instructions in mailman-install.txt found in the same
     directory as this file.  You can add the macros, transport and router
     found in mailman-install.txt verbatim to your Exim's configure file.

     Note that mailman-install.txt as installed with the FreeBSD port of
     Mailman has been patched, and should be trusted over a version of the
     file obtained from another source.  Specifically, when adding the
     macros found in mailman-install.txt, you should set the MAILMAN_USER
     and MAILMAN_GROUP to the same values as those for Exim, namely:

       MAILMAN_USER=mailnull
       MAILMAN_GROUP=mail

     Once you have finished editing configure, remember to re-HUP your Exim
     server:

       # kill -1 `cat /var/run/exim.pid`

     Now, start Mailman's qrunner daemon:

       # /usr/local/etc/rc.d/mailman start

     Troubleshooting:  If you ever see an error message such as the following
     in your Exim's mainlog, that is a sure sign that Exim and Mailman
     disagree about the GID under which mail is delivered:

       ** testlist@your.host.com R=mailman_router T=mailman_transport:
       Child process of mailman_transport transport returned 2 from command:
       /usr/local/mailman/mail/mailman

     In this case, ensure that you have followed the instructions in this
     section to the letter.


3.3) Postfix

     The value of MAIL_GID has to be set to 'nobody' (or 65534) when building
     the Mailman port, so you have to choose POSTFIX on build options to
     set it to you.

     NOTE: the group needs to be 'mailman' if you are using the Mailman
     integration for generating the postfix virtual and aliases files.

     Review the instructions found in mailman-install.txt in the same
     directory as this file.

3.4) qmail

     The maintainer of the Mailman port has no information at this time as to
     the required value of MAIL_GID for Mailman to work with qmail.

     Review the instructions found in mailman-install.txt in the same
     directory as this file.

     No further instructions exist at this time on how to integrate the
     Mailman port with qmail.


4) Apache configuration

    You should add the follow lines to your httpd.conf so
    that the mailman interface works correctly:

    For Apache 2.4:

      <Directory "/usr/local/mailman">
        Options FollowSymLinks ExecCGI
        AllowOverride None
        Require all granted
     </Directory>

    For Apache 2.2:

      <Directory "/usr/local/mailman">
        Options FollowSymLinks ExecCGI
        AllowOverride None
        Order allow,deny
        Allow from all
     </Directory>

   After that, restart your apache:

     # apachectl restart.

-- Matthias Andree <mandree@FreeBSD.org> (current Mailman port maintainer)
-- Jean Milanez Melo <jmelo@FreeBSD.org> (former Mailman port maintainer)