source: server/mail/courier/courier-config.xml@ 65df9fca

10.0 10.1 11.0 6.0 6.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 ken/refactor-virt krejzi/svn lazarus nosym perl-modules qt5new systemd-11177 systemd-13485 trunk v5_1 xry111/git-date xry111/git-date-for-trunk xry111/git-date-test
Last change on this file since 65df9fca was 65df9fca, checked in by Larry Lawrence <larry@…>, 17 years ago

grammar corrections

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@2252 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 11.5 KB
Line 
1<sect2>
2<title>Configuring <application>Courier</application></title>
3
4<sect3><title>Config files</title>
5<para><filename>/etc/courier/*</filename></para>
6</sect3>
7
8<sect3><title>Configuration Information</title>
9
10<para>Make the following changes in
11<filename>/etc/courier/authmysqlrc</filename> file if you are utilizing
12<application>My<acronym>SQL</acronym></application>:</para>
13
14<screen><userinput>MYSQL_SERVER localhost
15MYSQL_USERNAME courier
16MYSQL_PASSWORD <replaceable>[your choice]</replaceable>
17MYSQL_SOCKET /tmp/mysql.sock
18MYSQL_PORT 3306
19MYSQL_DATABASE courier_mail
20MYSQL_USER_TABLE users
21MYSQL_CLEAR_PWFIELD clear
22DEFAULT DOMAIN <replaceable>[your domain]</replaceable>
23MYSQL_QUOTA_FIELD quota</userinput></screen>
24
25<para>If you utilize <application>PAM</application>:</para>
26
27<screen><userinput><command>cat &gt; /etc/pam.d/esmtp &lt;&lt; "EOF</command>
28# Begin /etc/pam.d/esmtp
29
30auth required pam_unix.so try_first_pass
31account required pam_unix.so
32session required pam_unix.so
33
34# End /etc/pam.d/esmtp
35<command>EOF
36cat &gt; /etc/pam.d/pop3 &lt;&lt; "EOF</command>
37# Begin /etc/pam.d/pop3
38
39auth required pam_unix.so try_first_pass
40account required pam_unix.so
41session required pam_unix.so
42
43# End /etc/pam.d/pop3
44<command>EOF
45cat &gt; /etc/pam.d/imap &lt;&lt; "EOF</command>
46# Begin /etc/pam.d/imap
47
48auth required pam_unix.so try_first_pass
49account required pam_unix.so
50session required pam_unix.so
51
52# End /etc/pam.d/imap
53<command>EOF
54cat &gt; /etc/pam.d/webmail &lt;&lt; "EOF</command>
55# Begin /etc/pam.d/webmail
56
57auth required pam_unix.so try_first_pass
58account required pam_unix.so
59session required pam_unix.so
60
61# End /etc/pam.d/webmail
62<command>EOF</command></userinput></screen>
63
64<para>Connect to the <application>My<acronym>SQL</acronym></application>
65database:</para>
66
67<screen><userinput><command>mysql -p</command></userinput></screen>
68
69<para>This command will create the database for authentication:</para>
70
71<screen><userinput><command>CREATE DATABASE courier_mail;
72USE courier_mail</command></userinput></screen>
73
74<para>This command will setup the table users for the courier_mail
75database:</para>
76
77<screen><userinput><command>CREATE TABLE users (
78id char(128) DEFAULT '' NOT NULL,
79crypt char(128) DEFAULT '' NOT NULL,
80clear char(128) DEFAULT '' NOT NULL,
81name char(128) DEFAULT '' NOT NULL,
82uid int(10) unsigned DEFAULT '65534' NOT NULL,
83gid int(10) unsigned DEFAULT '65534' NOT NULL,
84home char(255) DEFAULT '' NOT NULL,
85quota char(255) DEFAULT '' NOT NULL,
86KEY id (id(128))
87);</command></userinput></screen>
88
89<para>This will add the courier user that we specified earlier in the
90<filename>/etc/courier/authmysqlrc</filename> file:</para>
91
92<screen><userinput><command>GRANT ALL PRIVILEGES ON *.* TO courier@localhost IDENTIFIED BY '<replaceable>[password]</replaceable>' WITH GRANT OPTION;
93QUIT</command></userinput></screen>
94
95<para><emphasis>General Settings for Mail</emphasis></para>
96
97<para>You will need to create the following files with the contents
98specified.</para>
99
100<para><filename>/etc/courier/defaultdomain</filename></para>
101
102<screen><userinput><command>cat &gt; /etc/courier/defaultdomain &lt;&lt; "EOF"</command>
103<replaceable>[yourdomain]</replaceable>
104<command>EOF</command></userinput></screen>
105
106<para><filename>/etc/courier/me</filename></para>
107
108<screen><userinput><command>cat &gt; /etc/courier/me &lt;&lt; "EOF"</command>
109<replaceable>[servername.yourdomain]</replaceable>
110<command>EOF</command></userinput></screen>
111
112<para><filename>/etc/courier/locals</filename></para>
113
114<screen><userinput><command>cat &gt; /etc/courier/locals &lt;&lt; "EOF"</command>
115localhost
116<replaceable>[yourdomain]</replaceable>
117<command>EOF</command></userinput></screen>
118
119<para><filename>/etc/courier/esmtpacceptmailfor.dir/system</filename></para>
120
121<screen><userinput><command>cat &gt;/etc/courier/esmtpacceptmailfor.dir/system &lt;&lt; "EOF"</command>
122localhost
123<replaceable>[yourdomain]</replaceable>
124<command>EOF</command></userinput></screen>
125
126<para>You will also need to edit the aliases file and change the
127following entry.</para>
128
129<para><filename>/etc/courier/aliases/system</filename></para>
130
131<screen><userinput>postmaster: <replaceable>[your administrator email]</replaceable></userinput></screen>
132
133<para>If you want to deny access from some hosts from sending mail, you
134will need to edit the
135<filename>/etc/courier/smtpaccess/default</filename> file.</para>
136
137<para>After the above steps are completed you will need to run the
138following commands:</para>
139
140<screen><userinput><command>makesmtpaccess &amp;&amp;
141makehosteddomains &amp;&amp;
142makealiases</command></userinput></screen>
143
144<para><emphasis><acronym>SMTP</acronym>/<acronym>SMTMP</acronym>-<acronym>SSL
145</acronym> Configuration</emphasis></para>
146
147<para>This section will enable the <acronym>SMTP</acronym> Server from Courier</para>
148
149<para><filename>/etc/courier/esmtpd</filename></para>
150
151<screen><userinput>ESMTPDSTART=YES</userinput></screen>
152
153<para><filename>/etc/courier/esmtpd-ssl</filename></para>
154
155<screen><userinput>ESMTPDSSLSTART=YES</userinput></screen>
156
157<para><emphasis><acronym>POP</acronym>3/<acronym>POP</acronym>3-<acronym>SSL
158</acronym> Configuration</emphasis></para>
159
160<para>This section will enable the <acronym>POP</acronym>3 Server from
161Courier</para>
162
163
164<para><filename>/etc/courier/pop3d</filename></para>
165
166<screen><userinput>POP3DSTART=YES</userinput></screen>
167
168<para><filename>/etc/courier/pop3d-ssl</filename></para>
169
170<screen><userinput>POP3DSLLSTART=YES</userinput></screen>
171
172<para><emphasis><acronym>IMAP</acronym>/<acronym>IMAP</acronym>-<acronym>SSL
173</acronym> Configuration</emphasis></para>
174
175<para>This section will enable the <acronym>IMAP</acronym> Server from
176Courier</para>
177
178<para><filename>/etc/courier/imapd</filename></para>
179
180
181<screen><userinput>IMAPDSTART=YES</userinput></screen>
182
183<para><filename>/etc/courierd/imapd-ssl</filename></para>
184
185<screen><userinput>IMAPDSSLSTART=YES</userinput></screen>
186
187<para><emphasis>Creating Mail directories for System Users</emphasis></para>
188
189
190<para>This section will explain how to create MailDirs for
191your system users.</para>
192
193<screen><userinput><command>cd /home/<replaceable>[username]</replaceable> &amp;&amp;
194maildirmake Maildir &amp;&amp;
195chown <replaceable>[username]</replaceable>.<replaceable>[username]</replaceable> Maildir -R</command></userinput></screen>
196
197<para><emphasis>Setup for Virtual users</emphasis></para>
198
199<para>This section will explain how to setup Maildir for your virtual
200users.</para>
201
202<screen><userinput><command>groupadd -g 9000 vmailman &amp;&amp;
203useradd -c 'Virtual Mailman' -g vmailman -m -k /dev/null -u 9000 vmailman</command></userinput></screen>
204
205<para>Now to setup the Maildir for these virtual users.</para>
206
207<screen><userinput><command>cd /home/vmailman &amp;&amp;
208mkdir <replaceable>[virtual_user]</replaceable> &amp;&amp;
209cd <replaceable>[virtual_user]</replaceable> &amp;&amp;
210maildirmake Maildir &amp;&amp;
211chown vmailman.vmailman Maildir -R</command></userinput></screen>
212
213<para>Connect to the <application>My<acronym>SQL</acronym></application>
214database.</para>
215
216<screen><userinput><command>mysql -u courier -p</command></userinput></screen>
217
218<para>To add the virtual user you need to enter at
219least one version of the password either clear text or encrypted.</para>
220
221<screen><userinput><command>USE courier_mail
222INSERT INTO users VALUES (
223'<replaceable>[virtual_users]</replaceable>@<replaceable>[domain.com]</replaceable>,
224'<replaceable>[encrypted password or blank]</replaceable>',
225'<replaceable>[clear text password or blank]</replaceable>',
226'<replaceable>[User's Name]</replaceable>',
2279000,
2289000,
229'<replaceable>[location of Maildir]</replaceable>',
230'<replaceable>[Quota in Bytes']</replaceable>
231);
232QUIT</command></userinput></screen>
233
234<para>For example:</para>
235
236<screen><userinput><command>INSERT INTO users VALUES (
237'blfsuser@linuxfromscratch.org',
238'',
239'password',
240'BLFS User',
2419000,
2429000,
243'/home/vmailman/blfsuser',
244''
245);</command></userinput></screen>
246
247<para><emphasis>Setup for Web-based Email</emphasis></para>
248
249<para>This section will explain how to setup Courier Web-based email
250system.</para>
251
252<para>You will need to copy the <filename>webmail</filename> file from
253<filename>/usr/lib/courier/courier/webmail</filename> to your <filename>cgi-bin
254</filename> directory of your <application>Apache</application>
255server.</para>
256
257<screen><userinput><command>cp -a /usr/lib/courier/courier/webmail/webmail /var/www/cgi-bin</command></userinput></screen>
258
259<para>You will then need to copy the images to a directory under your
260<filename>htdocs</filename> directory of your
261<application>Apache</application> server. The directory needs to be named
262<filename>webmail</filename> or you need to specify it during the configure
263phase with <parameter>--enable-imageurl=<replaceable>[URL]</replaceable></parameter>.</para>
264
265<screen><userinput><command>cp -a /usr/share/courier/sqwebmail/images /var/www/htdocs/webmail</command></userinput></screen>
266<para><emphasis>Setup for Web-based Email</emphasis></para>
267
268<para>This section will explain how to setup Courier Web-based administration
269system.</para>
270
271<para>You will need to copy the <filename>webadmin</filename> file from
272<filename class="directory">/usr/lib/courier/courier/webmail</filename>
273to your <filename class="directory">cgi-bin</filename> directory of your
274<application>Apache</application> server.</para>
275
276<screen><userinput><command>cp -a /usr/lib/courier/courier/webmail/webadmin /var/www/cgi-bin</command></userinput></screen>
277
278<para><filename>/etc/courier/webadmin/password</filename></para>
279
280<screen><userinput><command>cat &gt; /etc/courier/webadmin/password &lt;&lt; "EOF"</command>
281<replaceable>[password]</replaceable>
282<command>EOF</command></userinput></screen>
283
284<para>If you are not using <acronym>SSL</acronym> on your <application>Apache
285</application> server, you will need to add
286<filename>/etc/courier/webadmin/unsecureok</filename>, so you will be able
287to use your web based administration tool.</para>
288
289<screen><userinput><command>touch /etc/courier/webadmin/unsecureok</command></userinput></screen>
290</sect3>
291
292<sect3><title>Courier init.d script</title>
293
294<para>The startup script from the <application>Courier</application> package is
295the easiest to use. It will automatically create missing data files, and
296<acronym>SSL</acronym> certificates if they are missing. To install the
297init.d file for <application>Courier</application>, you will need to use the
298following commands:</para>
299
300<screen><userinput><command>cp /usr/src/courier-&courier-version;/courier.sysvinit /etc/rc.d/init.d/courier &amp;&amp;
301chmod 754 /etc/rc.d/init.d/courier</command></userinput></screen>
302
303<para>Create the symbolic links to this file in the relevant
304<filename>rc.d</filename> directory with the following commands:</para>
305
306<screen><userinput><command>cd /etc/rc.d/init.d &amp;&amp;
307ln -sf ../init.d/courier ../rc0.d/K25courier &amp;&amp;
308ln -sf ../init.d/courier ../rc1.d/K25courier &amp;&amp;
309ln -sf ../init.d/courier ../rc2.d/K25courier &amp;&amp;
310ln -sf ../init.d/courier ../rc3.d/S35courier &amp;&amp;
311ln -sf ../init.d/courier ../rc4.d/S35courier &amp;&amp;
312ln -sf ../init.d/courier ../rc5.d/S35courier &amp;&amp;
313ln -sf ../init.d/courier ../rc6.d/K25courier</command></userinput></screen>
314
315</sect3>
316</sect2>
Note: See TracBrowser for help on using the repository browser.