Changeset 17143f33


Ignore:
Timestamp:
01/17/2005 03:53:41 AM (17 years ago)
Author:
DJ Lucas <dj@…>
Branches:
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, krejzi/svn, lazarus, nosym, perl-modules, qt5new, systemd-11177, systemd-13485, trunk, xry111/git-date, xry111/git-date-for-trunk, xry111/git-date-test
Children:
c6301dc
Parents:
5e363b3
Message:

Cleaned up courier instructions.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/mail/courier.xml

    r5e363b3 r17143f33  
    7272<title>Installation of <application>Courier</application></title>
    7373<note><para><application>Courier's</application> tarball must be extacted as an
    74 unpriveleged user or configure will fail.</para></note>
    75 
    76 <para>After extracting the tarball, you'll need to <command>su</command> to
    77 user 'root' in order to perform the next few steps.</para>
     74unpriveleged user or the configure script will fail.</para></note>
    7875 
    79 <para> Before you compile the program, you need to create the courier user
     76<para>Before you compile the program, you need to create the courier user
    8077and group that is expected to be in place when the install script executes.
    81 Add the courier user and group with the following commands:</para>
    82 
    83 <screen><userinput><command>groupadd courier &amp;&amp;
     78As the root user, add the courier user and group with the following
     79commands:</para>
     80
     81<screen><userinput role="root"><command>groupadd courier &amp;&amp;
    8482useradd -c 'Courier Mail Server' -d /dev/null \
    8583        -g courier -s /bin/false courier</command></userinput></screen>
     
    8886named bin, this step can be safely ignored.</para>
    8987
    90 <screen><userinput><command>useradd -c 'bin' -d /dev/null -g bin -u 1 bin</command></userinput></screen>
     88<screen><userinput role="root"><command>useradd -c 'bin' -d /dev/null -g bin -u 1 bin</command></userinput></screen>
    9189
    9290<para><application>Courierfilter</application> requires the directory
     
    9795the following commands to create these directories:</para>
    9896
    99 <screen><userinput><command>install -d /var/run/courier -o courier -g courier -m755 &amp;&amp;
     97<screen><userinput role="root"><command>install -d /var/run/courier -o courier -g courier -m755 &amp;&amp;
    10098install -d /var/lock/subsys -o root -g root -m755</command></userinput></screen>
    10199
    102 <para>Build <application>courier</application> as an unpriveledged user
     100<para>Build <application>Courier</application> as an unpriveledged user
    103101with the following commands:</para>
    104102
     
    112110make</command></userinput></screen>
    113111
    114 <para><command>su</command> once again to user 'root' and install
    115 <application>courier</application> with the following commands:</para>
    116 
    117 <screen><userinput><command>make install &amp;&amp;
     112<para>Once again, become the root user and install
     113<application>Courier</application> with the following commands:</para>
     114
     115<screen><userinput role="root"><command>make install &amp;&amp;
    118116make install-configure</command></userinput></screen>
    119117
     
    203201</sect2>
    204202
    205 <sect2 id="courier-config">
     203<sect2 id="etc-courier-star">
    206204<title>Configuring <application>Courier</application></title>
    207 <indexterm zone="courier-package courier-config">
    208 <primary sortas="e-courier-config">/etc/courier/*</primary></indexterm>
     205<indexterm zone="courier-package etc-courier-star">
     206<primary sortas="e-etc-courier-star">/etc/courier/*</primary></indexterm>
     207
     208<sect3><title>Configuration Files</title>
     209<para><filename>/etc/courier/*</filename></para>
     210</sect3>
    209211
    210212<sect3><title>Configuration Information</title>
    211213
    212 <para>You will need to <command>su</command> to user 'root' for the
    213 remainder of the configuration.</para>
    214 
    215 <para>You will need to create the following files with the contents
    216 specified.</para>
     214<para>While still as root, you will need to create the following files with
     215the contents specified.</para>
    217216
    218217<para><filename>/etc/courier/defaultdomain</filename></para>
    219218
    220 <screen><userinput><command>cat &gt; /etc/courier/defaultdomain &lt;&lt; "EOF"</command>
     219<screen><userinput role="root"><command>cat &gt; /etc/courier/defaultdomain &lt;&lt; "EOF"</command>
    221220<replaceable>[yourdomain]</replaceable>
    222221<command>EOF</command></userinput></screen>
     
    224223<para><filename>/etc/courier/me</filename></para>
    225224
    226 <screen><userinput><command>cat &gt; /etc/courier/me &lt;&lt; "EOF"</command>
     225<screen><userinput role="root"><command>cat &gt; /etc/courier/me &lt;&lt; "EOF"</command>
    227226<replaceable>[servername.yourdomain]</replaceable>
    228227<command>EOF</command></userinput></screen>
     
    230229<para><filename>/etc/courier/locals</filename></para>
    231230
    232 <screen><userinput><command>cat &gt; /etc/courier/locals &lt;&lt; "EOF"</command>
     231<screen><userinput role="root"><command>cat &gt; /etc/courier/locals &lt;&lt; "EOF"</command>
    233232localhost
    234233<replaceable>[yourdomain]</replaceable>
     
    237236<para><filename>/etc/courier/esmtpacceptmailfor.dir/system</filename></para>
    238237
    239 <screen><userinput><command>cat
    240 &gt;/etc/courier/esmtpacceptmailfor.dir/system &lt;&lt; "EOF"</command>
     238<screen><userinput role="root"><command>cat &gt; /etc/courier/esmtpacceptmailfor.dir/system &lt;&lt; "EOF"</command>
    241239localhost
    242240<replaceable>[yourdomain]</replaceable>
    243241<command>EOF</command></userinput></screen>
    244242
    245 <para>You will also need to edit the aliases file and change the
     243<para>You will also need to edit the
     244<filename>/etc/courier/aliases/system</filename> file and change the
    246245following entry.</para>
    247 
    248 <para><filename>/etc/courier/aliases/system</filename></para>
    249246
    250247<screen><userinput>postmaster: <replaceable>[your administrator email]</replaceable></userinput></screen>
     
    255252
    256253<para>If you wish to host mail for non local domains including virtual
    257 domains,
    258 you must add them to <filename>/etc/courier/hosteddomains</filename>.
    259 This
    260 file should exist wether you need a hosted domain list or not:</para>
    261 
    262 <para><screen><userinput>touch
    263 /etc/courier/hosteddomains</userinput></screen></para>
     254domains, you must add them to
     255<filename>/etc/courier/hosteddomains</filename>. This file should exist
     256wether you need a hosted domain list or not:</para>
     257
     258<screen><userinput role="root"><command>touch /etc/courier/hosteddomains</command></userinput></screen>
    264259
    265260<para>After the above steps are completed you will need to run the
    266261following commands:</para>
    267262
    268 <screen><userinput><command>makesmtpaccess &amp;&amp;
     263<screen><userinput role="root"><command>makesmtpaccess &amp;&amp;
    269264makehosteddomains &amp;&amp;
    270265makealiases</command></userinput></screen>
     
    273268<filename class="directory">Maildir</filename> directory:</para>
    274269
    275 <screen><userinput><command>cd /home/<replaceable>[username]</replaceable> &amp;&amp;
     270<screen><userinput role="root"><command>cd /home/<replaceable>[username]</replaceable> &amp;&amp;
    276271maildirmake Maildir &amp;&amp;
    277272chown <replaceable>[username]</replaceable>.<replaceable>[username]</replaceable> Maildir -R</command></userinput></screen>
     
    283278commands:</para>
    284279
    285 <screen><userinput><command>mkesmtpdcert &amp;&amp;
     280<screen><userinput role="root"><command>mkesmtpdcert &amp;&amp;
    286281mkimapdcert &amp;&amp;
    287282mkpop3dcert</command></userinput></screen>
     
    299294'ESMTPDSSLSTART' to 'YES'.  Make the same change for each service
    300295configuration that you wish to use with
    301 <application>courier</application>.</para>
     296<application>Courier</application>.</para>
    302297
    303298<para>If you wish to use <acronym>LDAP</acronym>, an
    304299<acronym>LDAP</acronym> configuration file should be created:</para>
    305300
    306 <screen><userinput><command>echo "LDAPALIASDSTART=YES" > /etc/courier/ldapaliasd</command></userinput></screen>
     301<screen><userinput role="root"><command>echo "LDAPALIASDSTART=YES" > /etc/courier/ldapaliasd</command></userinput></screen>
    307302
    308303<para>Similarly, if you wish to use webmail, you should create the webmail
    309304configuration file:</para>
    310305
    311 <screen><userinput><command>echo "WEBMAILDSTART=YES" > /etc/courier/webmaild</command></userinput></screen>
     306<screen><userinput role="root"><command>echo "WEBMAILDSTART=YES" > /etc/courier/webmaild</command></userinput></screen>
    312307
    313308<para>You will also need to copy the <filename>webmail</filename> file from
     
    316311server.</para>
    317312
    318 <screen><userinput><command>cp -a /usr/lib/courier/courier/webmail/webmail /srv/www/cgi-bin</command></userinput></screen>
     313<screen><userinput role="root"><command>cp -a /usr/lib/courier/courier/webmail/webmail /srv/www/cgi-bin</command></userinput></screen>
    319314
    320315<para>You will then need to copy the images to a directory under your
     
    324319phase with <parameter>--enable-imageurl=<replaceable>[URL]</replaceable></parameter>.</para>
    325320
    326 <screen><userinput><command>cp -a /usr/share/courier/sqwebmail/images /srv/www/htdocs/webmail</command></userinput></screen>
    327 <para><emphasis>Setup for Web-based Email</emphasis></para>
     321<screen><userinput role="root"><command>cp -a /usr/share/courier/sqwebmail/images /srv/www/htdocs/webmail</command></userinput></screen>
    328322
    329323<para>If you wish to utilze the webadmin utility, you will need to copy the
     
    333327<application>Apache</application> server.</para>
    334328
    335 <screen><userinput><command>cp -a /usr/lib/courier/courier/webmail/webadmin /srv/www/cgi-bin</command></userinput></screen>
    336 
    337 <para><filename>/etc/courier/webadmin/password</filename></para>
    338 
    339 <screen><userinput><command>cat &gt; /etc/courier/webadmin/password &lt;&lt; "EOF"</command>
     329<screen><userinput role="root"><command>cp -a /usr/lib/courier/courier/webmail/webadmin /srv/www/cgi-bin</command></userinput></screen>
     330
     331<para>You also need to put the password into the file
     332<filename>/etc/courier/webadmin/password</filename>:</para>
     333
     334<screen><userinput role="root"><command>cat &gt; /etc/courier/webadmin/password &lt;&lt; "EOF"</command>
    340335<replaceable>[password]</replaceable>
    341336<command>EOF</command></userinput></screen>
     
    346341to use your web based administration tool.</para>
    347342
    348 <screen><userinput><command>touch /etc/courier/webadmin/unsecureok</command></userinput></screen>
     343<screen><userinput role="root"><command>touch /etc/courier/webadmin/unsecureok</command></userinput></screen>
    349344
    350345<para>If you use <application>LinuxPAM</application> on your system,
    351346you will need to create the <acronym>PAM</acronym> configuration files:</para>
    352347
    353 <screen><userinput><command>cat &gt; /etc/pam.d/esmtp &lt;&lt;
    354 "EOF"</command>
     348<screen><userinput role="root"><command>cat &gt; /etc/pam.d/esmtp &lt;&lt; "EOF"</command>
    355349# Begin /etc/pam.d/esmtp
    356350
     
    389383<command>EOF</command></userinput></screen>
    390384
    391 <para id="courier-init">Finaly, if you wish to start courier at boot, install
     385<para id="courier-init">Finally, if you wish to start courier at boot, install
    392386the <filename>/etc/rc.d/init.d/courier</filename> bootscript included in the
    393387<xref linkend="intro-important-bootscripts"/> package.</para>
     
    395389<primary sortas="f-courier-init">courier</primary></indexterm>
    396390
    397 <screen><userinput><command>make install-courier</command></userinput></screen>
     391<screen><userinput role="root"><command>make install-courier</command></userinput></screen>
    398392
    399393</sect3>
     
    405399<title>Configuring for virtual users</title>
    406400
    407 <para>These instructions will configure <application>courier</application>
     401<para>These instructions will configure <application>Courier</application>
    408402to lookup virtual users in a <application>MySQL</application> database.
    409403Begin by making the following changes to
     
    423417<para>Connect to <application>MySQL</application>:</para>
    424418
    425 <screen><userinput><command>mysql -p</command></userinput></screen>
     419<screen><userinput role="root"><command>mysql -p</command></userinput></screen>
    426420
    427421<para>Create the <filename>courier_mail</filename> database and setup
    428422the users table:</para>
    429423
    430 <screen><userinput><command>CREATE DATABASE courier_mail;
     424<screen><userinput role="root"><command>CREATE DATABASE courier_mail;
    431425USE courier_mail
    432426CREATE TABLE users (
     
    444438<para>Grant all priveledges to the courier user created earlier:</para>
    445439
    446 <screen><userinput><command>GRANT ALL PRIVILEGES ON *.* TO courier@localhost \
     440<screen><userinput role="root"><command>GRANT ALL PRIVILEGES ON *.* TO courier@localhost \
    447441    IDENTIFIED BY '<replaceable>[password]</replaceable>' WITH GRANT OPTION;
    448442QUIT</command></userinput></screen>
    449443
    450444<para>Create a virtual mailman user and group:</para>
    451 <screen><userinput><command>groupadd -g 9000 vmailman &amp;&amp;
     445<screen><userinput role="root"><command>groupadd -g 9000 vmailman &amp;&amp;
    452446useradd -c 'Virtual Mailman' -g vmailman -m -k /dev/null -u 9000 vmailman</command></userinput></screen>
    453447
    454448<para>Create a mail directory for a new virtual user:</para>
    455449
    456 <screen><userinput><command>cd /home/vmailman &amp;&amp;
     450<screen><userinput role="root"><command>cd /home/vmailman &amp;&amp;
    457451mkdir <replaceable>[virtual_user]</replaceable> &amp;&amp;
    458452cd <replaceable>[virtual_user]</replaceable> &amp;&amp;
     
    463457the courier user:</para>
    464458
    465 <screen><userinput><command>mysql -u courier -p</command></userinput></screen>
     459<screen><userinput role="root"><command>mysql -u courier -p</command></userinput></screen>
    466460
    467461<para>To add the virtual user you need to enter at least one version of the
     
    470464<para>Add the first virtual user with the following commands:</para>
    471465
    472 <screen><userinput><command>USE courier_mail
     466<screen><userinput role="root"><command>USE courier_mail
    473467INSERT INTO users VALUES (
    474468'<replaceable>[virtual_users]</replaceable>@<replaceable>[domain.com]</replaceable>,
     
    485479<para>For example:</para>
    486480
    487 <screen><userinput><command>INSERT INTO users VALUES (
     481<screen><userinput role="root"><command>INSERT INTO users VALUES (
    488482'blfsuser@linuxfromscratch.org',
    489483'',
     
    507501<segmentedlist>
    508502<segtitle>Installed Programs</segtitle>
    509 <segtitle>Installed Scripts</segtitle>
    510503<segtitle>Installed Directories</segtitle>
    511 <segtitle>Configuration Files</segtitle>
    512504<seglistitem>
    513 <seg>addcr, aliascreate, aliascombine, aliasexp, authenumerate, cancelmsg,
    514 courier, courier-config, courierd, courierfax, courierfilter,
    515 courierldapaliasd, courierlogger, couriermlm, courierpop3d, courierpop3login,
    516 couriertcpd, couriertls, deliverquota, dotforward, dupfilter, imapd,
    517 imaplogin, lockmail, mailbot, maildiracl, maildirkw, maildirmake, maildrop,
    518 mailq, makedat, makedatprog, makemime, mimegpg, pcpd, perlfilter, preline,
    519 reformail, reformime, rmail, sendmail, showmodules, sqwebmaild, submit,
    520 submitmkdir, testmxlookup, userdbpw, webadmin and webmail</seg>
    521 
    522 <seg>admin-*.pl, application-pdf.filter, application-postscript.filter,
    523 authsystem.passwd, cleancache.pl, courierctl.start, couriermlm,
    524 courierwebadmin, coverpage, dumpenv.pl, esmtpd, esmtpd-ssl, faxmail,
    525 filterctl, htmldoc, image-gif.filter, image-jpeg.filter, image-png.filter,
    526 imapd, imapd-ssl, init, ldapsearch, makeacceptmailfor, makealiases, makedat,
    527 makehosteddomains, makepercentrelay, makesmtpaccess, makeuserdb,
    528 makeuucpneighbors, mkesmtpdcert, mkimapdcert, mkpop3dcert, new_fax,
    529 perlfilter-example.pl, perlfilter-wrapper.pl, pop3d, pop3d-ssl, pw2userdb,
    530 rootcerts, sendit.sh, sharedindexsplit, sharedindexinstall, sqwebmail,
    531 text-plain.filter, userdb, vchkpw2userdb, webadmin.pl, webgpg and
    532 webmaild</seg>
     505<seg>addcr, authenumerate, cancelmsg, courier, courier-config,
     506courieresmtpd, courierfilter, courierlogger, couriermlm, couriertcpd,
     507couriertls, deliverquota, dotforward, esmtpd, esmtpd-msa, esmtpd-ssl,
     508filterctl, imapd, imapd-ssl, lockmail, mailbot, maildiracl, maildirkw,
     509maildirmake, maildrop, mailq, makeacceptmailfor, makealiases, makedat,
     510makehosteddomains, makemime, makepercentrelay, makesmtpaccess,
     511makesmtpaccess-msa, makeuserdb, makeuucpneighbors, mimegpg,
     512mkesmtpdcert, mkimapdcert, mkpop3dcert, pop3d, pop3d-ssl, preline,
     513pw2userdb, reformail, reformime, rmail, sendmail, sharedindexinstall,
     514sharedindexsplit, showconfig, showmodules, testmxlookup, userdb,
     515userdbpw, vchkpw2userdb, webgpg, webmaild</seg>
    533516
    534517<seg>/etc/courier, /usr/lib/courier, /usr/share/courier and
    535518/var/lib/courier</seg>
    536 
    537 <seg>/etc/courier/</seg>
    538519
    539520</seglistitem>
     
    589570<term><command>courierlogger</command></term>
    590571<listitem><para>captures error messages from other
    591 <application>courier</application> applications and forwards them to
     572<application>Courier</application> applications and forwards them to
    592573the system logger.</para>
    593574<indexterm zone="courier-package courierlogger">
Note: See TracChangeset for help on using the changeset viewer.