/[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.20 Revision 1.21
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.20 2003/12/06 16:34:43 swift Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/virt-mail-howto.xml,v 1.21 2003/12/07 18:21:26 pylon 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<abstract>This document details how to create a virtual mailhosting system based upon postfix, mysql, courier-imap, and cyrus-sasl. </abstract> 13<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.5</version> 14<version>1.0.6</version>
15<date>December 6, 2003</date> 15<date>December 7, 2003</date>
16<!-- 16<!--
17 17
18Contents 18Contents
19 19
20I. Introduction 20I. Introduction
21II. Postfix Basics 21II. Postfix Basics
22III. Courier-imap 22III. Courier-imap
23IV. Cyrus-sasl 23IV. Cyrus-sasl
24V. SSL Certificates for Postfix and Apache 24V. SSL Certificates for Postfix and Apache
25VI. Adding SSL and SASL support to Postfix 25VI. Adding SSL and SASL support to Postfix
26VII. MySQL 26VII. MySQL
27VIII. Apache and phpMyAdmin 27VIII. Apache and phpMyAdmin
28IX. The vmail user 28IX. The vmail user
29X. Configuring MySQL Authentication and vhosts 29X. Configuring MySQL Authentication and vhosts
30XI. Squirrelmail 30XI. Squirrelmail
331# <i>cp /etc/ssl/misc/new.cert.cert /etc/apache/conf/ssl/</i> 331# <i>cp /etc/ssl/misc/new.cert.cert /etc/apache/conf/ssl/</i>
332# <i>cp /etc/ssl/misc/new.cert.key /etc/apache/conf/ssl/</i> 332# <i>cp /etc/ssl/misc/new.cert.key /etc/apache/conf/ssl/</i>
333# <i>nano -w /etc/apache/conf/vhosts/ssl.default-vhost.conf</i> 333# <i>nano -w /etc/apache/conf/vhosts/ssl.default-vhost.conf</i>
334<codenote>Change the following parameters</codenote> 334<codenote>Change the following parameters</codenote>
335 335
336ServerName host.domain.name 336ServerName host.domain.name
337ServerAdmin your@email.address 337ServerAdmin your@email.address
338SSLCertificateFile /etc/apache/conf/ssl/new.cert.cert 338SSLCertificateFile /etc/apache/conf/ssl/new.cert.cert
339SSLCertificateKeyFile /etc/apache/conf/ssl/new.cert.key 339SSLCertificateKeyFile /etc/apache/conf/ssl/new.cert.key
340 340
341# <i>/etc/init.d/apache restart</i> 341# <i>/etc/init.d/apache restart</i>
342</pre> 342</pre>
343<note>If you have an existing apache install, you'll likely have to perform a full server reboot to install your new certificates. Check your logs to verify apache restarted successfully.</note> 343<note>If you have an existing apache install, you'll likely have to perform a full server reboot to install your new certificates. Check your logs to verify apache restarted successfully.</note>
344<p>Next, configure phpMyAdmin.</p> 344<p>Next, configure phpMyAdmin.</p>
345<pre caption="Configuring phpMyAdmin" > 345<pre caption="Configuring phpMyAdmin" >
346# <i>nano -w /home/httpd/htdocs/phpmyadmin/config.inc.php</i> 346# <i>nano -w /var/www/localhost/htdocs/phpmyadmin/config.inc.php</i>
347<codenote>Change the following parameters</codenote> 347<codenote>Change the following parameters</codenote>
348 348
349$cfg['Servers'][$i]['host'] = 'localhost'; // MySQL hostname 349$cfg['Servers'][$i]['host'] = 'localhost'; // MySQL hostname
350$cfg['Servers'][$i]['controluser'] = 'mailsql'; // MySQL control user settings 350$cfg['Servers'][$i]['controluser'] = 'mailsql'; // MySQL control user settings
351 // (this user must have read-only 351 // (this user must have read-only
352$cfg['Servers'][$i]['controlpass'] = '$password'; // access to the &quot;mysql/user&quot; 352$cfg['Servers'][$i]['controlpass'] = '$password'; // access to the &quot;mysql/user&quot;
353 // and &quot;mysql/db&quot; tables) 353 // and &quot;mysql/db&quot; tables)
354$cfg['Servers'][$i]['user'] = 'mailsql'; // MySQL user 354$cfg['Servers'][$i]['user'] = 'mailsql'; // MySQL user
355$cfg['Servers'][$i]['password'] = '$password'; // MySQL password 355$cfg['Servers'][$i]['password'] = '$password'; // MySQL password
356</pre> 356</pre>
357<p>Now enter the phpmyadmin page and browse the tables. You'll want to add in your local aliases, edit your user table to add a test user, and change your transport table to add information about your domains. The default values supplied with the dumpfile should be a sufficient guide to what values need to go where. Make sure that if you put information in the database that it is accurate. For instance, make sure the local users home dir exists and that the correct uid/gid values are in place. The maildirs should be created automatically by postfix when the user receives their first email. So, in general, it's a good idea to send a &quot;Welcome&quot; mail to a new user after you setup their account to make sure the .maildir gets created. </p> 357<p>Now enter the phpmyadmin page and browse the tables. You'll want to add in your local aliases, edit your user table to add a test user, and change your transport table to add information about your domains. The default values supplied with the dumpfile should be a sufficient guide to what values need to go where. Make sure that if you put information in the database that it is accurate. For instance, make sure the local users home dir exists and that the correct uid/gid values are in place. The maildirs should be created automatically by postfix when the user receives their first email. So, in general, it's a good idea to send a &quot;Welcome&quot; mail to a new user after you setup their account to make sure the .maildir gets created. </p>
358</body> 358</body>
359</chapter> 359</chapter>
360<chapter> 360<chapter>
361<title>The vmail user</title> 361<title>The vmail user</title>
532</pre> 532</pre>
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> 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>
534<note>It is recommended tha you read VIRTUAL_README included with the postfix doc's for more information.</note> 534<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> 535<pre># <i>postfix reload</i>
536</pre> 536</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> 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>
538</body> 538</body>
539</chapter> 539</chapter>
540<chapter> 540<chapter>
541<title>Squirrelmail</title> 541<title>Squirrelmail</title>
542<body> 542<body>
543<pre> 543<pre>
544# <i>emerge squirrelmail</i> 544# <i>emerge squirrelmail</i>
545<codenote>I like to add a link to the htdocs space for a shorter url.</codenote> 545<codenote>I like to add a link to the htdocs space for a shorter url.</codenote>
546 546
547# <i>ln -s /home/httpd/htdocs/squirrelmail/ /home/httpd/htdocs/mail</i> 547# <i>ln -s /var/www/localhost/htdocs/squirrelmail/ /var/www/localhost/htdocs/mail</i>
548# <i>cd /home/httpd/htdocs/mail/conf</i> 548# <i>cd /var/www/localhost/htdocs/mail/conf</i>
549# <i>./conf.pl</i> 549# <i>./conf.pl</i>
550<codenote>Change your Organization, Server, and Folder settings for squirrelmail.</codenote> 550<codenote>Change your Organization, Server, and Folder settings for squirrelmail.</codenote>
551<codenote>Now you should be able to login to squirrelmail, again - with your full email address,</codenote> 551<codenote>Now you should be able to login to squirrelmail, again - with your full email address,</codenote>
552<codenote>and use your new webmail setup.</codenote> 552<codenote>and use your new webmail setup.</codenote>
553</pre> 553</pre>
554</body> 554</body>
555</chapter> 555</chapter>
556<chapter> 556<chapter>
557<title>Mailman</title> 557<title>Mailman</title>
558<body> 558<body>
559<p>Last step: mailman. The new version of mailman has very nice virtual domain support, which is why I use it, not to mention it's really a great package. To get this package installed and working correctly for virtual domains is going to require a bit of hacking. I really recommend reading all of the mailman documentation, including README.POSTFIX.gz, to understand what's being done here.</p> 559<p>Last step: mailman. The new version of mailman has very nice virtual domain support, which is why I use it, not to mention it's really a great package. To get this package installed and working correctly for virtual domains is going to require a bit of hacking. I really recommend reading all of the mailman documentation, including README.POSTFIX.gz, to understand what's being done here.</p>
560<p>One further note, current versions of mailman install to /usr/local/mailman. If you're like me and wish to change the default install location, it can be overridden in the ebuild filoe by changing the INSTALLDIR variable.</p> 560<p>One further note, current versions of mailman install to /usr/local/mailman. If you're like me and wish to change the default install location, it can be overridden in the ebuild filoe by changing the INSTALLDIR variable.</p>
561<pre caption="/usr/portage/net-mail/mailman/mailman-$ver.ebuild"> 561<pre caption="/usr/portage/net-mail/mailman/mailman-$ver.ebuild">
562# <i>nano -w /usr/portage/net-mail/mailman/mailman-$ver.ebuild</i> 562# <i>nano -w /usr/portage/net-mail/mailman/mailman-$ver.ebuild</i>
563MAILGID="280" 563MAILGID="280"

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

  ViewVC Help
Powered by ViewVC 1.1.20