| 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.43 2005/03/25 15:00:25 swift Exp $ --> |
2 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/virt-mail-howto.xml,v 1.44 2005/05/23 16:09:09 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 | |
17 | |
| 18 | <abstract> |
18 | <abstract> |
| 19 | This document details how to create a virtual mailhosting system based upon |
19 | This document details how to create a virtual mailhosting system based upon |
| 20 | postfix, mysql, courier-imap, and cyrus-sasl. |
20 | postfix, mysql, courier-imap, and cyrus-sasl. |
| 21 | </abstract> |
21 | </abstract> |
| 22 | |
22 | |
| 23 | <version>1.0.20</version> |
23 | <version>1.0.21</version> |
| 24 | <date>2005-03-25</date> |
24 | <date>2005-05-23</date> |
| 25 | |
25 | |
| 26 | <!-- |
26 | <!-- |
| 27 | Contents |
27 | Contents |
| 28 | |
28 | |
| 29 | I. Introduction |
29 | I. Introduction |
| 30 | II. Postfix Basics |
30 | II. Postfix Basics |
| 31 | III. Courier-imap |
31 | III. Courier-imap |
| 32 | IV. Cyrus-sasl |
32 | IV. Cyrus-sasl |
| 33 | V. SSL Certificates for Postfix and Apache |
33 | V. SSL Certificates for Postfix and Apache |
| 34 | VI. Adding SSL and SASL support to Postfix |
34 | VI. Adding SSL and SASL support to Postfix |
| 35 | VII. MySQL |
35 | VII. MySQL |
| 36 | VIII. Apache and phpMyAdmin |
36 | VIII. Apache and phpMyAdmin |
| 37 | IX. The vmail user |
37 | IX. The vmail user |
| 38 | X. Configuring MySQL Authentication and vhosts |
38 | X. Configuring MySQL Authentication and vhosts |
| 39 | XI. Squirrelmail |
39 | XI. Squirrelmail |
| … | |
… | |
| 679 | MYSQL_SERVER localhost |
679 | MYSQL_SERVER localhost |
| 680 | MYSQL_USERNAME mailsql |
680 | MYSQL_USERNAME mailsql |
| 681 | MYSQL_PASSWORD $password |
681 | MYSQL_PASSWORD $password |
| 682 | MYSQL_DATABASE mailsql |
682 | MYSQL_DATABASE mailsql |
| 683 | MYSQL_USER_TABLE users |
683 | MYSQL_USER_TABLE users |
| 684 | <comment>(Make sure the following line is commented out since we're storing plaintext.)</comment> |
684 | <comment>(Make sure the following line is commented out since we're storing plaintext.)</comment> |
| 685 | #MYSQL_CRYPT_PWFIELD crypt |
685 | #MYSQL_CRYPT_PWFIELD crypt |
| 686 | MYSQL_CLEAR_PWFIELD clear |
686 | MYSQL_CLEAR_PWFIELD clear |
| 687 | MYSQL_UID_FIELD uid |
687 | MYSQL_UID_FIELD uid |
| 688 | MYSQL_GID_FIELD gid |
688 | MYSQL_GID_FIELD gid |
| 689 | MYSQL_LOGIN_FIELD email |
689 | MYSQL_LOGIN_FIELD email |
| 690 | MYSQL_HOME_FIELD homedir |
690 | MYSQL_HOME_FIELD homedir |
| 691 | MYSQL_NAME_FIELD name |
691 | MYSQL_NAME_FIELD name |
| 692 | MYSQL_MAILDIR_FIELD maildir |
692 | MYSQL_MAILDIR_FIELD maildir |
| 693 | |
693 | |
| 694 | # <i>/etc/init.d/authdaemond restart</i> |
694 | # <i>/etc/init.d/courier-authlib restart</i> |
| 695 | # <i>/etc/init.d/saslauthd restart</i> |
695 | # <i>/etc/init.d/saslauthd restart</i> |
| 696 | </pre> |
696 | </pre> |
| 697 | |
697 | |
| 698 | <p> |
698 | <p> |
| 699 | We're almost there I promise! Next, set up the rest of the necessary config's |
699 | We're almost there I promise! Next, set up the rest of the necessary config's |
| 700 | for postfix to interract with the database for all it's other transport needs. |
700 | for postfix to interract with the database for all it's other transport needs. |
| 701 | </p> |
701 | </p> |
| 702 | |
702 | |
| 703 | <pre caption="/etc/postfix/mysql-aliases.cf"> |
703 | <pre caption="/etc/postfix/mysql-aliases.cf"> |
| 704 | # <i>nano -w /etc/postfix/mysql-aliases.cf</i> |
704 | # <i>nano -w /etc/postfix/mysql-aliases.cf</i> |
| 705 | # mysql-aliases.cf |
705 | # mysql-aliases.cf |
| 706 | |
706 | |
| 707 | user = mailsql |
707 | user = mailsql |
| 708 | password = $password |
708 | password = $password |
| 709 | dbname = mailsql |
709 | dbname = mailsql |