/[gentoo]/xml/htdocs/doc/en/virt-mail-howto.xml
Gentoo

Diff of /xml/htdocs/doc/en/virt-mail-howto.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.21 Revision 1.24
1<?xml version = '1.0' encoding = 'UTF-8'?> 1<?xml version = '1.0' encoding = 'UTF-8'?>
2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/virt-mail-howto.xml,v 1.21 2003/12/07 18:21:26 pylon Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/virt-mail-howto.xml,v 1.24 2004/02/08 08:02:20 swift Exp $ -->
3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
4 4
5<guide link=" /doc/en/virt-mail-howto.xml" > 5<guide link=" /doc/en/virt-mail-howto.xml" >
6<title>Virtual Mailhosting System Guide</title> 6<title>Virtual Mailhosting System Guide</title>
7<author title="Author" > 7<author title="Author" >
8<mail link="antifa@gentoo.org" >Ken Nowack</mail> 8<mail link="antifa@gentoo.org" >Ken Nowack</mail>
9</author> 9</author>
10<author title="Author" > 10<author title="Author" >
11<mail link="ezra@revoltltd.org" >Ezra Gorman</mail> 11<mail link="ezra@revoltltd.org" >Ezra Gorman</mail>
12</author> 12</author>
13<author title="Editor">
14<mail link="klasikahl@gentoo.org" >Zack Gilburd</mail>
15</author>
13<abstract>This document details how to create a virtual mailhosting system based upon postfix, mysql, courier-imap, and cyrus-sasl. </abstract> 16<abstract>This document details how to create a virtual mailhosting system based upon postfix, mysql, courier-imap, and cyrus-sasl. </abstract>
14<version>1.0.6</version> 17<version>1.0.9</version>
15<date>December 7, 2003</date> 18<date>February 8, 2004</date>
16<!-- 19<!--
17 20
18Contents 21Contents
19 22
20I. Introduction 23I. Introduction
124<pre caption="Configuring and installing the cyrus-sasl ebuild" > 127<pre caption="Configuring and installing the cyrus-sasl ebuild" >
125# <i>USE='-ldap -mysql' emerge cyrus-sasl</i> 128# <i>USE='-ldap -mysql' emerge cyrus-sasl</i>
126<codenote>We don't have ldap and we're not using sasl's mysql capabilities </codenote> 129<codenote>We don't have ldap and we're not using sasl's mysql capabilities </codenote>
127<codenote>so we need to turn them off for this build.</codenote> 130<codenote>so we need to turn them off for this build.</codenote>
128</pre> 131</pre>
129<p>Next, edit <path>/usr/lib/sasl2/smtp.conf</path>.</p> 132<p>Next, edit <path>/usr/lib/sasl2/smtpd.conf</path>.</p>
130<pre caption="Starting sasl" > 133<pre caption="Starting sasl" >
131# <i>nano -w /usr/lib/sasl2/smtp.conf</i> 134# <i>nano -w /usr/lib/sasl2/smtpd.conf</i>
132pwcheck_method: saslauthd 135pwcheck_method: saslauthd
133mech_list: LOGIN PLAIN 136mech_list: LOGIN PLAIN
134<codenote>It's important to turn off auth mehtods we are not using.</codenote> 137<codenote>It's important to turn off auth mehtods we are not using.</codenote>
135<codenote>They cause problems for some mail clients.</codenote> 138<codenote>They cause problems for some mail clients.</codenote>
136# <i>/etc/init.d/saslauthd start</i> 139# <i>/etc/init.d/saslauthd start</i>
318<body> 321<body>
319<p>Next we'll set up apache and add an interface to interact with the database more easily. </p> 322<p>Next we'll set up apache and add an interface to interact with the database more easily. </p>
320<pre caption="Setting up apache and phpmyadmin" > 323<pre caption="Setting up apache and phpmyadmin" >
321# <i>emerge apache mod_php phpmyadmin</i> 324# <i>emerge apache mod_php phpmyadmin</i>
322</pre> 325</pre>
323<p>There are plenty of guides out there about how to set up apache with php. Like this one: <uri>http://www.linuxguruz.org/z.php?id=31</uri>. There are also numerous posts on <uri>http://forums.gentoo.org</uri> detailing how to solve problems with the installation (search for 'apache php'). So, that said, I'm not going to cover it here. Set up the apache and php installs, then continue with this howto. Now, a word for the wise: .htaccess the directory that you put phpmyadmin in. If you do not do this, search engine spiders will come along and index the page which in turn will mean that anyone will be able to find your phpmyadmin page via google and in turn be able to come change your database however they want which is <e>BAD!</e> There are many howtos on this including: <uri>http://docs.csoft.net/micro/black-htaccess.html</uri>.</p> 326<p>There are plenty of guides out there about how to set up apache with php. Like this one: <uri>http://www.linuxguruz.org/z.php?id=31</uri>. There are also numerous posts on <uri>http://forums.gentoo.org</uri> detailing how to solve problems with the installation (search for 'apache php'). So, that said, I'm not going to cover it here. Set up the apache and php installs, then continue with this howto. Now, a word for the wise: .htaccess the directory that you put phpmyadmin in. If you do not do this, search engine spiders will come along and index the page which in turn will mean that anyone will be able to find your phpmyadmin page via google and in turn be able to come change your database however they want which is <e>BAD!</e> There are many howtos on this including: <uri>http://www.csoft.net/docs/micro/htaccess.html.en</uri>.</p>
324<p>Now we're going to install the Apache certificates we made previously. The Apache-SSL directives that you need to use the resulting cert are: 327<p>Now we're going to install the Apache certificates we made previously. The Apache-SSL directives that you need to use the resulting cert are:
325 <ul> 328 <ul>
326<li>SSLCertificateFile /path/to/certs/new.cert.cert</li> 329<li>SSLCertificateFile /path/to/certs/new.cert.cert</li>
327<li>SSLCertificateKeyFile /path/to/certs/new.cert.key</li> 330<li>SSLCertificateKeyFile /path/to/certs/new.cert.key</li>
328</ul> 331</ul>
528virtual_alias_maps = mysql:/etc/postfix/mysql-virtual.cf 531virtual_alias_maps = mysql:/etc/postfix/mysql-virtual.cf
529virtual_uid_maps = static:$vmail-uid 532virtual_uid_maps = static:$vmail-uid
530virtual_mailbox_base = / 533virtual_mailbox_base = /
531#virtual_mailbox_limit = 534#virtual_mailbox_limit =
532</pre> 535</pre>
536
537<p>
538For security reasons you should change the permissions of the various
539<path>/etc/mail/mysql-*.cf</path>:
540</p>
541
542<pre caption="Changing file permission">
543# <i>chmod 640 /etc/postfix/mysql-*.cf</i>
544# <i>chgrp postfix /etc/postfix/mysql-*.cf</i>
545</pre>
546
533<p>As of Postfix 2.0.x, there were a number of significant changes over the 1.1.x release. Notably the transport, virtual-gid, and virtual-uid tables are no longer necessary. The tables are still included if you wish to use them.</p> 547<p>As of Postfix 2.0.x, there were a number of significant changes over the 1.1.x release. Notably the transport, virtual-gid, and virtual-uid tables are no longer necessary. The tables are still included if you wish to use them.</p>
534<note>It is recommended tha you read VIRTUAL_README included with the postfix doc's for more information.</note> 548<note>It is recommended tha you read VIRTUAL_README included with the postfix doc's for more information.</note>
535<pre># <i>postfix reload</i> 549<pre># <i>postfix reload</i>
536</pre> 550</pre>
537<p>Now, if all went well, you should have a functioning mailhost. Users should be able to authenticate against the sql database, using their full email address, for pop3, imap, and smtp. I would highly suggest that you verify that everything is working at this point. If you run into problems (with as many things as this setup has going on, it's likely that you will) check the troubleshooting section of this howto.</p> 551<p>Now, if all went well, you should have a functioning mailhost. Users should be able to authenticate against the sql database, using their full email address, for pop3, imap, and smtp. I would highly suggest that you verify that everything is working at this point. If you run into problems (with as many things as this setup has going on, it's likely that you will) check the troubleshooting section of this howto.</p>

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.24

  ViewVC Help
Powered by ViewVC 1.1.20