/[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.57 Revision 1.58
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.57 2007/07/23 15:44:42 swift Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/virt-mail-howto.xml,v 1.58 2007/08/24 18:59:45 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 with Postfix Guide</title> 6<title>Virtual Mailhosting System with Postfix Guide</title>
7 7
8<author title="Author"> 8<author title="Author">
9 <mail link="antifa@gentoo.org">Ken Nowack</mail> 9 <mail link="antifa@gentoo.org">Ken Nowack</mail>
10</author> 10</author>
11<author title="Author"> 11<author title="Author">
12 <mail link="ezra@revoltltd.org">Ezra Gorman</mail> 12 <mail link="ezra@revoltltd.org">Ezra Gorman</mail>
13</author> 13</author>
14<author title="Editor"> 14<author title="Editor">
15 <mail link="klasikahl@gentoo.org">Zack Gilburd</mail> 15 <mail link="klasikahl@gentoo.org">Zack Gilburd</mail>
16</author> 16</author>
17<author title="Editor"> 17<author title="Editor">
18 <mail link="seather@scygro.za.net">Scygro</mail> 18 <mail link="seather@scygro.za.net">Scygro</mail>
19</author> 19</author>
20<author title="Editor"> 20<author title="Editor">
21 <mail link="swift@gentoo.org">Sven Vermeulen</mail> 21 <mail link="swift@gentoo.org">Sven Vermeulen</mail>
22</author> 22</author>
23 23
24<abstract> 24<abstract>
25This document details how to create a virtual mailhosting system based upon 25This document details how to create a virtual mailhosting system based upon
26postfix, mysql, courier-imap, and cyrus-sasl. 26postfix, mysql, courier-imap, and cyrus-sasl.
27</abstract> 27</abstract>
28 28
29<version>1.5</version> 29<version>1.6</version>
30<date>2007-07-23</date> 30<date>2007-08-24</date>
31 31
32<chapter> 32<chapter>
33<title>Introduction</title> 33<title>Introduction</title>
34<section> 34<section>
35<body> 35<body>
36 36
37<p> 37<p>
38For most Gentoo users, a simple mail client and fetchmail will do. However, if 38For most Gentoo users, a simple mail client and fetchmail will do. However, if
39you're hosting a domain with your system, you'll need a full blown MTA (Mail 39you're hosting a domain with your system, you'll need a full blown MTA (Mail
40Transfer Agent). And if you're hosting multiple domains, then you'll definitely 40Transfer Agent). And if you're hosting multiple domains, then you'll definitely
41need something more robust to handle all of the email for your users. This 41need something more robust to handle all of the email for your users. This
42system was designed to be an elegant solution to that problem. 42system was designed to be an elegant solution to that problem.
43</p> 43</p>
44 44
45<p> 45<p>
418# <i>adduser -d /home/vmail -s /bin/false -m vmail</i> 418# <i>adduser -d /home/vmail -s /bin/false -m vmail</i>
419</pre> 419</pre>
420 420
421<p> 421<p>
422So now you've set up the vmail account. You can create multiple accounts if you 422So now you've set up the vmail account. You can create multiple accounts if you
423want (to keep some structure in your set of virtual mail accounts). The user id, 423want (to keep some structure in your set of virtual mail accounts). The user id,
424group id and home dirs are referenced in the MySQL tables. 424group id and home dirs are referenced in the MySQL tables.
425</p> 425</p>
426 426
427<p> 427<p>
428Next to the user account we also need to create the location where the mailboxes 428Next to the user account we also need to create the location where the mailboxes
429will reside: 429will reside:
430</p> 430</p>
431 431
432<pre caption="Creating mailboxes"> 432<pre caption="Creating mailboxes">
433# <i>mkdir /home/vmail/virt-domain.com/foo</i> 433# <i>mkdir -p /home/vmail/virt-domain.com/foo</i>
434# <i>chown -R vmail:vmail /home/vmail/virt-domain.com</i> 434# <i>chown -R vmail:vmail /home/vmail/virt-domain.com</i>
435# <i>maildirmake /home/vmail/virt-domain.com/foo/.maildir</i> 435# <i>maildirmake /home/vmail/virt-domain.com/foo/.maildir</i>
436</pre> 436</pre>
437 437
438</body> 438</body>
439</section> 439</section>
440</chapter> 440</chapter>
441 441
442<chapter> 442<chapter>
443<title>MySQL</title> 443<title>MySQL</title>
444<section> 444<section>
445<body> 445<body>
446 446
447<p> 447<p>
448Next we're going to install and configure MySQL. You'll need the <uri 448Next we're going to install and configure MySQL. You'll need the <uri
449link="http://www.gentoo.org/doc/en/files/genericmailsql.sql">genericmailsql.sql</uri> 449link="http://www.gentoo.org/doc/en/files/genericmailsql.sql">genericmailsql.sql</uri>
450dumpfile for this step. 450dumpfile for this step.
451</p> 451</p>
452 452
453<pre caption="Installing and configuring MySQL"> 453<pre caption="Installing and configuring MySQL">
454# <i>emerge mysql</i> 454# <i>emerge mysql</i>
455 455
456# <i>/usr/bin/mysql_install_db</i> 456# <i>/usr/bin/mysql_install_db</i>
457<comment>(After this command runs follow the onscreen directions 457<comment>(After this command runs follow the onscreen directions
458for adding a root password with mysql, 458for adding a root password with mysql, otherwise your db will
459not mysqladmin, otherwise your db will be wide open.)</comment> 459be wide open.)</comment>
460 460
461# <i>/etc/init.d/mysql start</i> 461# <i>/etc/init.d/mysql start</i>
462# <i>mysqladmin -u root -p create mailsql</i> 462# <i>mysqladmin -u root -p create mailsql</i>
463# <i>mysql -u root -p mailsql &lt; genericmailsql.sql</i> 463# <i>mysql -u root -p mailsql &lt; genericmailsql.sql</i>
464 464
465# <i>mysql -u root -p mysql</i> 465# <i>mysql -u root -p mysql</i>
466mysql> <i>GRANT SELECT,INSERT,UPDATE,DELETE</i> 466mysql> <i>GRANT SELECT,INSERT,UPDATE,DELETE</i>
467 -> <i>ON mailsql.*</i> 467 -> <i>ON mailsql.*</i>
468 -> <i>TO mailsql@localhost</i> 468 -> <i>TO mailsql@localhost</i>
469 -> <i>IDENTIFIED BY '$password';</i> 469 -> <i>IDENTIFIED BY '$password';</i>
470Query OK, 0 rows affected (0.02 sec) 470Query OK, 0 rows affected (0.02 sec)
471 471
472mysql> <i>FLUSH PRIVILEGES;</i> 472mysql> <i>FLUSH PRIVILEGES;</i>
473Query OK, 0 rows affected (0.00 sec) 473Query OK, 0 rows affected (0.00 sec)
474 474

Legend:
Removed from v.1.57  
changed lines
  Added in v.1.58

  ViewVC Help
Powered by ViewVC 1.1.20