[0931098] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
| 7 | <!ENTITY courier-download-http "http://prdownloads.sourceforge.net/courier/courier-&courier-version;.tar.bz2">
|
---|
| 8 | <!ENTITY courier-download-ftp " ">
|
---|
| 9 | <!ENTITY courier-size "4.2 MB">
|
---|
| 10 | <!ENTITY courier-buildsize "114 MB">
|
---|
| 11 | <!ENTITY courier-time "3.00 SBU">
|
---|
| 12 |
|
---|
| 13 | ]>
|
---|
| 14 |
|
---|
[1a1da48] | 15 | <sect1 id="courier" xreflabel="Courier-&courier-version;">
|
---|
[a0f03b0] | 16 | <sect1info>
|
---|
[5cd0959d] | 17 | <othername>$LastChangedBy$</othername>
|
---|
| 18 | <date>$Date$</date>
|
---|
[a0f03b0] | 19 | </sect1info>
|
---|
[00bb024c] | 20 | <?dbhtml filename="courier.html"?>
|
---|
[1a1da48] | 21 | <title>Courier-&courier-version;</title>
|
---|
[f45b1953] | 22 |
|
---|
[0931098] | 23 | <sect2>
|
---|
| 24 | <title>Introduction to <application>Courier</application></title>
|
---|
| 25 |
|
---|
| 26 | <para>The <application>Courier</application> package contains a Mail Transport
|
---|
| 27 | Agent (<acronym>MTA</acronym>). This is useful for sending email to other users
|
---|
| 28 | of your host machine. It can also be configured to be a central mail server for
|
---|
| 29 | your domain or a mail relay agent. The <application>Courier</application>
|
---|
| 30 | packages also includes a web-based email interface, <acronym>IMAP</acronym>,
|
---|
| 31 | <acronym>IMAP</acronym>-<acronym>SSL</acronym>, <acronym>POP</acronym>3, and
|
---|
| 32 | <acronym>POP</acronym>3-<acronym>SSL</acronym>.</para>
|
---|
| 33 |
|
---|
| 34 | <!--
|
---|
| 35 | The configuration
|
---|
| 36 | listed below will allow users with <acronym>PAM</acronym> and virtual-users in
|
---|
| 37 | a <application>My<acronym>SQL</acronym></application> Database access to email.</para>
|
---|
| 38 | -->
|
---|
| 39 |
|
---|
| 40 | <sect3><title>Package information</title>
|
---|
| 41 | <itemizedlist spacing='compact'>
|
---|
[7ee9849] | 42 | <listitem><para>Download (HTTP):
|
---|
| 43 | <ulink url="&courier-download-http;"/></para></listitem>
|
---|
| 44 | <listitem><para>Download (FTP):
|
---|
| 45 | <ulink url="&courier-download-ftp;"/></para></listitem>
|
---|
[0931098] | 46 | <listitem><para>Download size: &courier-size;</para></listitem>
|
---|
[7ee9849] | 47 | <listitem><para>Estimated disk space required:
|
---|
| 48 | &courier-buildsize;</para></listitem>
|
---|
| 49 | <listitem><para>Estimated build time:
|
---|
| 50 | &courier-time;</para></listitem></itemizedlist>
|
---|
[0931098] | 51 | </sect3>
|
---|
| 52 |
|
---|
| 53 | <sect3><title><application>Courier</application> dependencies</title>
|
---|
| 54 | <sect4><title>Required</title>
|
---|
[7ee9849] | 55 | <para><xref linkend="gdbm"/><!-- or <xref linkend="db"/> --></para>
|
---|
| 56 | </sect4>
|
---|
[0931098] | 57 | <sect4><title>Optional</title>
|
---|
[7ee9849] | 58 | <para><xref linkend="mysql"/> or <xref linkend="postgresql"/>,
|
---|
[0931098] | 59 | <xref linkend="Linux_PAM"/>,
|
---|
[939cf0da] | 60 | <xref linkend="openssl-package"/>,
|
---|
[0931098] | 61 | <xref linkend="fam"/>,
|
---|
| 62 | <xref linkend="openldap"/>,
|
---|
| 63 | <xref linkend="apache"/>,
|
---|
| 64 | <xref linkend="ispell"/> or <xref linkend="aspell"/>,
|
---|
| 65 | <xref linkend="gnupg"/>,
|
---|
[216ef4f] | 66 | <xref linkend="expect"/>,
|
---|
[0931098] | 67 | <ulink url="http://netpbm.sourceforge.net/">Netpbm</ulink> and
|
---|
| 68 | <ulink url="http://alpha.greenie.net/mgetty/">Mgetty+Sendfax</ulink>
|
---|
| 69 | </para></sect4>
|
---|
| 70 | </sect3>
|
---|
| 71 |
|
---|
| 72 | </sect2>
|
---|
| 73 |
|
---|
| 74 | <sect2>
|
---|
| 75 | <title>Installation of <application>Courier</application></title>
|
---|
| 76 |
|
---|
| 77 | <para> Before you compile the program, you need to create users and groups that
|
---|
| 78 | will be expected to be in place when the install script executes. Add the users
|
---|
| 79 | and groups with the following commands:</para>
|
---|
| 80 |
|
---|
| 81 | <screen><userinput><command>groupadd courier &&
|
---|
[7ee9849] | 82 | useradd -c 'Courier Mail Server' -d /dev/null \
|
---|
| 83 | -g courier -s /bin/false courier</command></userinput></screen>
|
---|
[0931098] | 84 |
|
---|
| 85 | <para> You also need to create a bin user. If you already have a user
|
---|
| 86 | named bin, this step can be safely ignored.</para>
|
---|
| 87 |
|
---|
| 88 | <screen><userinput><command>useradd -c 'bin' -d /dev/null -g bin -u 1 bin</command></userinput></screen>
|
---|
| 89 |
|
---|
| 90 | <para>This creates a
|
---|
| 91 | <filename class="directory">/var/run/courier</filename> directory where
|
---|
| 92 | all the <application>Courier</application> <acronym>MTA</acronym> pid
|
---|
| 93 | files will exist. This will allow <filename>courierfilter.pid</filename>
|
---|
| 94 | to be created. Without the <command>courierfilter</command> running, the
|
---|
| 95 | <application>Courier</application> MTA will not work. Issue the
|
---|
| 96 | following commands to create
|
---|
| 97 | <filename class="directory">/var/run/courier</filename>:</para>
|
---|
| 98 |
|
---|
| 99 | <screen><userinput><command>mkdir /var/run/courier &&
|
---|
| 100 | chown courier:courier /var/run/courier</command></userinput></screen>
|
---|
| 101 |
|
---|
[7ee9849] | 102 | <para>Install <application>courier</application> by running the following
|
---|
| 103 | commands:</para>
|
---|
[0931098] | 104 |
|
---|
| 105 | <screen><userinput><command>./configure --prefix=/usr --libexecdir=/usr/lib/courier \
|
---|
| 106 | --datadir=/usr/share/courier --sysconfdir=/etc/courier \
|
---|
| 107 | --localstatedir=/var/lib/courier --with-piddir=/var/run/courier \
|
---|
[7ee9849] | 108 | --disable-root-check --with-mailuser=courier \
|
---|
| 109 | --with-mailgroup=courier \
|
---|
[0931098] | 110 | --with-paranoid-smtpext --disable-autorenamesent \
|
---|
| 111 | --enable-workarounds-for-imap-client-bugs --with-db=gdbm &&
|
---|
| 112 | make &&
|
---|
| 113 | make install &&
|
---|
| 114 | make install-configure</command></userinput></screen>
|
---|
| 115 |
|
---|
| 116 | </sect2>
|
---|
| 117 |
|
---|
| 118 | <sect2>
|
---|
| 119 | <title>Command explanations</title>
|
---|
| 120 |
|
---|
| 121 | <para><parameter>--libexecdir=/usr/lib/courier</parameter>: Specifies
|
---|
| 122 | the directory which contains programs and libraries that cannot be
|
---|
| 123 | directly executed from the command-line.</para>
|
---|
| 124 |
|
---|
| 125 | <para><parameter>--datadir=/usr/share/courier</parameter>: Specifies the
|
---|
| 126 | directory where miscellaneous shell scripts,
|
---|
| 127 | <application>Perl</application> scripts, and data files will be
|
---|
| 128 | installed.</para>
|
---|
| 129 |
|
---|
| 130 | <para><parameter>--localstatedir=/var/spool/courier</parameter>:
|
---|
| 131 | Specifies the directory that will hold the mail queue, and other
|
---|
| 132 | temporary data.</para>
|
---|
| 133 |
|
---|
| 134 | <para><parameter>--with-piddir=/var/run/courier</parameter>: Specifies
|
---|
| 135 | the directory where <application>Courier</application>'s
|
---|
| 136 | <filename>PID</filename> files are stored when
|
---|
| 137 | <application>Courier</application> is active.</para>
|
---|
| 138 |
|
---|
| 139 | <para><option>--disable-root-check</option>: Allows
|
---|
| 140 | <application>Courier</application> to be built as the root user.</para>
|
---|
| 141 |
|
---|
| 142 | <para><parameter>--with-mailuser=courier</parameter>: All except two
|
---|
| 143 | <application>Courier</application> daemons run as a non-privileged user.
|
---|
| 144 | This option specifies the userid that <application>Courier</application>
|
---|
| 145 | will install and run as.</para>
|
---|
| 146 |
|
---|
| 147 | <para><parameter>--with-mailgroup=courier</parameter>: like
|
---|
| 148 | <option>--with-mailuser</option>, but specifies the group
|
---|
| 149 | <acronym>ID</acronym>.</para>
|
---|
| 150 |
|
---|
| 151 | <para><option>--with-paranoid-smtpext</option>: Be paranoid when
|
---|
| 152 | negotiating Courier-specific <acronym>ESMTP</acronym> extensions with
|
---|
| 153 | remote servers. The <application>Courier</application> mail server
|
---|
| 154 | defines and implements certain experimental <acronym>ESMTP</acronym>
|
---|
| 155 | extensions: XVERP and XEXDATA. Problems may result in the event that
|
---|
| 156 | someone else uses the same name to implement some other extension. If
|
---|
| 157 | this option is specified, <application>Courier's</application>
|
---|
| 158 | <acronym>ESMTP</acronym> server will also advertise a dummy
|
---|
| 159 | <acronym>ESMTP</acronym> capability called XCOURIEREXTENSIONS, and will
|
---|
| 160 | not recognize any Courier-specific extensions unless the remote mail
|
---|
| 161 | server also advertises this dummy <acronym>ESMTP</acronym>
|
---|
| 162 | capability.</para>
|
---|
| 163 |
|
---|
| 164 | <para><option>--disable-autorenamesent</option>: Do not rename the Sent
|
---|
| 165 | folder every month. This option can also be controlled by the
|
---|
| 166 | <envar>SQWEBMAIL_AUTORENAMESENT</envar> environment variable.</para>
|
---|
| 167 |
|
---|
| 168 | <para><option>--enable-workarounds-for-imap-client-bugs</option>: There
|
---|
| 169 | are several confirmed bugs in some <acronym>IMAP</acronym> clients that
|
---|
| 170 | do not properly implement the <acronym>IMAP</acronym>4rev1 protocol.
|
---|
| 171 | This option enables some workarounds for those buggy
|
---|
| 172 | <acronym>IMAP</acronym> clients. NOTE: <command>make check</command>
|
---|
| 173 | will fail if this option is used. You should first configure without
|
---|
| 174 | this option, and if all post-configuration tests succeed, rerun
|
---|
| 175 | configure with this option and recompile.</para>
|
---|
| 176 |
|
---|
| 177 | <para><parameter>--with-db=gdbm</parameter>:
|
---|
| 178 | <application>Courier</application> requires either the
|
---|
| 179 | <application><acronym>GDBM</acronym></application> or the
|
---|
| 180 | <application>DB</application> database library.
|
---|
| 181 | <application><acronym>GDBM</acronym></application> is used if both are
|
---|
| 182 | present. This option forces the selection of the GDBM database
|
---|
| 183 | library since support for DB is broken at the current state.</para>
|
---|
| 184 |
|
---|
| 185 | <!-- # Note - Courier will build fine with <xref linkend="db"/>, but all
|
---|
| 186 | the database files will not be created correctly -->
|
---|
| 187 |
|
---|
| 188 | <para><parameter>--with-ispell=/usr/bin/aspell</parameter>:
|
---|
| 189 | <application>Courier</application>'s webmail server can use spell
|
---|
| 190 | checking, if <command>configure</command> finds
|
---|
| 191 | <application>ispell</application> or if you explicitly set the location
|
---|
| 192 | of <application>aspell</application>.</para>
|
---|
| 193 |
|
---|
[7ee9849] | 194 | <para><parameter>--enable-mimetypes=<replaceable>[location of mime.types
|
---|
| 195 | file]</replaceable></parameter>: Use this switch if you receive an error
|
---|
| 196 | saying that the <filename>mime.types</filename> file could not be found.</para>
|
---|
[0931098] | 197 |
|
---|
| 198 | </sect2>
|
---|
| 199 |
|
---|
| 200 | <sect2>
|
---|
| 201 | <title>Configuring <application>Courier</application></title>
|
---|
| 202 |
|
---|
| 203 | <sect3><title>Config files</title>
|
---|
| 204 | <para><filename>/etc/courier/*</filename></para>
|
---|
| 205 | </sect3>
|
---|
| 206 |
|
---|
| 207 | <sect3><title>Configuration Information</title>
|
---|
| 208 |
|
---|
| 209 | <para>Make the following changes in
|
---|
| 210 | <filename>/etc/courier/authmysqlrc</filename> file if you are utilizing
|
---|
| 211 | <application>My<acronym>SQL</acronym></application>:</para>
|
---|
| 212 |
|
---|
| 213 | <screen><userinput>MYSQL_SERVER localhost
|
---|
| 214 | MYSQL_USERNAME courier
|
---|
| 215 | MYSQL_PASSWORD <replaceable>[your choice]</replaceable>
|
---|
| 216 | MYSQL_SOCKET /tmp/mysql.sock
|
---|
| 217 | MYSQL_PORT 3306
|
---|
| 218 | MYSQL_DATABASE courier_mail
|
---|
| 219 | MYSQL_USER_TABLE users
|
---|
| 220 | MYSQL_CLEAR_PWFIELD clear
|
---|
| 221 | DEFAULT DOMAIN <replaceable>[your domain]</replaceable>
|
---|
| 222 | MYSQL_QUOTA_FIELD quota</userinput></screen>
|
---|
| 223 |
|
---|
| 224 | <para>If you utilize <application>PAM</application>:</para>
|
---|
| 225 |
|
---|
| 226 | <screen><userinput><command>cat > /etc/pam.d/esmtp << "EOF"</command>
|
---|
| 227 | # Begin /etc/pam.d/esmtp
|
---|
| 228 |
|
---|
| 229 | auth required pam_unix.so try_first_pass
|
---|
| 230 | account required pam_unix.so
|
---|
| 231 | session required pam_unix.so
|
---|
| 232 |
|
---|
| 233 | # End /etc/pam.d/esmtp
|
---|
| 234 | <command>EOF
|
---|
| 235 | cat > /etc/pam.d/pop3 << "EOF"</command>
|
---|
| 236 | # Begin /etc/pam.d/pop3
|
---|
| 237 |
|
---|
| 238 | auth required pam_unix.so try_first_pass
|
---|
| 239 | account required pam_unix.so
|
---|
| 240 | session required pam_unix.so
|
---|
| 241 |
|
---|
| 242 | # End /etc/pam.d/pop3
|
---|
| 243 | <command>EOF
|
---|
| 244 | cat > /etc/pam.d/imap << "EOF"</command>
|
---|
| 245 | # Begin /etc/pam.d/imap
|
---|
| 246 |
|
---|
| 247 | auth required pam_unix.so try_first_pass
|
---|
| 248 | account required pam_unix.so
|
---|
| 249 | session required pam_unix.so
|
---|
| 250 |
|
---|
| 251 | # End /etc/pam.d/imap
|
---|
| 252 | <command>EOF
|
---|
| 253 | cat > /etc/pam.d/webmail << "EOF"</command>
|
---|
| 254 | # Begin /etc/pam.d/webmail
|
---|
| 255 |
|
---|
| 256 | auth required pam_unix.so try_first_pass
|
---|
| 257 | account required pam_unix.so
|
---|
| 258 | session required pam_unix.so
|
---|
| 259 |
|
---|
| 260 | # End /etc/pam.d/webmail
|
---|
| 261 | <command>EOF</command></userinput></screen>
|
---|
| 262 |
|
---|
| 263 | <para>Connect to the <application>My<acronym>SQL</acronym></application>
|
---|
| 264 | database:</para>
|
---|
| 265 |
|
---|
| 266 | <screen><userinput><command>mysql -p</command></userinput></screen>
|
---|
| 267 |
|
---|
| 268 | <para>This command will create the database for authentication:</para>
|
---|
| 269 |
|
---|
| 270 | <screen><userinput><command>CREATE DATABASE courier_mail;
|
---|
| 271 | USE courier_mail</command></userinput></screen>
|
---|
| 272 |
|
---|
| 273 | <para>This command will setup the table users for the courier_mail
|
---|
| 274 | database:</para>
|
---|
| 275 |
|
---|
| 276 | <screen><userinput><command>CREATE TABLE users (
|
---|
| 277 | id char(128) DEFAULT '' NOT NULL,
|
---|
| 278 | crypt char(128) DEFAULT '' NOT NULL,
|
---|
| 279 | clear char(128) DEFAULT '' NOT NULL,
|
---|
| 280 | name char(128) DEFAULT '' NOT NULL,
|
---|
| 281 | uid int(10) unsigned DEFAULT '65534' NOT NULL,
|
---|
| 282 | gid int(10) unsigned DEFAULT '65534' NOT NULL,
|
---|
| 283 | home char(255) DEFAULT '' NOT NULL,
|
---|
| 284 | quota char(255) DEFAULT '' NOT NULL,
|
---|
| 285 | KEY id (id(128))
|
---|
| 286 | );</command></userinput></screen>
|
---|
| 287 |
|
---|
| 288 | <para>This will add the courier user that we specified earlier in the
|
---|
| 289 | <filename>/etc/courier/authmysqlrc</filename> file:</para>
|
---|
| 290 |
|
---|
[7ee9849] | 291 | <screen><userinput><command>GRANT ALL PRIVILEGES ON *.* TO courier@localhost \
|
---|
| 292 | IDENTIFIED BY '<replaceable>[password]</replaceable>' WITH GRANT OPTION;
|
---|
[0931098] | 293 | QUIT</command></userinput></screen>
|
---|
| 294 |
|
---|
| 295 | <para><emphasis>General Settings for Mail</emphasis></para>
|
---|
| 296 |
|
---|
| 297 | <para>You will need to create the following files with the contents
|
---|
| 298 | specified.</para>
|
---|
| 299 |
|
---|
| 300 | <para><filename>/etc/courier/defaultdomain</filename></para>
|
---|
| 301 |
|
---|
| 302 | <screen><userinput><command>cat > /etc/courier/defaultdomain << "EOF"</command>
|
---|
| 303 | <replaceable>[yourdomain]</replaceable>
|
---|
| 304 | <command>EOF</command></userinput></screen>
|
---|
| 305 |
|
---|
| 306 | <para><filename>/etc/courier/me</filename></para>
|
---|
| 307 |
|
---|
| 308 | <screen><userinput><command>cat > /etc/courier/me << "EOF"</command>
|
---|
| 309 | <replaceable>[servername.yourdomain]</replaceable>
|
---|
| 310 | <command>EOF</command></userinput></screen>
|
---|
| 311 |
|
---|
| 312 | <para><filename>/etc/courier/locals</filename></para>
|
---|
| 313 |
|
---|
| 314 | <screen><userinput><command>cat > /etc/courier/locals << "EOF"</command>
|
---|
| 315 | localhost
|
---|
| 316 | <replaceable>[yourdomain]</replaceable>
|
---|
| 317 | <command>EOF</command></userinput></screen>
|
---|
| 318 |
|
---|
| 319 | <para><filename>/etc/courier/esmtpacceptmailfor.dir/system</filename></para>
|
---|
| 320 |
|
---|
| 321 | <screen><userinput><command>cat >/etc/courier/esmtpacceptmailfor.dir/system << "EOF"</command>
|
---|
| 322 | localhost
|
---|
| 323 | <replaceable>[yourdomain]</replaceable>
|
---|
| 324 | <command>EOF</command></userinput></screen>
|
---|
| 325 |
|
---|
| 326 | <para>You will also need to edit the aliases file and change the
|
---|
| 327 | following entry.</para>
|
---|
| 328 |
|
---|
| 329 | <para><filename>/etc/courier/aliases/system</filename></para>
|
---|
| 330 |
|
---|
| 331 | <screen><userinput>postmaster: <replaceable>[your administrator email]</replaceable></userinput></screen>
|
---|
| 332 |
|
---|
| 333 | <para>If you want to deny access from some hosts from sending mail, you
|
---|
| 334 | will need to edit the
|
---|
| 335 | <filename>/etc/courier/smtpaccess/default</filename> file.</para>
|
---|
| 336 |
|
---|
| 337 | <para>After the above steps are completed you will need to run the
|
---|
| 338 | following commands:</para>
|
---|
| 339 |
|
---|
| 340 | <screen><userinput><command>makesmtpaccess &&
|
---|
| 341 | makehosteddomains &&
|
---|
| 342 | makealiases</command></userinput></screen>
|
---|
| 343 |
|
---|
| 344 | <para><emphasis><acronym>SMTP</acronym>/<acronym>SMTMP</acronym>-<acronym>SSL
|
---|
| 345 | </acronym> Configuration</emphasis></para>
|
---|
| 346 |
|
---|
| 347 | <para>This section will enable the <acronym>SMTP</acronym> Server from Courier</para>
|
---|
| 348 |
|
---|
| 349 | <para><filename>/etc/courier/esmtpd</filename></para>
|
---|
| 350 |
|
---|
| 351 | <screen><userinput>ESMTPDSTART=YES</userinput></screen>
|
---|
| 352 |
|
---|
| 353 | <para><filename>/etc/courier/esmtpd-ssl</filename></para>
|
---|
| 354 |
|
---|
| 355 | <screen><userinput>ESMTPDSSLSTART=YES</userinput></screen>
|
---|
| 356 |
|
---|
| 357 | <para><emphasis><acronym>POP</acronym>3/<acronym>POP</acronym>3-<acronym>SSL
|
---|
| 358 | </acronym> Configuration</emphasis></para>
|
---|
| 359 |
|
---|
| 360 | <para>This section will enable the <acronym>POP</acronym>3 Server from
|
---|
| 361 | Courier</para>
|
---|
| 362 |
|
---|
| 363 |
|
---|
| 364 | <para><filename>/etc/courier/pop3d</filename></para>
|
---|
| 365 |
|
---|
| 366 | <screen><userinput>POP3DSTART=YES</userinput></screen>
|
---|
| 367 |
|
---|
| 368 | <para><filename>/etc/courier/pop3d-ssl</filename></para>
|
---|
| 369 |
|
---|
| 370 | <screen><userinput>POP3DSLLSTART=YES</userinput></screen>
|
---|
| 371 |
|
---|
| 372 | <para><emphasis><acronym>IMAP</acronym>/<acronym>IMAP</acronym>-<acronym>SSL
|
---|
| 373 | </acronym> Configuration</emphasis></para>
|
---|
| 374 |
|
---|
| 375 | <para>This section will enable the <acronym>IMAP</acronym> Server from
|
---|
| 376 | Courier</para>
|
---|
| 377 |
|
---|
| 378 | <para><filename>/etc/courier/imapd</filename></para>
|
---|
| 379 |
|
---|
| 380 |
|
---|
| 381 | <screen><userinput>IMAPDSTART=YES</userinput></screen>
|
---|
| 382 |
|
---|
| 383 | <para><filename>/etc/courierd/imapd-ssl</filename></para>
|
---|
| 384 |
|
---|
| 385 | <screen><userinput>IMAPDSSLSTART=YES</userinput></screen>
|
---|
| 386 |
|
---|
| 387 | <para><emphasis>Creating Mail directories for System Users</emphasis></para>
|
---|
| 388 |
|
---|
| 389 |
|
---|
| 390 | <para>This section will explain how to create MailDirs for
|
---|
| 391 | your system users.</para>
|
---|
| 392 |
|
---|
| 393 | <screen><userinput><command>cd /home/<replaceable>[username]</replaceable> &&
|
---|
| 394 | maildirmake Maildir &&
|
---|
| 395 | chown <replaceable>[username]</replaceable>.<replaceable>[username]</replaceable> Maildir -R</command></userinput></screen>
|
---|
| 396 |
|
---|
| 397 | <para><emphasis>Setup for Virtual users</emphasis></para>
|
---|
| 398 |
|
---|
| 399 | <para>This section will explain how to setup Maildir for your virtual
|
---|
| 400 | users.</para>
|
---|
| 401 |
|
---|
| 402 | <screen><userinput><command>groupadd -g 9000 vmailman &&
|
---|
| 403 | useradd -c 'Virtual Mailman' -g vmailman -m -k /dev/null -u 9000 vmailman</command></userinput></screen>
|
---|
| 404 |
|
---|
| 405 | <para>Now to setup the Maildir for these virtual users.</para>
|
---|
| 406 |
|
---|
| 407 | <screen><userinput><command>cd /home/vmailman &&
|
---|
| 408 | mkdir <replaceable>[virtual_user]</replaceable> &&
|
---|
| 409 | cd <replaceable>[virtual_user]</replaceable> &&
|
---|
| 410 | maildirmake Maildir &&
|
---|
| 411 | chown vmailman.vmailman Maildir -R</command></userinput></screen>
|
---|
| 412 |
|
---|
| 413 | <para>Connect to the <application>My<acronym>SQL</acronym></application>
|
---|
| 414 | database.</para>
|
---|
| 415 |
|
---|
| 416 | <screen><userinput><command>mysql -u courier -p</command></userinput></screen>
|
---|
| 417 |
|
---|
| 418 | <para>To add the virtual user you need to enter at
|
---|
| 419 | least one version of the password either clear text or encrypted.</para>
|
---|
| 420 |
|
---|
| 421 | <screen><userinput><command>USE courier_mail
|
---|
| 422 | INSERT INTO users VALUES (
|
---|
| 423 | '<replaceable>[virtual_users]</replaceable>@<replaceable>[domain.com]</replaceable>,
|
---|
| 424 | '<replaceable>[encrypted password or blank]</replaceable>',
|
---|
| 425 | '<replaceable>[clear text password or blank]</replaceable>',
|
---|
| 426 | '<replaceable>[User's Name]</replaceable>',
|
---|
| 427 | 9000,
|
---|
| 428 | 9000,
|
---|
| 429 | '<replaceable>[location of Maildir]</replaceable>',
|
---|
| 430 | '<replaceable>[Quota in Bytes']</replaceable>
|
---|
| 431 | );
|
---|
| 432 | QUIT</command></userinput></screen>
|
---|
| 433 |
|
---|
| 434 | <para>For example:</para>
|
---|
| 435 |
|
---|
| 436 | <screen><userinput><command>INSERT INTO users VALUES (
|
---|
| 437 | 'blfsuser@linuxfromscratch.org',
|
---|
| 438 | '',
|
---|
| 439 | 'password',
|
---|
| 440 | 'BLFS User',
|
---|
| 441 | 9000,
|
---|
| 442 | 9000,
|
---|
| 443 | '/home/vmailman/blfsuser',
|
---|
| 444 | ''
|
---|
| 445 | );</command></userinput></screen>
|
---|
| 446 |
|
---|
| 447 | <para><emphasis>Setup for Web-based Email</emphasis></para>
|
---|
| 448 |
|
---|
| 449 | <para>This section will explain how to setup Courier Web-based email
|
---|
| 450 | system.</para>
|
---|
| 451 |
|
---|
| 452 | <para>You will need to copy the <filename>webmail</filename> file from
|
---|
| 453 | <filename>/usr/lib/courier/courier/webmail</filename> to your <filename>cgi-bin
|
---|
| 454 | </filename> directory of your <application>Apache</application>
|
---|
| 455 | server.</para>
|
---|
| 456 |
|
---|
| 457 | <screen><userinput><command>cp -a /usr/lib/courier/courier/webmail/webmail /var/www/cgi-bin</command></userinput></screen>
|
---|
| 458 |
|
---|
| 459 | <para>You will then need to copy the images to a directory under your
|
---|
| 460 | <filename>htdocs</filename> directory of your
|
---|
| 461 | <application>Apache</application> server. The directory needs to be named
|
---|
| 462 | <filename>webmail</filename> or you need to specify it during the configure
|
---|
| 463 | phase with <parameter>--enable-imageurl=<replaceable>[URL]</replaceable></parameter>.</para>
|
---|
| 464 |
|
---|
| 465 | <screen><userinput><command>cp -a /usr/share/courier/sqwebmail/images /var/www/htdocs/webmail</command></userinput></screen>
|
---|
| 466 | <para><emphasis>Setup for Web-based Email</emphasis></para>
|
---|
| 467 |
|
---|
| 468 | <para>This section will explain how to setup Courier Web-based administration
|
---|
| 469 | system.</para>
|
---|
| 470 |
|
---|
| 471 | <para>You will need to copy the <filename>webadmin</filename> file from
|
---|
| 472 | <filename class="directory">/usr/lib/courier/courier/webmail</filename>
|
---|
| 473 | to your <filename class="directory">cgi-bin</filename> directory of your
|
---|
| 474 | <application>Apache</application> server.</para>
|
---|
| 475 |
|
---|
| 476 | <screen><userinput><command>cp -a /usr/lib/courier/courier/webmail/webadmin /var/www/cgi-bin</command></userinput></screen>
|
---|
| 477 |
|
---|
| 478 | <para><filename>/etc/courier/webadmin/password</filename></para>
|
---|
| 479 |
|
---|
| 480 | <screen><userinput><command>cat > /etc/courier/webadmin/password << "EOF"</command>
|
---|
| 481 | <replaceable>[password]</replaceable>
|
---|
| 482 | <command>EOF</command></userinput></screen>
|
---|
| 483 |
|
---|
| 484 | <para>If you are not using <acronym>SSL</acronym> on your <application>Apache
|
---|
| 485 | </application> server, you will need to add
|
---|
| 486 | <filename>/etc/courier/webadmin/unsecureok</filename>, so you will be able
|
---|
| 487 | to use your web based administration tool.</para>
|
---|
| 488 |
|
---|
| 489 | <screen><userinput><command>touch /etc/courier/webadmin/unsecureok</command></userinput></screen>
|
---|
| 490 | </sect3>
|
---|
| 491 |
|
---|
| 492 | <sect3><title>Courier init.d script</title>
|
---|
| 493 |
|
---|
| 494 | <para>The startup script from the <application>Courier</application> package is
|
---|
| 495 | the easiest to use. It will automatically create missing data files, and
|
---|
| 496 | <acronym>SSL</acronym> certificates if they are missing. To install the
|
---|
| 497 | init.d file for <application>Courier</application>, you will need to use the
|
---|
| 498 | following commands:</para>
|
---|
| 499 |
|
---|
| 500 | <screen><userinput><command>cp /usr/src/courier-&courier-version;/courier.sysvinit /etc/rc.d/init.d/courier &&
|
---|
| 501 | chmod 754 /etc/rc.d/init.d/courier</command></userinput></screen>
|
---|
| 502 |
|
---|
| 503 | <para>Create the symbolic links to this file in the relevant
|
---|
| 504 | <filename>rc.d</filename> directory with the following commands:</para>
|
---|
| 505 |
|
---|
| 506 | <screen><userinput><command>cd /etc/rc.d/init.d &&
|
---|
| 507 | ln -sf ../init.d/courier ../rc0.d/K25courier &&
|
---|
| 508 | ln -sf ../init.d/courier ../rc1.d/K25courier &&
|
---|
| 509 | ln -sf ../init.d/courier ../rc2.d/K25courier &&
|
---|
| 510 | ln -sf ../init.d/courier ../rc3.d/S35courier &&
|
---|
| 511 | ln -sf ../init.d/courier ../rc4.d/S35courier &&
|
---|
| 512 | ln -sf ../init.d/courier ../rc5.d/S35courier &&
|
---|
| 513 | ln -sf ../init.d/courier ../rc6.d/K25courier</command></userinput></screen>
|
---|
| 514 |
|
---|
| 515 | </sect3>
|
---|
| 516 | </sect2>
|
---|
| 517 |
|
---|
| 518 | <sect2>
|
---|
| 519 | <title>Contents</title>
|
---|
| 520 |
|
---|
| 521 | <para>The <application>Courier</application> package contains
|
---|
| 522 | <command>addcr</command>,
|
---|
| 523 | <command>authenumerate</command>,
|
---|
| 524 | <command>cancelmsg</command>,
|
---|
| 525 | <command>courier</command>,
|
---|
| 526 | <command>courier-config</command>,
|
---|
| 527 | <command>courieresmtpd</command>,
|
---|
| 528 | <command>courierfilter</command>,
|
---|
| 529 | <command>courierldapaliasd</command>,
|
---|
| 530 | <command>courierlogger</command>,
|
---|
| 531 | <command>couriermlm</command>,
|
---|
| 532 | <command>couriertcpd</command>,
|
---|
| 533 | <command>couriertls</command>,
|
---|
| 534 | <command>deliverquota</command>,
|
---|
| 535 | <command>dotforward</command>,
|
---|
| 536 | <command>esmtpd</command>,
|
---|
| 537 | <command>esmtpd-msa</command>,
|
---|
| 538 | <command>esmtpd-ssl</command>,
|
---|
| 539 | <command>filterctl</command>,
|
---|
| 540 | <command>imapd</command>,
|
---|
| 541 | <command>imapd</command>,
|
---|
| 542 | <command>imapd-ssl</command>,
|
---|
| 543 | <command>lockmail</command>,
|
---|
| 544 | <command>mailbot</command>,
|
---|
| 545 | <command>maildiracl</command>,
|
---|
| 546 | <command>maildirkw</command>,
|
---|
| 547 | <command>maildirmake</command>,
|
---|
| 548 | <command>maildrop</command>,
|
---|
| 549 | <command>makeacceptmailfor</command>,
|
---|
| 550 | <command>makealiases</command>,
|
---|
| 551 | <command>makedat</command>,
|
---|
| 552 | <command>makehosteddomains</command>,
|
---|
| 553 | <command>makemime</command>,
|
---|
| 554 | <command>makepercentrelay</command>,
|
---|
| 555 | <command>makesmtpaccess</command>,
|
---|
| 556 | <command>makesmtpaccess-msa</command>,
|
---|
| 557 | <command>makeuserdb</command>,
|
---|
| 558 | <command>makeuucpneighbors</command>,
|
---|
| 559 | <command>mimegpg</command>,
|
---|
| 560 | <command>mkesmtpdcert</command>,
|
---|
| 561 | <command>mkimapdcert</command>,
|
---|
| 562 | <command>mkpop3dcert</command>,
|
---|
| 563 | <command>pop3d</command>,
|
---|
| 564 | <command>pop3d-ssl</command>,
|
---|
| 565 | <command>preline</command>,
|
---|
| 566 | <command>pw2userdb</command>,
|
---|
| 567 | <command>reformail</command>,
|
---|
| 568 | <command>reformime</command>,
|
---|
| 569 | <command>rmail</command>,
|
---|
| 570 | <command>sendmail</command>,
|
---|
| 571 | <command>sharedindexinstall</command>,
|
---|
| 572 | <command>sharedindexsplit</command>,
|
---|
| 573 | <command>showconfig</command>,
|
---|
| 574 | <command>showmodules</command>,
|
---|
| 575 | <command>testmxlookup</command>,
|
---|
| 576 | <command>userdb</command>,
|
---|
| 577 | <command>userdbpw</command>,
|
---|
| 578 | <command>vchkpw2userdb</command> and
|
---|
| 579 | <command>webgpg</command>.</para>
|
---|
| 580 |
|
---|
| 581 | </sect2>
|
---|
| 582 |
|
---|
| 583 | <sect2><title>Description</title>
|
---|
| 584 |
|
---|
| 585 | <sect3><title>cancelmsg</title>
|
---|
[7ee9849] | 586 | <para><command>cancelmsg</command> removes a message from the mail
|
---|
| 587 | queue.</para></sect3>
|
---|
[0931098] | 588 |
|
---|
| 589 | <sect3><title>courier</title>
|
---|
| 590 | <para><command>courier</command> is a modular multi-protocol E-mail
|
---|
| 591 | transport agent. The <command>courier</command> command is an
|
---|
| 592 | administrative command, and most of its options are only available to
|
---|
| 593 | the superuser.</para></sect3>
|
---|
| 594 |
|
---|
| 595 | <sect3><title>courierfilter</title>
|
---|
| 596 | <para><command>courierfilter</command> command installs or uninstalls
|
---|
| 597 | global mail filters. Global mail filters are used to selectively block
|
---|
| 598 | unwanted mail.</para></sect3>
|
---|
| 599 |
|
---|
| 600 | <sect3><title>couriermlm</title>
|
---|
[7ee9849] | 601 | <para><command>couriermlm</command> is the Courier mailing list
|
---|
| 602 | manager.</para></sect3>
|
---|
[0931098] | 603 |
|
---|
| 604 | <sect3><title>filterctl</title>
|
---|
| 605 | <para><command>filterctl</command> command installs or uninstalls global
|
---|
| 606 | mail filters. Global mail filters are used to selectively block unwanted
|
---|
| 607 | mail.</para></sect3>
|
---|
| 608 |
|
---|
| 609 | <sect3><title>lockmail</title>
|
---|
[7ee9849] | 610 | <para><command>lockmail</command> is a helper utility for working with mailbox
|
---|
| 611 | files.</para></sect3>
|
---|
[0931098] | 612 |
|
---|
| 613 | <sect3><title>mailbot</title>
|
---|
[7ee9849] | 614 | <para><command>mailbot</command> reads an E-mail message on standard input and
|
---|
| 615 | creates an E-mail message replying to the original message's
|
---|
| 616 | sender.</para></sect3>
|
---|
[0931098] | 617 |
|
---|
| 618 | <sect3><title>maildirkw</title>
|
---|
[7ee9849] | 619 | <para><command>maildirkw</command> modifies Courier-IMAP compatible maildir
|
---|
| 620 | message keywords.</para></sect3>
|
---|
[0931098] | 621 |
|
---|
| 622 | <sect3><title>maildrop</title>
|
---|
[7ee9849] | 623 | <para><command>maildrop</command> is a replacement local mail delivery agent
|
---|
| 624 | that includes a mail filtering language.</para></sect3>
|
---|
[0931098] | 625 |
|
---|
| 626 | <sect3><title>makeacceptmailfor</title>
|
---|
[7ee9849] | 627 | <para><command>makeacceptmailfor</command> Build a list of domains to accept
|
---|
| 628 | mail for from the
|
---|
| 629 | <filename>/etc/courier/esmtpacceptmailfor.dir</filename>
|
---|
| 630 | directory.</para></sect3>
|
---|
[0931098] | 631 |
|
---|
| 632 | <sect3><title>makealiases</title>
|
---|
[7ee9849] | 633 | <para><command>makealiases</command> Build a list of aliases from the
|
---|
| 634 | <filename>/etc/courier/aliases</filename>
|
---|
[0931098] | 635 | or <filename>/etc/courier/aliasdir</filename> directories.</para></sect3>
|
---|
| 636 |
|
---|
| 637 | <sect3><title>makehosteddomains</title>
|
---|
[7ee9849] | 638 | <para><command>makehostedomains</command> Build a database of hosted domains
|
---|
| 639 | from <filename>hosteddomains</filename>.</para></sect3>
|
---|
[0931098] | 640 |
|
---|
| 641 | <sect3><title>makepercentrelay</title>
|
---|
| 642 | <para><command>makepercentrelay</command> Build a list of %-relayed
|
---|
| 643 | domains from the <filename>percentrelay.dir</filename>
|
---|
| 644 | directory.</para></sect3>
|
---|
| 645 |
|
---|
| 646 | <sect3><title>makesmtpaccess</title>
|
---|
| 647 | <para><command>makesmtpaccess</command> Build ESMTP server access file
|
---|
| 648 | from the <filename>/etc/courier/smtpaccess</filename>
|
---|
| 649 | directory.</para></sect3>
|
---|
| 650 |
|
---|
| 651 | <sect3><title>makesmtpaccess-msa</title>
|
---|
| 652 | <para><command>makesmtpaccess-msa</command> Build ESMTP server access
|
---|
| 653 | file from the <filename>/etc/courier/smtpaccess</filename>
|
---|
| 654 | directory. This esmtp list is for the MSA protocol.</para></sect3>
|
---|
| 655 |
|
---|
| 656 | <sect3><title>makeuucpneighbors</title>
|
---|
| 657 | <para><command>makeuucpneighbors</command> Builds a list of
|
---|
[7ee9849] | 658 | <acronym>UUCP</acronym> recipients using
|
---|
| 659 | <filename>/etc/courier/uucpneighbors</filename>.</para></sect3>
|
---|
[0931098] | 660 |
|
---|
| 661 | <sect3><title>reformail</title>
|
---|
[7ee9849] | 662 | <para><command>reformail</command> program reads a message on standard input,
|
---|
| 663 | reformats it in some way, and writes the message to standard
|
---|
| 664 | output.</para></sect3>
|
---|
[0931098] | 665 |
|
---|
| 666 | <sect3><title>reformime</title>
|
---|
[7ee9849] | 667 | <para><command>reformime</command> is a utility for reformatting MIME
|
---|
| 668 | messages.</para></sect3>
|
---|
[0931098] | 669 |
|
---|
| 670 | <sect3><title>sendmail</title>
|
---|
[7ee9849] | 671 | <para><command>sendmail</command> command reads an E-mail message and delivers
|
---|
| 672 | the message to its recipients. This sendmail command is part of the Courier
|
---|
| 673 | mail server, although it attempts to emulate the behavior of the original
|
---|
| 674 | sendmail MTA.</para></sect3>
|
---|
[0931098] | 675 |
|
---|
| 676 | <sect3><title>showconfig</title>
|
---|
[7ee9849] | 677 | <para><command>showconfig</command> Shows the current Courier
|
---|
| 678 | configuration.</para></sect3>
|
---|
[0931098] | 679 |
|
---|
| 680 | <sect3><title>showmodules</title>
|
---|
[7ee9849] | 681 | <para><command>showmodules</command> Shows the current Courier
|
---|
| 682 | modules.</para></sect3>
|
---|
[0931098] | 683 |
|
---|
| 684 | <sect3><title>testmxlookup</title>
|
---|
[7ee9849] | 685 | <para><command>testmxlookup</command> lists the names and IP addresses of
|
---|
| 686 | mail relays that receive mail for the domain. This is useful in diagnosing
|
---|
| 687 | mail delivery problems.</para></sect3>
|
---|
[f45b1953] | 688 |
|
---|
[0931098] | 689 | </sect2>
|
---|
[7ee9849] | 690 |
|
---|
[f45b1953] | 691 | </sect1>
|
---|
| 692 |
|
---|