/[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.50 Revision 1.56
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.50 2006/04/09 07:42:45 fox2mike Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/virt-mail-howto.xml,v 1.56 2007/07/20 09:09:04 nightmorph 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
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">
21 <mail link="swift@gentoo.org">Sven Vermeulen</mail>
22</author>
20 23
21<abstract> 24<abstract>
22This document details how to create a virtual mailhosting system based upon 25This document details how to create a virtual mailhosting system based upon
23postfix, mysql, courier-imap, and cyrus-sasl. 26postfix, mysql, courier-imap, and cyrus-sasl.
24</abstract> 27</abstract>
25 28
26<version>1.0.27</version> 29<version>1.4</version>
27<date>2006-04-09</date> 30<date>2007-07-20</date>
28 31
29<!-- 32<!--
30Contents 33Contents
31 34
32I. Introduction 35I. Introduction
50<title>Introduction</title> 53<title>Introduction</title>
51<section> 54<section>
52<body> 55<body>
53 56
54<p> 57<p>
55For most gentoo users, a simple mail client and fetchmail will do. However, if 58For most Gentoo users, a simple mail client and fetchmail will do. However, if
56you're hosting a domain with your system, you'll need a full blown MTA (Mail 59you're hosting a domain with your system, you'll need a full blown MTA (Mail
57Transfer Agent). And if you're hosting multiple domains, then you'll definitely 60Transfer Agent). And if you're hosting multiple domains, then you'll definitely
58need something more robust to handle all of the email for your users. This 61need something more robust to handle all of the email for your users. This
59system was designed to be an elegant solution to that problem. 62system was designed to be an elegant solution to that problem.
60</p> 63</p>
99get the support you need for all the protocols. Further, it's a good idea to 102get the support you need for all the protocols. Further, it's a good idea to
100turn off any other mail and network variables, like ipv6. 103turn off any other mail and network variables, like ipv6.
101</p> 104</p>
102 105
103<impo> 106<impo>
104This howto was written for postfix-2.0.x. If you are using postfix &lt; 2 some
105of the variables in this document will be different. It is recommended that you
106upgrade. Some other packages included in this howto are version sensitive as
107well. You are advised to read the documentation included with packages if you
108run into issues with this.
109</impo>
110
111<impo>
112This document uses apache-1.3.x. Apache-2 has been marked stable in portage.
113However there are still a number of issues with php integration. Until php
114support in apache-2.0.x is marked stable, this guide will continue to use the
1151.3.x version.
116</impo>
117
118<impo>
119You need a domain name to run a public mail server, or at least an MX record 107You need a domain name to run a public mail server, or at least an MX record
120for a domain. Ideally you would have control of at least two domains to take 108for a domain. Ideally you would have control of at least two domains to take
121advantage of your new virtual domain functionality. 109advantage of your new virtual domain functionality.
122</impo> 110</impo>
123 111
124<impo> 112<impo>
125Make sure <path>/etc/hostname</path> is set to the right hostname for your mail 113Make sure <path>/etc/conf.d/hostname</path> is set to the right hostname for
126server. Verify your hostname is set correctly with <c>hostname</c>. Also 114your mail server. You can apply any changes you make to this file by running
127verify that there are no conflicting entries in <path>/etc/hosts</path>. 115<c>/etc/init.d/hostname restart</c>. Verify your hostname is set correctly with
116<c>hostname</c>. Also verify that there are no conflicting entries in
117<path>/etc/hosts</path>.
128</impo> 118</impo>
129 119
130<note> 120<note>
131It is recommended that you read this entire document and familiarize yourself 121It is recommended that you read this entire document and familiarize yourself
132with all the steps before attempting the install. If you run into problems with 122with all the steps before attempting the install. If you run into problems with
149# <i>emerge postfix</i> 139# <i>emerge postfix</i>
150</pre> 140</pre>
151 141
152<warn> 142<warn>
153Verify that you have not installed any other MTA, such as ssmtp, exim, or 143Verify that you have not installed any other MTA, such as ssmtp, exim, or
154qmail, or you will surely have BIG problems. 144netqmail, or you will surely have BIG problems.
155</warn> 145</warn>
156 146
157<p> 147<p>
158After postfix is installed, it's time to configure it. Change the following 148After postfix is installed, it's time to configure it. Change the following
159options in <path>/etc/postfix/main.cf</path>: 149options in <path>/etc/postfix/main.cf</path>. Remember to replace
150<c>$variables</c> with your own names.
160</p> 151</p>
161 152
162<pre caption="/etc/postfix/main.cf"> 153<pre caption="/etc/postfix/main.cf">
163myhostname = $host.domain.name 154myhostname = $host.domain.name
164mydomain = $domain.name 155mydomain = $domain.name
243# <i>/etc/init.d/courier-pop3d-ssl start</i> 234# <i>/etc/init.d/courier-pop3d-ssl start</i>
244</pre> 235</pre>
245 236
246<p> 237<p>
247Start up your favorite mail client and verify that all connections you've 238Start up your favorite mail client and verify that all connections you've
248started work for receiving and sending mail. Now that the basics work, we're 239started work for receiving and sending mail. Of course, you won't be able to log
249going to do a whole bunch of stuff at once to get the rest of the system 240on to any of the services because authentication hasn't been configured yet, but
250running. Again, please verify that what we've installed already works before 241it is wise to check if the connections themselves work or not.
251progressing. 242</p>
243
244<p>
245Now that the basics work, we're going to do a whole bunch of stuff at once to
246get the rest of the system running. Again, please verify that what we've
247installed already works before progressing.
252</p> 248</p>
253 249
254</body> 250</body>
255</section> 251</section>
256</chapter> 252</chapter>
313emailAddress_default. 309emailAddress_default.
314 310
315<comment>(If the variables are not already present, just add them in a sensible place.)</comment> 311<comment>(If the variables are not already present, just add them in a sensible place.)</comment>
316 312
317# <i>cd misc</i> 313# <i>cd misc</i>
318# <i>nano -w CA.pl</i> 314# <i>./CA.pl -newreq-nodes</i>
319<comment>(We need to add -nodes to the # create a certificate and
320#create a certificate request code in order to let our new ssl
321certs be loaded without a password. Otherwise when you
322reboot your ssl certs will not be available.)</comment>
323
324# create a certificate
325system ("$REQ -new -nodes -x509 -keyout newreq.pem -out newreq.pem $DAYS");
326
327# create a certificate request
328system ("$REQ -new -nodes -keyout newreq.pem -out newreq.pem $DAYS");
329
330# <i>./CA.pl -newca</i> 315# <i>./CA.pl -newca</i>
331# <i>./CA.pl -newreq</i>
332# <i>./CA.pl -sign</i> 316# <i>./CA.pl -sign</i>
333# <i>cp newcert.pem /etc/postfix</i> 317# <i>cp newcert.pem /etc/postfix</i>
334# <i>cp newreq.pem /etc/postfix</i> 318# <i>cp newkey.pem /etc/postfix</i>
335# <i>cp demoCA/cacert.pem /etc/postfix</i> 319# <i>cp demoCA/cacert.pem /etc/postfix</i>
336<comment>(Now we do the same thing for apache.)</comment> 320<comment>(Now we do the same thing for apache.)</comment>
337 321
338# <i>openssl req -new > new.cert.csr</i> 322# <i>openssl req -new > new.cert.csr</i>
339# <i>openssl rsa -in privkey.pem -out new.cert.key</i> 323# <i>openssl rsa -in privkey.pem -out new.cert.key</i>
382<comment>(The next two options enable outgoing encryption.)</comment> 366<comment>(The next two options enable outgoing encryption.)</comment>
383smtp_use_tls = yes 367smtp_use_tls = yes
384smtp_tls_note_starttls_offer = yes 368smtp_tls_note_starttls_offer = yes
385smtpd_use_tls = yes 369smtpd_use_tls = yes
386#smtpd_tls_auth_only = yes 370#smtpd_tls_auth_only = yes
387smtpd_tls_key_file = /etc/postfix/newreq.pem 371smtpd_tls_key_file = /etc/postfix/newkey.pem
388smtpd_tls_cert_file = /etc/postfix/newcert.pem 372smtpd_tls_cert_file = /etc/postfix/newcert.pem
389smtpd_tls_CAfile = /etc/postfix/cacert.pem 373smtpd_tls_CAfile = /etc/postfix/cacert.pem
390smtpd_tls_loglevel = 3 374smtpd_tls_loglevel = 3
391smtpd_tls_received_header = yes 375smtpd_tls_received_header = yes
392smtpd_tls_session_cache_timeout = 3600s 376smtpd_tls_session_cache_timeout = 3600s
536Next we'll set up apache and add an interface to interact with the database 520Next we'll set up apache and add an interface to interact with the database
537more easily. 521more easily.
538</p> 522</p>
539 523
540<pre caption="Setting up apache and phpmyadmin"> 524<pre caption="Setting up apache and phpmyadmin">
541# <i>emerge apache mod_php phpmyadmin</i> 525# <i>emerge apache phpmyadmin</i>
542</pre> 526</pre>
543 527
544<p> 528<p>
545There are plenty of guides out there about how to set up apache with php. Like 529There are plenty of guides out there about how to set up apache with php,
546this one: <uri>http://www.linuxguruz.org/z.php?id=31</uri>. There are also 530including guides provided by the <uri link="/proj/en/php/">Gentoo PHP
531Project</uri>. There are also numerous posts on
547numerous posts on <uri>http://forums.gentoo.org</uri> detailing how to solve 532<uri>http://forums.gentoo.org</uri> detailing how to solve problems with the
548problems with the installation (search for 'apache php'). So, that said, I'm 533installation. So, that said, we're not going to cover it here. Set up the
549not going to cover it here. Set up the apache and php installs, then continue 534apache and php installs, then continue with this howto. Now, a word for the
550with this howto. Now, a word for the wise: .htaccess the directory that you put 535wise: .htaccess the directory that you put phpmyadmin in. If you do not do this,
551phpmyadmin in. If you do not do this, search engine spiders will come along and 536search engine spiders will come along and index the page which in turn will mean
552index the page which in turn will mean that anyone will be able to find your 537that anyone will be able to find your phpmyadmin page via google and in turn be
553phpmyadmin page via google and in turn be able to come change your database 538able to come change your database however they want which is <e>BAD!</e> There
554however they want which is <e>BAD!</e> There are many howtos on this 539are many howtos on this including:
555including: <uri>http://www.csoft.net/docs/micro/htaccess.html.en</uri>. 540<uri>http://www.csoft.net/docs/micro/htaccess.html.en</uri>.
556</p> 541</p>
557 542
558<p> 543<p>
559Now we're going to install the Apache certificates we made previously. The 544Now we're going to install the Apache certificates we made previously. The
560Apache-SSL directives that you need to use the resulting cert are: 545Apache-SSL directives that you need to use the resulting cert are:
564 <li>SSLCertificateFile /path/to/certs/new.cert.cert</li> 549 <li>SSLCertificateFile /path/to/certs/new.cert.cert</li>
565 <li>SSLCertificateKeyFile /path/to/certs/new.cert.key</li> 550 <li>SSLCertificateKeyFile /path/to/certs/new.cert.key</li>
566</ul> 551</ul>
567 552
568<pre caption="Install Apache SSL certificates"> 553<pre caption="Install Apache SSL certificates">
569# <i>cp /etc/ssl/misc/new.cert.cert /etc/apache/conf/ssl/</i> 554# <i>cp /etc/ssl/misc/new.cert.cert /etc/apache2/ssl/</i>
570# <i>cp /etc/ssl/misc/new.cert.key /etc/apache/conf/ssl/</i> 555# <i>cp /etc/ssl/misc/new.cert.key /etc/apache2/ssl/</i>
571# <i>nano -w /etc/apache/conf/vhosts/ssl.default-vhost.conf</i> 556# <i>cd /etc/apache2/vhosts.d</i>
557<comment>(Check if you have an ssl-vhost template already.
558 Copy that one instead of the default_vhost if that is the case)</comment>
559# <i>cp 00_default_vhost.conf ssl-vhost.conf</i>
560# <i>nano -w ssl-vhost.conf</i>
572 561
573<comment>(Change the following parameters)</comment> 562<comment>(Change the following parameters)</comment>
563NameVirtualHost host.domain.name:443
574 564
565&lt;VirtualHost host.domain.name:443&gt;
575ServerName host.domain.name 566 ServerName host.domain.name
576ServerAdmin your@email.address 567 ServerAdmin your@email.address
568
569 DocumentRoot "/var/www/localhost/htdocs/phpmyadmin";
570 &lt;Directory "/var/www/localhost/htdocs/phpmyadmin"&gt;
571 ...
572 &lt;/Directory&gt;
573
577SSLCertificateFile /etc/apache/conf/ssl/new.cert.cert 574 SSLCertificateFile /etc/apache2/ssl/new.cert.cert
578SSLCertificateKeyFile /etc/apache/conf/ssl/new.cert.key 575 SSLCertificateKeyFile /etc/apache2/ssl/new.cert.key
576 SSLEngine on
577 ...
578&lt;/VirtualHost&gt;
579 579
580# <i>nano -w /etc/conf.d/apache2</i>
581<comment>(Add -D SSL -D PHP5 to the APACHE2_OPTS)</comment>
582
580# <i>/etc/init.d/apache restart</i> 583# <i>/etc/init.d/apache2 restart</i>
581</pre> 584</pre>
582
583<note>
584If you have an existing apache install, you'll likely have to perform a full
585server reboot to install your new certificates. Check your logs to verify
586apache restarted successfully.
587</note>
588 585
589<p> 586<p>
590Next, configure phpMyAdmin. 587Next, configure phpMyAdmin.
591</p> 588</p>
592 589
593<pre caption="Configuring phpMyAdmin"> 590<pre caption="Configuring phpMyAdmin">
594# <i>nano -w /var/www/localhost/htdocs/phpmyadmin/config.inc.php</i> 591# <i>cd /var/www/localhost/htdocs/phpmyadmin</i>
592# <i>cp config.sample.inc.php config.inc.php</i>
593# <i>nano -w config.inc.php</i>
595<comment>(Change the following parameters.)</comment> 594<comment>(Change the following parameters.)</comment>
595$cfg['blowfish_secret'] = 'someverysecretpassphraze';
596 596
597$cfg['Servers'][$i]['host'] = 'localhost'; // MySQL hostname 597$cfg['Servers'][$i]['host'] = 'localhost'; // MySQL hostname
598$cfg['Servers'][$i]['controluser'] = 'mailsql'; // MySQL control user settings 598$cfg['Servers'][$i]['controluser'] = 'mailsql'; // MySQL control user settings
599 // (this user must have read-only 599 // (this user must have read-only
600$cfg['Servers'][$i]['controlpass'] = '$password'; // access to the "mysql/user" 600$cfg['Servers'][$i]['controlpass'] = '$password'; // access to the "mysql/user"
607Now enter the phpmyadmin page and browse the tables. You'll want to add in your 607Now enter the phpmyadmin page and browse the tables. You'll want to add in your
608local aliases, edit your user table to add a test user, and change your 608local aliases, edit your user table to add a test user, and change your
609transport table to add information about your domains. The default values 609transport table to add information about your domains. The default values
610supplied with the dumpfile should be a sufficient guide to what values need to 610supplied with the dumpfile should be a sufficient guide to what values need to
611go where. Make sure that if you put information in the database that it is 611go where. Make sure that if you put information in the database that it is
612accurate. For instance, make sure the local users home dir exists and that the 612accurate. For instance, make sure the local user's home dir exists and that the
613correct uid/gid values are in place. The maildirs should be created 613correct uid/gid values are in place. The maildirs should be created
614automatically by postfix when the user receives their first email. So, in 614automatically by postfix when the user receives their first email. So, in
615general, it's a good idea to send a "Welcome" mail to a new user 615general, it's a good idea to send a "Welcome" mail to a new user after you
616after you setup their account to make sure the .maildir gets created. 616setup their account to make sure the .maildir gets created.
617</p> 617</p>
618 618
619</body> 619</body>
620</section> 620</section>
621</chapter> 621</chapter>
629At this point you may be wondering what user and directory to use for virtual 629At this point you may be wondering what user and directory to use for virtual
630mail users, and rightly so. Let's set that up. 630mail users, and rightly so. Let's set that up.
631</p> 631</p>
632 632
633<pre caption="Adding the vmail user"> 633<pre caption="Adding the vmail user">
634# <i>adduser -d /home/vmail -s /bin/false vmail</i> 634# <i>adduser -d /home/vmail -s /bin/false -m vmail</i>
635# <i>uid=`cat /etc/passwd | grep vmail | cut -f 3 -d :`</i>
636# <i>groupadd -g $uid vmail</i>
637# <i>mkdir /home/vmail</i>
638# <i>chown vmail: /home/vmail</i>
639</pre> 635</pre>
640 636
641<p> 637<p>
642So now when you're setting up vmail accounts, use the vmail uid, gid, and 638So now you've set up the vmail account. You can create multiple accounts if you
643homedir. When you're setting up local accounts, use that users uid, gid, and 639want (to keep some structure in your set of virtual mail accounts). The user id,
644homedir. We've been meaning to create a php admin page for this setup but 640group id and home dirs are referenced in the MySQL tables.
645haven't gotten around to it yet, as phpmyadmin generally works fine for us.
646</p> 641</p>
647 642
648</body> 643</body>
649</section> 644</section>
650</chapter> 645</chapter>
683# <i>/etc/init.d/courier-authlib restart</i> 678# <i>/etc/init.d/courier-authlib restart</i>
684# <i>/etc/init.d/saslauthd restart</i> 679# <i>/etc/init.d/saslauthd restart</i>
685</pre> 680</pre>
686 681
687<p> 682<p>
688We're almost there I promise! Next, set up the rest of the necessary config's 683We're almost there, I promise! Next, set up the rest of the necessary configs
689for postfix to interract with the database for all it's other transport needs. 684for postfix to interract with the database for all its other transport needs.
685Remember to replace each value with the name of your own user, user id,
686password, alias, email address, and so on.
690</p> 687</p>
691 688
692<pre caption="/etc/postfix/mysql-aliases.cf"> 689<pre caption="/etc/postfix/mysql-aliases.cf">
693# <i>nano -w /etc/postfix/mysql-aliases.cf</i> 690# <i>nano -w /etc/postfix/mysql-aliases.cf</i>
694# mysql-aliases.cf 691# mysql-aliases.cf
728hosts = unix:/var/run/mysqld/mysqld.sock 725hosts = unix:/var/run/mysqld/mysqld.sock
729</pre> 726</pre>
730 727
731<pre caption="/etc/postfix/mysql-virtual-gid.cf (optional)"> 728<pre caption="/etc/postfix/mysql-virtual-gid.cf (optional)">
732# <i>nano -w /etc/postfix/mysql-virtual-gid.cf</i> 729# <i>nano -w /etc/postfix/mysql-virtual-gid.cf</i>
733#myql-virtual-gid.cf 730# mysql-virtual-gid.cf
734 731
735user = mailsql 732user = mailsql
736password = $password 733password = $password
737dbname = mailsql 734dbname = mailsql
738table = users 735table = users
787Lastly, edit <path>/etc/postfix/main.cf</path> one more time. 784Lastly, edit <path>/etc/postfix/main.cf</path> one more time.
788</p> 785</p>
789 786
790<pre caption="/etc/postfix/main.cf"> 787<pre caption="/etc/postfix/main.cf">
791# <i>nano -w /etc/postfix/main.cf</i> 788# <i>nano -w /etc/postfix/main.cf</i>
789<comment>(Ensure that there are no other alias_maps definitions)</comment>
792alias_maps = mysql:/etc/postfix/mysql-aliases.cf 790alias_maps = mysql:/etc/postfix/mysql-aliases.cf
793relocated_maps = mysql:/etc/postfix/mysql-relocated.cf 791relocated_maps = mysql:/etc/postfix/mysql-relocated.cf
794 792
795local_transport = local 793local_transport = local
796local_recipient_maps = $alias_maps $virtual_mailbox_maps unix:passwd.byname 794local_recipient_maps = $alias_maps $virtual_mailbox_maps unix:passwd.byname
797 795
798virtual_transport = virtual 796virtual_transport = virtual
799virtual_mailbox_domains = 797<comment>(The domains listed by the mydestination should not be listed in
800 virt-bar.com, 798 the virtual_mailbox_domains parameter)</comment>
801 $other-virtual-domain.com 799virtual_mailbox_domains = virt-bar.com, $other-virtual-domain.com
802 800
803virtual_minimum_uid = 1000 801virtual_minimum_uid = 1000
802<comment>(Substitute $vmail-gid with the GID of the vmail group)</comment>
804virtual_gid_maps = static:$vmail-gid 803virtual_gid_maps = static:$vmail-gid
805virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-maps.cf 804virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-maps.cf
806virtual_alias_maps = mysql:/etc/postfix/mysql-virtual.cf 805virtual_alias_maps = mysql:/etc/postfix/mysql-virtual.cf
806<comment>(Substitute $vmail-uid with the UID of the vmail user)</comment>
807virtual_uid_maps = static:$vmail-uid 807virtual_uid_maps = static:$vmail-uid
808virtual_mailbox_base = / 808virtual_mailbox_base = /
809#virtual_mailbox_limit = 809#virtual_mailbox_limit =
810</pre> 810</pre>
811 811
881to require a bit of hacking. I really recommend reading all of the mailman 881to require a bit of hacking. I really recommend reading all of the mailman
882documentation, including README.POSTFIX.gz, to understand what's being done 882documentation, including README.POSTFIX.gz, to understand what's being done
883here. 883here.
884</p> 884</p>
885 885
886<p>
887One further note, current versions of mailman install to /usr/local/mailman. If
888you're like me and wish to change the default install location, it can be
889overridden in the ebuild file by changing the INSTALLDIR variable.
890</p>
891
892<pre caption="Install mailman"> 886<pre caption="Install mailman">
893# <i>emerge mailman</i> 887# <i>emerge mailman</i>
894</pre> 888</pre>
895 889
896<pre caption="Setting defaults: Mailman/Defaults.py"> 890<pre caption="Setting defaults: Mailman/Defaults.py">
897# <i> nano -w /var/mailman/Mailman/Defaults.py</i> 891# <i> nano -w /usr/local/mailman/Mailman/Defaults.py</i>
898<comment>(Change the values below to reflect your primary domain, virtuals will be set next.)</comment> 892<comment>(Change the values below to reflect your primary domain, virtuals will be set next.)</comment>
899DEFAULT_EMAIL_HOST = 'domain.com' 893DEFAULT_EMAIL_HOST = 'domain.com'
900DEFAULT_URL_HOST = 'www.domain.com' 894DEFAULT_URL_HOST = 'www.domain.com'
901</pre> 895</pre>
902 896
903<pre caption="mailman config: mm_cfg.py"> 897<pre caption="mailman config: mm_cfg.py">
904# <i>nano -w /var/mailman/Mailman/mm_cfg.py</i> 898# <i>nano -w /usr/local/mailman/Mailman/mm_cfg.py</i>
905MTA = "Postfix" 899MTA = "Postfix"
906POSTFIX_STYLE_VIRTUAL_DOMAINS = ['virt-domain.com', 'virt.domain2.com'] 900POSTFIX_STYLE_VIRTUAL_DOMAINS = ['virt-domain.com', 'virt.domain2.com']
907add_virtualhost('www.virt.domain.com', 'virt.domain.com') 901add_virtualhost('www.virt.domain.com', 'virt.domain.com')
908add_virtualhost('www.virt.domain2.com', 'virt.domain2.com') 902add_virtualhost('www.virt.domain2.com', 'virt.domain2.com')
909<comment>(This is required for your virtual domains for mailman to function.)</comment> 903<comment>(This is required for your virtual domains for mailman to function.)</comment>
912<pre caption="And last but not least"> 906<pre caption="And last but not least">
913<comment>(Once that's finished, add your first list.)</comment> 907<comment>(Once that's finished, add your first list.)</comment>
914 908
915# <i>su mailman</i> 909# <i>su mailman</i>
916# <i>cd ~</i> 910# <i>cd ~</i>
917# <i>bin/newlist test</i> 911# <i>./bin/newlist test</i>
918Enter the email of the person running the list: <i>your@email.address</i> 912Enter the email of the person running the list: <i>your@email.address</i>
919Initial test password: 913Initial test password:
920Hit enter to continue with test owner notification... 914Hit enter to continue with test owner notification...
921<comment>(Virtual domain lists may be specified with 915<comment>(Virtual domain lists may be specified with
922list@domain.com style list names.)</comment> 916list@domain.com style list names.)</comment>
923# <i>bin/genaliases</i> 917# <i>./bin/genaliases</i>
924<comment>(Now that your aliases have been generated, 918<comment>(Now that your aliases have been generated,
925verify that they were added successfully.)</comment> 919verify that they were added successfully.)</comment>
926 920
927# <i>nano -w data/aliases</i> 921# <i>nano -w data/aliases</i>
928# STANZA START: test 922# STANZA START: test
937test-request: "|/var/mailman/mail/mailman request test" 931test-request: "|/var/mailman/mail/mailman request test"
938test-subscribe: "|/var/mailman/mail/mailman subscribe test" 932test-subscribe: "|/var/mailman/mail/mailman subscribe test"
939test-unsubscribe: "|/var/mailman/mail/mailman unsubscribe test" 933test-unsubscribe: "|/var/mailman/mail/mailman unsubscribe test"
940# STANZA END: test 934# STANZA END: test
941 935
936<comment>(Create the required mailman list)</comment>
937# <i>./bin/newlist mailman</i>
938# <i>./bin/genaliases</i>
939
940<comment>(Return to the root user)</comment>
941# <i>exit</i>
942
942# <i>/etc/init.d/mailman start</i> 943# <i>/etc/init.d/mailman start</i>
943# <i>rc-update add mailman default</i> 944# <i>rc-update add mailman default</i>
944<comment>(To start mailman at once and on every reboot.)</comment> 945<comment>(To start mailman at once and on every reboot.)</comment>
945</pre> 946</pre>
946 947
949owner_request_special = no 950owner_request_special = no
950recipient_delimiter = + 951recipient_delimiter = +
951<comment>(Read README.POSTFIX.gz for details on this.)</comment> 952<comment>(Read README.POSTFIX.gz for details on this.)</comment>
952 953
953alias_maps = 954alias_maps =
954 hash:/var/mailman/data/aliases, 955 hash:/usr/local/mailman/data/aliases,
955 mysql:/etc/postfix/mysql-aliases.cf 956 mysql:/etc/postfix/mysql-aliases.cf
956 957
957virtual_alias_maps = 958virtual_alias_maps =
958 hash:/var/mailman/data/virtual-mailman, 959 hash:/usr/local/mailman/data/virtual-mailman,
959 mysql:/etc/postfix/mysql-virtual.cf 960 mysql:/etc/postfix/mysql-virtual.cf
960<comment>(This adds mailman alias file support to postfix 961<comment>(This adds mailman alias file support to postfix
961You may of course use the mysql tables for this, 962You may of course use the mysql tables for this,
962but I hate doing that by hand. Also, if you are not 963but I hate doing that by hand. Also, if you are not
963using virtual domains, adding the virtual alias maps 964using virtual domains, adding the virtual alias maps
1084sure it's using the current version. Some of the components will dump their 1085sure it's using the current version. Some of the components will dump their
1085current config's to you, like postfix. 1086current config's to you, like postfix.
1086</p> 1087</p>
1087 1088
1088<pre caption="Some services can dump their current config"> 1089<pre caption="Some services can dump their current config">
1089# <i>apachectl fullstatus</i> (needs lynx installed) 1090# <i>apache2ctl fullstatus</i> (needs lynx installed)
1090# <i>apachectl configtest</i> (checks config sanity) 1091# <i>apache2ctl configtest</i> (checks config sanity)
1091# <i>postconf -n</i> (will tell you exactly what param's postfix is using) 1092# <i>postconf -n</i> (will tell you exactly what param's postfix is using)
1092# <i>/etc/init.d/$service restart</i> 1093# <i>/etc/init.d/$service restart</i>
1093</pre> 1094</pre>
1094 1095
1095</body> 1096</body>
1109 1110
1110<pre caption="Checking the logs"> 1111<pre caption="Checking the logs">
1111# <i>kill -USR1 `ps -C metalog -o pid=`</i>(to turn off metalog buffering) 1112# <i>kill -USR1 `ps -C metalog -o pid=`</i>(to turn off metalog buffering)
1112# <i>nano -w /var/log/mail/current</i> 1113# <i>nano -w /var/log/mail/current</i>
1113# <i>cat /var/log/mysql/mysql.log</i> 1114# <i>cat /var/log/mysql/mysql.log</i>
1114# <i>tail /var/log/apache/error_log</i> 1115# <i>tail /var/log/apache2/error_log</i>
1115</pre> 1116</pre>
1116 1117
1117<p> 1118<p>
1118You may also find the debug_peer parameters in main.cf helpful. Setting these 1119You may also find the debug_peer parameters in main.cf helpful. Setting these
1119will increase log output over just verbose mode. 1120will increase log output over just verbose mode.

Legend:
Removed from v.1.50  
changed lines
  Added in v.1.56

  ViewVC Help
Powered by ViewVC 1.1.20