| 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.23 2004/01/07 15:15:11 swift 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"> |
13 | <author title="Editor"> |
| 14 | <mail link="klasikahl@gentoo.org" >Zack Gilburd</mail> |
14 | <mail link="klasikahl@gentoo.org" >Zack Gilburd</mail> |
| 15 | </author> |
15 | </author> |
| 16 | <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> |
| 17 | <version>1.0.8</version> |
17 | <version>1.0.9</version> |
| 18 | <date>January 7, 2004</date> |
18 | <date>February 8, 2004</date> |
| 19 | <!-- |
19 | <!-- |
| 20 | |
20 | |
| 21 | Contents |
21 | Contents |
| 22 | |
22 | |
| 23 | I. Introduction |
23 | I. Introduction |
| 24 | II. Postfix Basics |
24 | II. Postfix Basics |
| 25 | III. Courier-imap |
25 | III. Courier-imap |
| 26 | IV. Cyrus-sasl |
26 | IV. Cyrus-sasl |
| 27 | V. SSL Certificates for Postfix and Apache |
27 | V. SSL Certificates for Postfix and Apache |
| 28 | VI. Adding SSL and SASL support to Postfix |
28 | VI. Adding SSL and SASL support to Postfix |
| 29 | VII. MySQL |
29 | VII. MySQL |
| 30 | VIII. Apache and phpMyAdmin |
30 | VIII. Apache and phpMyAdmin |
| 31 | IX. The vmail user |
31 | IX. The vmail user |
| 32 | X. Configuring MySQL Authentication and vhosts |
32 | X. Configuring MySQL Authentication and vhosts |
| 33 | XI. Squirrelmail |
33 | XI. Squirrelmail |
| … | |
… | |
| 521 | local_recipient_maps = $alias_maps $virtual_mailbox_maps unix:passwd.byname |
521 | local_recipient_maps = $alias_maps $virtual_mailbox_maps unix:passwd.byname |
| 522 | |
522 | |
| 523 | virtual_transport = virtual |
523 | virtual_transport = virtual |
| 524 | virtual_mailbox_domains = |
524 | virtual_mailbox_domains = |
| 525 | virt-bar.com, |
525 | virt-bar.com, |
| 526 | $other-virtual-domain.com |
526 | $other-virtual-domain.com |
| 527 | |
527 | |
| 528 | virtual_minimum_uid = 1000 |
528 | virtual_minimum_uid = 1000 |
| 529 | virtual_gid_maps = static:$vmail-gid |
529 | virtual_gid_maps = static:$vmail-gid |
| 530 | virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-maps.cf |
530 | virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-maps.cf |
| 531 | virtual_alias_maps = mysql:/etc/postfix/mysql-virtual.cf |
531 | virtual_alias_maps = mysql:/etc/postfix/mysql-virtual.cf |
| 532 | virtual_uid_maps = static:$vmail-uid |
532 | virtual_uid_maps = static:$vmail-uid |
| 533 | virtual_mailbox_base = / |
533 | virtual_mailbox_base = / |
| 534 | #virtual_mailbox_limit = |
534 | #virtual_mailbox_limit = |
| 535 | </pre> |
535 | </pre> |
|
|
536 | |
|
|
537 | <p> |
|
|
538 | For 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 | |
| 536 | <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> |
| 537 | <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> |
| 538 | <pre># <i>postfix reload</i> |
549 | <pre># <i>postfix reload</i> |
| 539 | </pre> |
550 | </pre> |
| 540 | <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> |
| 541 | </body> |
552 | </body> |
| 542 | </chapter> |
553 | </chapter> |
| 543 | <chapter> |
554 | <chapter> |
| 544 | <title>Squirrelmail</title> |
555 | <title>Squirrelmail</title> |
| 545 | <body> |
556 | <body> |
| 546 | <pre> |
557 | <pre> |
| 547 | # <i>emerge squirrelmail</i> |
558 | # <i>emerge squirrelmail</i> |
| 548 | <codenote>I like to add a link to the htdocs space for a shorter url.</codenote> |
559 | <codenote>I like to add a link to the htdocs space for a shorter url.</codenote> |
| 549 | |
560 | |
| 550 | # <i>ln -s /var/www/localhost/htdocs/squirrelmail/ /var/www/localhost/htdocs/mail</i> |
561 | # <i>ln -s /var/www/localhost/htdocs/squirrelmail/ /var/www/localhost/htdocs/mail</i> |