/[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.40 Revision 1.61
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.40 2004/12/22 21:33:10 swift Exp $ -->
3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 2<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
3<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/virt-mail-howto.xml,v 1.61 2010/10/14 06:11:38 nightmorph Exp $ -->
4 4
5<guide link="/doc/en/virt-mail-howto.xml"> 5<guide>
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>
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">
18 <mail link="seather@scygro.za.net">Scygro</mail>
19</author>
20<author title="Editor">
21 <mail link="swift@gentoo.org">Sven Vermeulen</mail>
22</author>
17 23
18<abstract> 24<abstract>
19This document details how to create a virtual mailhosting system based upon 25This document details how to create a virtual mailhosting system based upon
20postfix, mysql, courier-imap, and cyrus-sasl. 26postfix, mysql, courier-imap, and cyrus-sasl.
21</abstract> 27</abstract>
22 28
23<version>1.0.17</version> 29<version>2</version>
24<date>2004-12-22</date> 30<date>2010-10-13</date>
25
26<!--
27Contents
28
29I. Introduction
30II. Postfix Basics
31III. Courier-imap
32IV. Cyrus-sasl
33V. SSL Certificates for Postfix and Apache
34VI. Adding SSL and SASL support to Postfix
35VII. MySQL
36VIII. Apache and phpMyAdmin
37IX. The vmail user
38X. Configuring MySQL Authentication and vhosts
39XI. Squirrelmail
40XII. Mailman
41XIII. Content Filtering and Anti-Virus
42XIV. Wrap Up
43XV. Troubleshooting
44-->
45 31
46<chapter> 32<chapter>
47<title>Introduction</title> 33<title>Introduction</title>
48<section> 34<section>
49<body> 35<body>
50 36
51<p> 37<p>
52For 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
53you'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
54Transfer 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
55need 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
56system was designed to be an elegant solution to that problem. 42system was designed to be an elegant solution to that problem.
57</p> 43</p>
82needs. Consider investigating <uri>http://www.qmail.org/</uri> and 68needs. Consider investigating <uri>http://www.qmail.org/</uri> and
83<uri>http://www.exim.org/</uri> to explore your options. 69<uri>http://www.exim.org/</uri> to explore your options.
84</p> 70</p>
85 71
86<p> 72<p>
87The following packages are used in this setup: apache, courier-imap, pam_mysql, 73The following packages are used in this setup: apache, courier-imap,
88postfix, mod_php, phpmyadmin, squirrelmail, cyrus-sasl, mysql, php, and 74courier-authlib postfix, mod_php, phpmyadmin, squirrelmail, cyrus-sasl, mysql,
89mailman. 75php, and mailman.
90</p> 76</p>
91 77
92<p> 78<p>
93Make sure to turn on the following USE variables in <path>/etc/make.conf</path> 79Make sure to turn on the following USE variables in <path>/etc/make.conf</path>
94before compiling the packages: <c>USE="mysql pam-mysql imap libwww maildir 80before compiling the packages: <c>USE="mysql imap libwww maildir
95sasl ssl"</c>. Otherwise you will most likely have to recompile things to 81sasl ssl"</c>. Otherwise you will most likely have to recompile things to
96get the support you need for all the protocols. Further, it's a good idea to 82get the support you need for all the protocols. Further, it's a good idea to
97turn off any other mail and network variables, like ipv6. 83turn off any other mail and network variables, like ipv6.
98</p> 84</p>
99
100<impo>
101This howto was written for postfix-2.0.x. If you are using postfix &lt; 2 some
102of the variables in this document will be different. It is recommended that you
103upgrade. Some other packages included in this howto are version sensitive as
104well. You are advised to read the documentation included with packages if you
105run into issues with this.
106</impo>
107
108<impo>
109This document uses apache-1.3.x. Apache-2 has been marked stable in portage.
110However there are still a number of issues with php integration. Until php
111support in apache-2.0.x is marked stable, this guide will continue to use the
1121.3.x version.
113</impo>
114 85
115<impo> 86<impo>
116You need a domain name to run a public mail server, or at least an MX record 87You need a domain name to run a public mail server, or at least an MX record
117for a domain. Ideally you would have control of at least two domains to take 88for a domain. Ideally you would have control of at least two domains to take
118advantage of your new virtual domain functionality. 89advantage of your new virtual domain functionality.
119</impo> 90</impo>
120 91
121<impo> 92<impo>
122Make sure <path>/etc/hostname</path> is set to the right hostname for your mail 93Make sure <path>/etc/conf.d/hostname</path> is set to the right hostname for
123server. Verify your hostname is set correctly with <c>hostname</c>. Also 94your mail server. You can apply any changes you make to this file by running
124verify that there are no conflicting entries in <path>/etc/hosts</path>. 95<c>/etc/init.d/hostname restart</c>. Verify your hostname is set correctly with
96<c>hostname</c>. Also verify that there are no conflicting entries in
97<path>/etc/hosts</path>.
125</impo> 98</impo>
126 99
127<note> 100<note>
128It is recommended that you read this entire document and familiarize yourself 101It is recommended that you read this entire document and familiarize yourself
129with all the steps before attempting the install. If you run into problems with 102with all the steps before attempting the install. If you run into problems with
146# <i>emerge postfix</i> 119# <i>emerge postfix</i>
147</pre> 120</pre>
148 121
149<warn> 122<warn>
150Verify that you have not installed any other MTA, such as ssmtp, exim, or 123Verify that you have not installed any other MTA, such as ssmtp, exim, or
151qmail, or you will surely have BIG problems. 124netqmail, or you will surely have BIG problems.
152</warn> 125</warn>
153 126
154<p> 127<p>
155After postfix is installed, it's time to configure it. Change the following 128After postfix is installed, it's time to configure it. Change the following
156options in <path>/etc/postfix/main.cf</path>: 129options in <path>/etc/postfix/main.cf</path>. Remember to replace
130<c>$variables</c> with your own names.
157</p> 131</p>
158 132
159<pre caption="/etc/postfix/main.cf"> 133<pre caption="/etc/postfix/main.cf">
160myhostname = $host.domain.name 134myhostname = $host.domain.name
161mydomain = $domain.name 135mydomain = $domain.name
188 162
189<pre caption="Starting postfix for the first time"> 163<pre caption="Starting postfix for the first time">
190# <i>/usr/bin/newaliases</i> 164# <i>/usr/bin/newaliases</i>
191<comment>(This will install the new aliases. You only need to do this 165<comment>(This will install the new aliases. You only need to do this
192when you update or install aliases.)</comment> 166when you update or install aliases.)</comment>
193 167
194# <i>/etc/init.d/postfix start</i> 168# <i>/etc/init.d/postfix start</i>
195</pre> 169</pre>
196 170
197<p> 171<p>
198Now that postfix is running, fire up your favorite console mail client and send 172Now that postfix is running, fire up your favorite console mail client and send
213<chapter> 187<chapter>
214<title>Courier-imap</title> 188<title>Courier-imap</title>
215<section> 189<section>
216<body> 190<body>
217 191
218<pre caption="Install courier-imap"> 192<pre caption="Install courier-imap and courier-authlib">
219# <i>emerge courier-imap</i> 193# <i>emerge courier-imap courier-authlib</i>
220</pre> 194</pre>
221 195
222<pre caption="Courier-imap configuration"> 196<pre caption="Courier-imap configuration">
223# <i>cd /etc/courier-imap</i> 197# <i>cd /etc/courier-imap</i>
224<comment>(If you want to use the ssl capabilities of courier-imap or pop3, 198<comment>(If you want to use the ssl capabilities of courier-imap or pop3,
240# <i>/etc/init.d/courier-pop3d-ssl start</i> 214# <i>/etc/init.d/courier-pop3d-ssl start</i>
241</pre> 215</pre>
242 216
243<p> 217<p>
244Start up your favorite mail client and verify that all connections you've 218Start up your favorite mail client and verify that all connections you've
245started work for receiving and sending mail. Now that the basics work, we're 219started work for receiving and sending mail. Of course, you won't be able to log
246going to do a whole bunch of stuff at once to get the rest of the system 220on to any of the services because authentication hasn't been configured yet, but
247running. Again, please verify that what we've installed already works before 221it is wise to check if the connections themselves work or not.
248progressing. 222</p>
223
224<p>
225Now that the basics work, we're going to do a whole bunch of stuff at once to
226get the rest of the system running. Again, please verify that what we've
227installed already works before progressing.
249</p> 228</p>
250 229
251</body> 230</body>
252</section> 231</section>
253</chapter> 232</chapter>
257<section> 236<section>
258<body> 237<body>
259 238
260<p> 239<p>
261Next we're going to install cyrus-sasl. Sasl is going to play the role of 240Next we're going to install cyrus-sasl. Sasl is going to play the role of
262actually passing your auth variables to pam, which will in turn pass that 241actually passing your auth variables to courier-auth, which will in turn pass
263information to mysql for authentication of smtp users. For this howto, we'll 242that information to mysql for authentication of smtp users. For this howto,
264not even try to verify that sasl is working until mysql is set up and contains 243we'll not even try to verify that sasl is working until mysql is set up and
265a test user. Which is fine since we'll be authenticating against mysql in the 244contains a test user. Which is fine since we'll be authenticating against
266end anyway. 245mysql in the end anyway.
267</p> 246</p>
268
269<note>
270Now for some reason, sasl will not play nicely with pam against the shadow
271file. I banged my head against this problem for, well, a long time. If anyone
272knows why sasl will not auth against the shadow file in its current gentoo
273incarnation, please <mail link="ken@kickasskungfu.com">email me</mail> as I'd
274love to hear a solution to this.
275</note>
276 247
277<pre caption="Configuring and installing the cyrus-sasl ebuild"> 248<pre caption="Configuring and installing the cyrus-sasl ebuild">
278<comment>(We don't have ldap and we're using sasl's mysql capabilities
279 so we need to set the appropriate USE flags, but only if your USE flags
280 doesn't already contain the mysql USE flag and not the ldap one)</comment>
281# <i>mkdir /etc/portage</i>
282# <i>echo "dev-libs/cyrus-sasl -ldap mysql" &gt;&gt; /etc/portage/package.use</i>
283# <i>emerge cyrus-sasl</i> 249# <i>emerge cyrus-sasl</i>
284</pre> 250</pre>
285 251
286<p> 252<p>
287Next, edit <path>/etc/sasl2/smtpd.conf</path>. 253Next, edit <path>/etc/sasl2/smtpd.conf</path>.
288</p> 254</p>
289 255
290<pre caption="Starting sasl"> 256<pre caption="Starting sasl">
291# <i>nano -w /etc/sasl2/smtpd.conf</i> 257# <i>nano -w /etc/sasl2/smtpd.conf</i>
292pwcheck_method: auxprop 258mech_list: PLAIN LOGIN
293auxprop_plugin: sql
294sql_engine: mysql
295sql_hostnames: localhost
296sql_user: mailsql
297sql_passwd: <comment>&lt;password&gt;</comment>
298sql_database: mailsql
299sql_select: select clear from users where email = '%u@%r'
300mech_list: plain login
301pwcheck_method: saslauthd 259pwcheck_method: saslauthd
302mech_list: LOGIN PLAIN 260# <i>nano -w /etc/conf.d/saslauthd</i>
303<comment>(It's important to turn off auth methods we are not using. 261SASLAUTHD_OPTS="${SASLAUTH_MECH} -a rimap -r"
304They cause problems for some mail clients.)</comment> 262SASLAUTHD_OPTS="${SASLAUTHD_OPTS} -O localhost"
305# <i>/etc/init.d/saslauthd start</i> 263# <i>/etc/init.d/saslauthd start</i>
306</pre> 264</pre>
307 265
308</body> 266</body>
309</section> 267</section>
331emailAddress_default. 289emailAddress_default.
332 290
333<comment>(If the variables are not already present, just add them in a sensible place.)</comment> 291<comment>(If the variables are not already present, just add them in a sensible place.)</comment>
334 292
335# <i>cd misc</i> 293# <i>cd misc</i>
336# <i>nano -w CA.pl</i> 294# <i>./CA.pl -newreq-nodes</i>
337<comment>(We need to add -nodes to the # create a certificate and
338#create a certificate request code in order to let our new ssl
339certs be loaded without a password. Otherwise when you
340reboot your ssl certs will not be available.)</comment>
341
342# create a certificate
343system ("$REQ -new -nodes -x509 -keyout newreq.pem -out newreq.pem $DAYS");
344
345# create a certificate request
346system ("$REQ -new -nodes -keyout newreq.pem -out newreq.pem $DAYS");
347
348# <i>./CA.pl -newca</i> 295# <i>./CA.pl -newca</i>
349# <i>./CA.pl -newreq</i>
350# <i>./CA.pl -sign</i> 296# <i>./CA.pl -sign</i>
351# <i>cp newcert.pem /etc/postfix</i> 297# <i>cp newcert.pem /etc/postfix</i>
352# <i>cp newreq.pem /etc/postfix</i> 298# <i>cp newkey.pem /etc/postfix</i>
353# <i>cp demoCA/cacert.pem /etc/postfix</i> 299# <i>cp demoCA/cacert.pem /etc/postfix</i>
354<comment>(Now we do the same thing for apache.)</comment> 300<comment>(Now we do the same thing for apache.)</comment>
355 301
356# <i>openssl req -new > new.cert.csr</i> 302# <i>openssl req -new > new.cert.csr</i>
357# <i>openssl rsa -in privkey.pem -out new.cert.key</i> 303# <i>openssl rsa -in privkey.pem -out new.cert.key</i>
390smtpd_sasl_local_domain appends a domain name to clients using 336smtpd_sasl_local_domain appends a domain name to clients using
391smtp-auth. Make sure it's blank or your user names will get 337smtp-auth. Make sure it's blank or your user names will get
392mangled by postfix and be unable to auth.)</comment> 338mangled by postfix and be unable to auth.)</comment>
393 339
394smtpd_recipient_restrictions = 340smtpd_recipient_restrictions =
395 permit_sasl_authenticated, 341 permit_sasl_authenticated,
396 permit_mynetworks, 342 permit_mynetworks,
397 reject_unauth_destination 343 reject_unauth_destination
398
399 344
345<comment>(The next two options enable outgoing encryption.)</comment>
346smtp_use_tls = yes
347smtp_tls_note_starttls_offer = yes
400smtpd_use_tls = yes 348smtpd_use_tls = yes
401#smtpd_tls_auth_only = yes 349#smtpd_tls_auth_only = yes
402smtpd_tls_key_file = /etc/postfix/newreq.pem 350smtpd_tls_key_file = /etc/postfix/newkey.pem
403smtpd_tls_cert_file = /etc/postfix/newcert.pem 351smtpd_tls_cert_file = /etc/postfix/newcert.pem
404smtpd_tls_CAfile = /etc/postfix/cacert.pem 352smtpd_tls_CAfile = /etc/postfix/cacert.pem
405smtpd_tls_loglevel = 3 353smtpd_tls_loglevel = 3
406smtpd_tls_received_header = yes 354smtpd_tls_received_header = yes
407smtpd_tls_session_cache_timeout = 3600s 355smtpd_tls_session_cache_timeout = 3600s
413# <i>postfix reload</i> 361# <i>postfix reload</i>
414</pre> 362</pre>
415 363
416<p> 364<p>
417Now we're going to verify that the config's we added were picked up by postfix. 365Now we're going to verify that the config's we added were picked up by postfix.
366For this we are going to use <c>telnet</c> (provided by for instance
367<c>net-misc/netkit-telnetd</c>) although you can also use <c>nc</c> (provided by
368<c>net-analyzer/netcat</c>):
418</p> 369</p>
419 370
420<pre caption="Verifying sasl and tls support"> 371<pre caption="Verifying sasl and tls support">
421# <i>telnet localhost 25</i> 372# <i>telnet localhost 25</i>
422 373
450</body> 401</body>
451</section> 402</section>
452</chapter> 403</chapter>
453 404
454<chapter> 405<chapter>
406<title>The vmail user</title>
407<section>
408<body>
409
410<p>
411Before we set up our virtual mailhosting environment, we create a functional
412user under which the virtual mailboxes will be hosted. For clarity's sake we
413will call this <e>vmail</e>:
414</p>
415
416<pre caption="Adding the vmail user">
417# <i>useradd -d /home/vmail -s /bin/false -m vmail</i>
418</pre>
419
420<p>
421So now you've set up the vmail account. You can create multiple accounts if you
422want (to keep some structure in your set of virtual mail accounts). The user id,
423group id and home dirs are referenced in the MySQL tables.
424</p>
425
426<p>
427Next to the user account we also need to create the location where the mailboxes
428will reside:
429</p>
430
431<pre caption="Creating mailboxes">
432# <i>mkdir -p /home/vmail/virt-domain.com/foo</i>
433# <i>chown -R vmail:vmail /home/vmail/virt-domain.com</i>
434# <i>maildirmake /home/vmail/virt-domain.com/foo/.maildir</i>
435</pre>
436
437</body>
438</section>
439</chapter>
440
441<chapter>
455<title>MySQL</title> 442<title>MySQL</title>
456<section> 443<section>
457<body> 444<body>
458 445
459<p> 446<p>
465<pre caption="Installing and configuring MySQL"> 452<pre caption="Installing and configuring MySQL">
466# <i>emerge mysql</i> 453# <i>emerge mysql</i>
467 454
468# <i>/usr/bin/mysql_install_db</i> 455# <i>/usr/bin/mysql_install_db</i>
469<comment>(After this command runs follow the onscreen directions 456<comment>(After this command runs follow the onscreen directions
470for adding a root password with mysql, 457for adding a root password with mysql, otherwise your db will
471not mysqladmin, otherwise your db will be wide open.)</comment> 458be wide open.)</comment>
472 459
473# <i>/etc/init.d/mysql start</i> 460# <i>/etc/init.d/mysql start</i>
474# <i>mysqladmin -u root -p create mailsql</i> 461# <i>mysqladmin -u root -p create mailsql</i>
475# <i>mysql -u root -p mailsql &lt; genericmailsql.sql</i> 462# <i>mysql -u root -p mailsql &lt; genericmailsql.sql</i>
476
477# <i>mysql -u root -p mysql</i> 463# <i>mysql -u root -p mysql</i>
478mysql> <i>GRANT SELECT,INSERT,UPDATE,DELETE</i> 464mysql> <i>GRANT SELECT,INSERT,UPDATE,DELETE</i>
479 -> <i>ON mailsql.*</i> 465 -> <i>ON mailsql.*</i>
480 -> <i>TO mailsql@localhost</i> 466 -> <i>TO mailsql@localhost</i>
481 -> <i>IDENTIFIED BY '$password';</i> 467 -> <i>IDENTIFIED BY '$password';</i>
468Query OK, 0 rows affected (0.02 sec)
482 469
483 -> <i>quit</i> 470mysql> <i>FLUSH PRIVILEGES;</i>
471Query OK, 0 rows affected (0.00 sec)
472
473mysql> <i>quit</i>
484<comment>(Verify that the new mailsql user can connect to the mysql server.)</comment> 474<comment>(Verify that the new mailsql user can connect to the mysql server.)</comment>
485 475
486# <i>mysql -u mailsql -p mailsql</i> 476# <i>mysql -u mailsql -p mailsql</i>
487</pre> 477</pre>
488 478
501 <li>users - all user account information</li> 491 <li>users - all user account information</li>
502 <li>virtual - virtual domain email alias maps</li> 492 <li>virtual - virtual domain email alias maps</li>
503</ul> 493</ul>
504 494
505<pre caption="alias table sample"> 495<pre caption="alias table sample">
506id alias destination 496id alias destination
5071 root foo@bar.com 4971 root foo@bar.com
5082 postmaster foo@bar.com 4982 postmaster foo@bar.com
509</pre> 499</pre>
510 500
511<pre caption="user table sample"> 501<pre caption="user table sample">
512<comment>(Line wrapped for clarity.)</comment> 502<comment>(Line wrapped for clarity.)</comment>
513id email clear name uid gid homedir \ 503id email clear name uid gid homedir \
514 maildir quota postfix 504 maildir quota postfix
51510 foo@virt-bar.org $password realname virtid virtid /home/vmail \ 50510 foo@virt-domain.com $password realname virtid virtid /home/vmail \
516 /home/vmail/virt-bar.org/foo/.maildir/ y 506 /home/vmail/virt-domain.com/foo/.maildir/ y
51713 foo@bar.com $password realname localid localid /home/foo \ 50713 foo@bar.com $password realname localid localid /home/foo \
518 /home/foo/.maildir/ y 508 /home/foo/.maildir/ y
519</pre> 509</pre>
520 510
521<p> 511<p>
522The values of the <c>virtid</c> uid and gid should be those of the <c>vmail</c> 512The values of the <c>virtid</c> uid and gid should be those of the <c>vmail</c>
523user and group. 513user and group.
524</p> 514</p>
525 515
526<pre caption="transport table sample"> 516<pre caption="transport table sample">
527id domain destination 517id domain destination
5281 bar.com local: 5181 bar.com local:
5292 virt-bar.org virtual: 5192 virt-domain.com virtual:
530</pre> 520</pre>
531 521
532<pre caption="virtual table sample"> 522<pre caption="virtual table sample">
533id email destination 523id email destination
5343 root@virt-bar.org other@email.address 5243 root@virt-domain.com other@email.address
535</pre> 525</pre>
536 526
537</body> 527</body>
538</section> 528</section>
539</chapter> 529</chapter>
547Next we'll set up apache and add an interface to interact with the database 537Next we'll set up apache and add an interface to interact with the database
548more easily. 538more easily.
549</p> 539</p>
550 540
551<pre caption="Setting up apache and phpmyadmin"> 541<pre caption="Setting up apache and phpmyadmin">
552# <i>emerge apache mod_php phpmyadmin</i> 542# <i>emerge apache phpmyadmin</i>
553</pre> 543</pre>
554 544
555<p> 545<p>
556There are plenty of guides out there about how to set up apache with php. Like 546There are plenty of guides out there about how to set up apache with php,
557this one: <uri>http://www.linuxguruz.org/z.php?id=31</uri>. There are also 547including guides provided by the <uri link="/proj/en/php/">Gentoo PHP
548Project</uri>. There are also numerous posts on
558numerous posts on <uri>http://forums.gentoo.org</uri> detailing how to solve 549<uri>http://forums.gentoo.org</uri> detailing how to solve problems with the
559problems with the installation (search for 'apache php'). So, that said, I'm 550installation. So, that said, we're not going to cover it here. Set up the
560not going to cover it here. Set up the apache and php installs, then continue 551apache and php installs, then continue with this howto. Now, a word for the
561with this howto. Now, a word for the wise: .htaccess the directory that you put 552wise: .htaccess the directory that you put phpmyadmin in. If you do not do this,
562phpmyadmin in. If you do not do this, search engine spiders will come along and 553search engine spiders will come along and index the page which in turn will mean
563index the page which in turn will mean that anyone will be able to find your 554that anyone will be able to find your phpmyadmin page via google and in turn be
564phpmyadmin page via google and in turn be able to come change your database 555able to come change your database however they want which is <e>BAD!</e> There
565however they want which is <e>BAD!</e> There are many howtos on this 556are many howtos on this including:
566including: <uri>http://www.csoft.net/docs/micro/htaccess.html.en</uri>. 557<uri>http://www.csoft.net/docs/micro/htaccess.html.en</uri>.
567</p> 558</p>
568 559
569<p> 560<p>
570Now we're going to install the Apache certificates we made previously. The 561Now we're going to install the Apache certificates we made previously. The
571Apache-SSL directives that you need to use the resulting cert are: 562Apache-SSL directives that you need to use the resulting cert are:
575 <li>SSLCertificateFile /path/to/certs/new.cert.cert</li> 566 <li>SSLCertificateFile /path/to/certs/new.cert.cert</li>
576 <li>SSLCertificateKeyFile /path/to/certs/new.cert.key</li> 567 <li>SSLCertificateKeyFile /path/to/certs/new.cert.key</li>
577</ul> 568</ul>
578 569
579<pre caption="Install Apache SSL certificates"> 570<pre caption="Install Apache SSL certificates">
580# <i>cp /etc/ssl/misc/new.cert.cert /etc/apache/conf/ssl/</i> 571# <i>cp /etc/ssl/misc/new.cert.cert /etc/apache2/ssl/</i>
581# <i>cp /etc/ssl/misc/new.cert.key /etc/apache/conf/ssl/</i> 572# <i>cp /etc/ssl/misc/new.cert.key /etc/apache2/ssl/</i>
582# <i>nano -w /etc/apache/conf/vhosts/ssl.default-vhost.conf</i> 573# <i>cd /etc/apache2/vhosts.d</i>
574<comment>(Check if you have an ssl-vhost template already.
575 Copy that one instead of the default_vhost if that is the case)</comment>
576# <i>cp 00_default_vhost.conf ssl-vhost.conf</i>
577# <i>nano -w ssl-vhost.conf</i>
583 578
584<comment>(Change the following parameters)</comment> 579<comment>(Change the following parameters)</comment>
580NameVirtualHost host.domain.name:443
585 581
582&lt;VirtualHost host.domain.name:443&gt;
586ServerName host.domain.name 583 ServerName host.domain.name
587ServerAdmin your@email.address 584 ServerAdmin your@email.address
585
586 DocumentRoot "/var/www/localhost/htdocs/phpmyadmin";
587 &lt;Directory "/var/www/localhost/htdocs/phpmyadmin"&gt;
588 ...
589 &lt;/Directory&gt;
590
588SSLCertificateFile /etc/apache/conf/ssl/new.cert.cert 591 SSLCertificateFile /etc/apache2/ssl/new.cert.cert
589SSLCertificateKeyFile /etc/apache/conf/ssl/new.cert.key 592 SSLCertificateKeyFile /etc/apache2/ssl/new.cert.key
593 SSLEngine on
594 ...
595&lt;/VirtualHost&gt;
590 596
597# <i>nano -w /etc/conf.d/apache2</i>
598<comment>(Add -D SSL -D PHP5 to the APACHE2_OPTS)</comment>
599
591# <i>/etc/init.d/apache restart</i> 600# <i>/etc/init.d/apache2 restart</i>
592</pre> 601</pre>
593
594<note>
595If you have an existing apache install, you'll likely have to perform a full
596server reboot to install your new certificates. Check your logs to verify
597apache restarted successfully.
598</note>
599 602
600<p> 603<p>
601Next, configure phpMyAdmin. 604Next, configure phpMyAdmin.
602</p> 605</p>
603 606
604<pre caption="Configuring phpMyAdmin"> 607<pre caption="Configuring phpMyAdmin">
605# <i>nano -w /var/www/localhost/htdocs/phpmyadmin/config.inc.php</i> 608# <i>cd /var/www/localhost/htdocs/phpmyadmin</i>
609# <i>cp config.sample.inc.php config.inc.php</i>
610# <i>nano -w config.inc.php</i>
606<comment>(Change the following parameters.)</comment> 611<comment>(Change the following parameters.)</comment>
612$cfg['blowfish_secret'] = 'someverysecretpassphraze';
607 613
608$cfg['Servers'][$i]['host'] = 'localhost'; // MySQL hostname 614$cfg['Servers'][$i]['host'] = 'localhost'; // MySQL hostname
609$cfg['Servers'][$i]['controluser'] = 'mailsql'; // MySQL control user settings 615$cfg['Servers'][$i]['controluser'] = 'mailsql'; // MySQL control user settings
610 // (this user must have read-only 616 // (this user must have read-only
611$cfg['Servers'][$i]['controlpass'] = '$password'; // access to the "mysql/user" 617$cfg['Servers'][$i]['controlpass'] = '$password'; // access to the "mysql/user"
618Now enter the phpmyadmin page and browse the tables. You'll want to add in your 624Now enter the phpmyadmin page and browse the tables. You'll want to add in your
619local aliases, edit your user table to add a test user, and change your 625local aliases, edit your user table to add a test user, and change your
620transport table to add information about your domains. The default values 626transport table to add information about your domains. The default values
621supplied with the dumpfile should be a sufficient guide to what values need to 627supplied with the dumpfile should be a sufficient guide to what values need to
622go where. Make sure that if you put information in the database that it is 628go where. Make sure that if you put information in the database that it is
623accurate. For instance, make sure the local users home dir exists and that the 629accurate. For instance, make sure the local user's home dir exists and that the
624correct uid/gid values are in place. The maildirs should be created 630correct uid/gid values are in place. The maildirs should be created
625automatically by postfix when the user receives their first email. So, in 631automatically by postfix when the user receives their first email. So, in
626general, it's a good idea to send a "Welcome" mail to a new user 632general, it's a good idea to send a "Welcome" mail to a new user after you
627after you setup their account to make sure the .maildir gets created. 633setup their account to make sure the .maildir gets created.
628</p>
629
630</body>
631</section>
632</chapter>
633
634<chapter>
635<title>The vmail user</title>
636<section>
637<body>
638
639<p>
640At this point you may be wondering what user and directory to use for virtual
641mail users, and rightly so. Let's set that up.
642</p>
643
644<pre caption="Adding the vmail user">
645# <i>adduser -d /home/vmail -s /bin/false vmail</i>
646# <i>uid=`cat /etc/passwd | grep vmail | cut -f 3 -d :`</i>
647# <i>groupadd -g $uid vmail</i>
648# <i>mkdir /home/vmail</i>
649# <i>chown vmail: /home/vmail</i>
650</pre>
651
652<p>
653So now when you're setting up vmail accounts, use the vmail uid, gid, and
654homedir. When you're setting up local accounts, use that users uid, gid, and
655homedir. We've been meaning to create a php admin page for this setup but
656haven't gotten around to it yet, as phpmyadmin generally works fine for us.
657</p> 634</p>
658 635
659</body> 636</body>
660</section> 637</section>
661</chapter> 638</chapter>
670courier-imap and postfix. In all of the following examples, replace 647courier-imap and postfix. In all of the following examples, replace
671<c>$password</c> with the password you set for the mailsql mysql user. 648<c>$password</c> with the password you set for the mailsql mysql user.
672</p> 649</p>
673 650
674<pre caption="Configuring authentication"> 651<pre caption="Configuring authentication">
675# <i>emerge pam_mysql</i>
676# <i>nano -w /etc/pam.d/imap</i>
677<comment>(Comment out the existing auth lines and add the following as shown.)</comment>
678
679#auth required pam_nologin.so
680#auth required pam_stack.so service=system-auth
681#account required pam_stack.so service=system-auth
682#session required pam_stack.so service=system-auth
683
684auth optional pam_mysql.so host=localhost db=mailsql user=mailsql \
685 passwd=$password table=users usercolumn=email passwdcolumn=clear crypt=0
686account required pam_mysql.so host=localhost db=mailsql user=mailsql \
687 passwd=$password table=users usercolumn=email passwdcolumn=clear crypt=0
688
689# <i>nano -w /etc/pam.d/pop3</i>
690# <i>nano -w /etc/pam.d/smtp</i>
691<comment>(Make the same changes to the pop3 and smtp files.)</comment>
692</pre>
693
694<p>
695Next, we need to edit courier's authentication config's.
696</p>
697
698<pre caption="Configuring authentication">
699# <i>nano -w /etc/courier-imap/authdaemonrc</i> 652# <i>nano -w /etc/courier/authlib/authdaemonrc</i>
700authmodulelist="authmysql authpam" 653authmodulelist="authmysql authpam"
701 654
702# <i>nano -w /etc/courier-imap/authdaemond.conf</i>
703AUTHDAEMOND="authdaemond.mysql"
704
705# <i>nano -w /etc/courier-imap/authmysqlrc</i> 655# <i>nano -w /etc/courier/authlib/authmysqlrc</i>
706MYSQL_SERVER localhost 656MYSQL_SERVER localhost
707MYSQL_USERNAME mailsql 657MYSQL_USERNAME mailsql
708MYSQL_PASSWORD $password 658MYSQL_PASSWORD $password
709MYSQL_DATABASE mailsql 659MYSQL_DATABASE mailsql
710MYSQL_USER_TABLE users 660MYSQL_USER_TABLE users
716MYSQL_LOGIN_FIELD email 666MYSQL_LOGIN_FIELD email
717MYSQL_HOME_FIELD homedir 667MYSQL_HOME_FIELD homedir
718MYSQL_NAME_FIELD name 668MYSQL_NAME_FIELD name
719MYSQL_MAILDIR_FIELD maildir 669MYSQL_MAILDIR_FIELD maildir
720 670
721# <i>/etc/init.d/authdaemond restart</i> 671# <i>/etc/init.d/courier-authlib restart</i>
722# <i>/etc/init.d/saslauthd restart</i> 672# <i>/etc/init.d/saslauthd restart</i>
723</pre> 673</pre>
724 674
725<p> 675<p>
726We're almost there I promise! Next, set up the rest of the necessary config's 676We're almost there, I promise! Next, set up the rest of the necessary configs
727for postfix to interract with the database for all it's other transport needs. 677for postfix to interract with the database for all its other transport needs.
678Remember to replace each value with the name of your own user, user id,
679password, alias, email address, and so on.
728</p> 680</p>
729 681
730<pre caption="/etc/postfix/mysql-aliases.cf"> 682<pre caption="/etc/postfix/mysql-aliases.cf">
731# <i>nano -w /etc/postfix/mysql-aliases.cf</i> 683# <i>nano -w /etc/postfix/mysql-aliases.cf</i>
732# mysql-aliases.cf 684# mysql-aliases.cf
733 685
734user = mailsql 686user = mailsql
735password = $password 687password = $password
736dbname = mailsql 688dbname = mailsql
737table = alias 689table = alias
738select_field = destination 690select_field = destination
739where_field = alias 691where_field = alias
740hosts = unix:/var/run/mysqld/mysqld.sock 692hosts = unix:/var/run/mysqld/mysqld.sock
741</pre> 693</pre>
742 694
743<pre caption="/etc/postfix/mysql-relocated.cf"> 695<pre caption="/etc/postfix/mysql-relocated.cf">
744# <i>nano -w /etc/postfix/mysql-relocated.cf</i> 696# <i>nano -w /etc/postfix/mysql-relocated.cf</i>
745# mysql-relocated.cf 697# mysql-relocated.cf
746 698
747user = mailsql 699user = mailsql
748password = $password 700password = $password
749dbname = mailsql 701dbname = mailsql
750table = relocated 702table = relocated
751select_field = destination 703select_field = destination
752where_field = email 704where_field = email
753hosts = unix:/var/run/mysqld/mysqld.sock 705hosts = unix:/var/run/mysqld/mysqld.sock
754</pre> 706</pre>
755 707
756<pre caption="/etc/postfix/mysql-transport.cf (optional)"> 708<pre caption="/etc/postfix/mysql-transport.cf (optional)">
757# <i>nano -w /etc/postfix/mysql-transport.cf</i> 709# <i>nano -w /etc/postfix/mysql-transport.cf</i>
758# mysql-transport.cf 710# mysql-transport.cf
759 711
760user = mailsql 712user = mailsql
761password = $password 713password = $password
762dbname = mailsql 714dbname = mailsql
763table = transport 715table = transport
764select_field = destination 716select_field = destination
765where_field = domain 717where_field = domain
766hosts = unix:/var/run/mysqld/mysqld.sock 718hosts = unix:/var/run/mysqld/mysqld.sock
767</pre> 719</pre>
768 720
769<pre caption="/etc/postfix/mysql-virtual-gid.cf (optional)"> 721<pre caption="/etc/postfix/mysql-virtual-gid.cf (optional)">
770# <i>nano -w /etc/postfix/mysql-virtual-gid.cf</i> 722# <i>nano -w /etc/postfix/mysql-virtual-gid.cf</i>
771#myql-virtual-gid.cf 723# mysql-virtual-gid.cf
772 724
773user = mailsql 725user = mailsql
774password = $password 726password = $password
775dbname = mailsql 727dbname = mailsql
776table = users 728table = users
777select_field = gid 729select_field = gid
778where_field = email 730where_field = email
779additional_conditions = and postfix = 'y' 731additional_conditions = and postfix = 'y'
780hosts = unix:/var/run/mysqld/mysqld.sock 732hosts = unix:/var/run/mysqld/mysqld.sock
781</pre> 733</pre>
782 734
783<pre caption="/etc/postfix/mysql-virtual-maps.cf"> 735<pre caption="/etc/postfix/mysql-virtual-maps.cf">
784# <i>nano -w /etc/postfix/mysql-virtual-maps.cf</i> 736# <i>nano -w /etc/postfix/mysql-virtual-maps.cf</i>
785#myql-virtual-maps.cf 737# mysql-virtual-maps.cf
786 738
787user = mailsql 739user = mailsql
788password = $password 740password = $password
789dbname = mailsql 741dbname = mailsql
790table = users 742table = users
791select_field = maildir 743select_field = maildir
792where_field = email 744where_field = email
793additional_conditions = and postfix = 'y' 745additional_conditions = and postfix = 'y'
794hosts = unix:/var/run/mysqld/mysqld.sock 746hosts = unix:/var/run/mysqld/mysqld.sock
795</pre> 747</pre>
796 748
797<pre caption="/etc/postfix/mysql-virtual-uid.cf (optional)"> 749<pre caption="/etc/postfix/mysql-virtual-uid.cf (optional)">
801user = mailsql 753user = mailsql
802password = $password 754password = $password
803dbname = mailsql 755dbname = mailsql
804table = users 756table = users
805select_field = uid 757select_field = uid
806where_field = email 758where_field = email
807additional_conditions = and postfix = 'y' 759additional_conditions = and postfix = 'y'
808hosts = unix:/var/run/mysqld/mysqld.sock 760hosts = unix:/var/run/mysqld/mysqld.sock
809</pre> 761</pre>
810 762
811<pre caption="/etc/postfix/mysql-virtual.cf"> 763<pre caption="/etc/postfix/mysql-virtual.cf">
812# <i>nano -w /etc/postfix/mysql-virtual.cf</i> 764# <i>nano -w /etc/postfix/mysql-virtual.cf</i>
813# mysql-virtual.cf 765# mysql-virtual.cf
814 766
815user = mailsql 767user = mailsql
816password = $password 768password = $password
817dbname = mailsql 769dbname = mailsql
818table = virtual 770table = virtual
819select_field = destination 771select_field = destination
820where_field = email 772where_field = email
821hosts = unix:/var/run/mysqld/mysqld.sock 773hosts = unix:/var/run/mysqld/mysqld.sock
822</pre> 774</pre>
823 775
824<p> 776<p>
825Lastly, edit <path>/etc/postfix/main.cf</path> one more time. 777Lastly, edit <path>/etc/postfix/main.cf</path> one more time.
826</p> 778</p>
827 779
828<pre caption="/etc/postfix/main.cf"> 780<pre caption="/etc/postfix/main.cf">
829# <i>nano -w /etc/postfix/main.cf</i> 781# <i>nano -w /etc/postfix/main.cf</i>
782<comment>(Ensure that there are no other alias_maps definitions)</comment>
830alias_maps = mysql:/etc/postfix/mysql-aliases.cf 783alias_maps = mysql:/etc/postfix/mysql-aliases.cf
831relocated_maps = mysql:/etc/postfix/mysql-relocated.cf 784relocated_maps = mysql:/etc/postfix/mysql-relocated.cf
832 785
833local_transport = local 786local_transport = local
834local_recipient_maps = $alias_maps $virtual_mailbox_maps unix:passwd.byname 787local_recipient_maps = $alias_maps $virtual_mailbox_maps unix:passwd.byname
835 788
836virtual_transport = virtual 789virtual_transport = virtual
837virtual_mailbox_domains = 790<comment>(The domains listed by the mydestination should not be listed in
838 virt-bar.com, 791 the virtual_mailbox_domains parameter)</comment>
839 $other-virtual-domain.com 792virtual_mailbox_domains = virt-domain.com, $other-virtual-domain.com
840 793
841virtual_minimum_uid = 1000 794virtual_minimum_uid = 1000
795<comment>(Substitute $vmail-gid with the GID of the vmail group)</comment>
842virtual_gid_maps = static:$vmail-gid 796virtual_gid_maps = static:$vmail-gid
843virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-maps.cf 797virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-maps.cf
844virtual_alias_maps = mysql:/etc/postfix/mysql-virtual.cf 798virtual_alias_maps = mysql:/etc/postfix/mysql-virtual.cf
799<comment>(Substitute $vmail-uid with the UID of the vmail user)</comment>
845virtual_uid_maps = static:$vmail-uid 800virtual_uid_maps = static:$vmail-uid
846virtual_mailbox_base = / 801virtual_mailbox_base = /
847#virtual_mailbox_limit = 802#virtual_mailbox_limit =
848</pre> 803</pre>
849 804
919to require a bit of hacking. I really recommend reading all of the mailman 874to require a bit of hacking. I really recommend reading all of the mailman
920documentation, including README.POSTFIX.gz, to understand what's being done 875documentation, including README.POSTFIX.gz, to understand what's being done
921here. 876here.
922</p> 877</p>
923 878
924<p>
925One further note, current versions of mailman install to /usr/local/mailman. If
926you're like me and wish to change the default install location, it can be
927overridden in the ebuild filoe by changing the INSTALLDIR variable.
928</p>
929
930<pre caption="/usr/portage/net-mail/mailman/mailman-$ver.ebuild">
931# <i>nano -w /usr/portage/net-mail/mailman/mailman-$ver.ebuild</i>
932MAILGID="280"
933<comment>(Set MAILGID to the mailman group instead of nobody
934This is needed for postfix integration.)</comment>
935</pre>
936
937<pre caption="Install mailman"> 879<pre caption="Install mailman">
938# <i>emerge mailman</i> 880# <i>emerge mailman</i>
939<comment>(This package is currently masked as well, so you'll need to unmask it or give
940emerge an explicit path to the ebuild. Once it's installed, follow the directions
941in the README.gentoo.gz *except* do not add your aliases to /etc/mail/aliases.
942We will instead be linking the entire alias db into postfix.)</comment>
943
944# <i>zless /usr/share/doc/mailman-$ver/README.gentoo.gz</i>
945</pre> 881</pre>
946 882
947<pre caption="Setting defaults: Mailman/Defaults.py"> 883<pre caption="Setting defaults: Mailman/Defaults.py">
948# <i> nano -w /var/mailman/Mailman/Defaults.py</i> 884# <i> nano -w /usr/local/mailman/Mailman/Defaults.py</i>
949<comment>(Change the values below to reflect your primary domain, virtuals will be set next.)</comment> 885<comment>(Change the values below to reflect your primary domain, virtuals will be set next.)</comment>
950DEFAULT_EMAIL_HOST = 'domain.com' 886DEFAULT_EMAIL_HOST = 'domain.com'
951DEFAULT_URL_HOST = 'www.domain.com' 887DEFAULT_URL_HOST = 'www.domain.com'
952</pre> 888</pre>
953 889
954<pre caption="mailman config: mm_cfg.py"> 890<pre caption="mailman config: mm_cfg.py">
955# <i>nano -w /var/mailman/Mailman/mm_cfg.py</i> 891# <i>nano -w /usr/local/mailman/Mailman/mm_cfg.py</i>
956MTA = "Postfix" 892MTA = "Postfix"
957POSTFIX_STYLE_VIRTUAL_DOMAINS = ['virt-domain.com', 'virt.domain2.com'] 893POSTFIX_STYLE_VIRTUAL_DOMAINS = ['virt-domain.com', 'virt.domain2.com']
958add_virtualhost('www.virt.domain.com', 'virt.domain.com') 894add_virtualhost('www.virt.domain.com', 'virt.domain.com')
959add_virtualhost('www.virt.domain2.com', 'virt.domain2.com') 895add_virtualhost('www.virt.domain2.com', 'virt.domain2.com')
960<comment>(This is required for your virtual domains for mailman to function.)</comment> 896<comment>(This is required for your virtual domains for mailman to function.)</comment>
961</pre> 897</pre>
962 898
963<pre caption="And last but not least"> 899<pre caption="And last but not least">
964<comment>(Once that's finished, add your first list.)</comment> 900<comment>(Once that's finished, add your first list.)</comment>
965 901
966# <i>su mailman</i> 902# <i>su mailman</i>
967# <i>cd ~</i> 903# <i>cd ~</i>
968# <i>bin/newlist test</i> 904# <i>./bin/newlist --urlhost='www.virt-domain.com' --emailhost='virt-domain.com' test</i>
969Enter the email of the person running the list: <i>your@email.address</i> 905Enter the email of the person running the list: <i>your@email.address</i>
970Initial test password: 906Initial test password:
971Hit enter to continue with test owner notification... 907Hit enter to continue with test owner notification...
972<comment>(Virtual domain lists may be specified with 908<comment>(Virtual domain lists may also be specified with
973list@domain.com style list names.)</comment> 909list@domain.com style list names.)</comment>
974# <i>bin/genaliases</i> 910# <i>./bin/genaliases</i>
975<comment>(Now that your aliases have been generated, 911<comment>(Now that your aliases have been generated,
976verify that they were added successfully.)</comment> 912verify that they were added successfully.)</comment>
977 913
978# <i>nano -w data/aliases</i> 914# <i>nano -w data/aliases</i>
979# STANZA START: test 915# STANZA START: test
980# CREATED: 916# CREATED:
981test: "|/var/mailman/mail/mailman post test" 917test: "|/usr/local/mailman/mail/mailman post test"
982test-admin: "|/var/mailman/mail/mailman admin test" 918test-admin: "|/usr/local/mailman/mail/mailman admin test"
983test-bounces: "|/var/mailman/mail/mailman bounces test" 919test-bounces: "|/usr/local/mailman/mail/mailman bounces test"
984test-confirm: "|/var/mailman/mail/mailman confirm test" 920test-confirm: "|/usr/local/mailman/mail/mailman confirm test"
985test-join: "|/var/mailman/mail/mailman join test" 921test-join: "|/usr/local/mailman/mail/mailman join test"
986test-leave: "|/var/mailman/mail/mailman leave test" 922test-leave: "|/usr/local/mailman/mail/mailman leave test"
987test-owner: "|/var/mailman/mail/mailman owner test" 923test-owner: "|/usr/local/mailman/mail/mailman owner test"
988test-request: "|/var/mailman/mail/mailman request test" 924test-request: "|/usr/local/mailman/mail/mailman request test"
989test-subscribe: "|/var/mailman/mail/mailman subscribe test" 925test-subscribe: "|/usr/local/mailman/mail/mailman subscribe test"
990test-unsubscribe: "|/var/mailman/mail/mailman unsubscribe test" 926test-unsubscribe: "|/usr/local/mailman/mail/mailman unsubscribe test"
991# STANZA END: test 927# STANZA END: test
928
929<comment>(Create the required mailman list)</comment>
930# <i>./bin/newlist mailman</i>
931# <i>./bin/genaliases</i>
932
933<comment>(Return to the root user)</comment>
934# <i>exit</i>
992 935
993# <i>/etc/init.d/mailman start</i> 936# <i>/etc/init.d/mailman start</i>
994# <i>rc-update add mailman default</i> 937# <i>rc-update add mailman default</i>
995<comment>(To start mailman at once and on every reboot.)</comment> 938<comment>(To start mailman at once and on every reboot.)</comment>
996</pre> 939</pre>
1000owner_request_special = no 943owner_request_special = no
1001recipient_delimiter = + 944recipient_delimiter = +
1002<comment>(Read README.POSTFIX.gz for details on this.)</comment> 945<comment>(Read README.POSTFIX.gz for details on this.)</comment>
1003 946
1004alias_maps = 947alias_maps =
1005 hash:/var/mailman/data/aliases, 948 hash:/usr/local/mailman/data/aliases,
1006 mysql:/etc/postfix/mysql-aliases.cf 949 mysql:/etc/postfix/mysql-aliases.cf
1007 950
1008virtual_alias_maps = 951virtual_alias_maps =
1009 hash:/var/mailman/data/virtual-mailman, 952 hash:/usr/local/mailman/data/virtual-mailman,
1010 mysql:/etc/postfix/mysql-virtual.cf 953 mysql:/etc/postfix/mysql-virtual.cf
1011<comment>(This adds mailman alias file support to postfix 954<comment>(This adds mailman alias file support to postfix
1012You may of course use the mysql tables for this, 955You may of course use the mysql tables for this,
1013but I hate doing that by hand. Also, if you are not 956but I hate doing that by hand. Also, if you are not
1014using virtual domains, adding the virtual alias maps 957using virtual domains, adding the virtual alias maps
1015to postfix may cause problems, be warned.)</comment> 958to postfix may cause problems, be warned.)</comment>
1031<title>Content Filtering and Anti-Virus</title> 974<title>Content Filtering and Anti-Virus</title>
1032<section> 975<section>
1033<body> 976<body>
1034 977
1035<p> 978<p>
1036Coming soon...it would be done already but I need some perl help and testing to 979For content filtering and Anti-Virus, please consult our <uri
1037make it so. If you'd like to volunteer for that, please email me. 980link="/doc/en/mailfilter-guide.xml">mail filtering gateway guide</uri>.
1038</p> 981</p>
1039 982
1040</body> 983</body>
1041</section> 984</section>
1042</chapter> 985</chapter>
1135sure it's using the current version. Some of the components will dump their 1078sure it's using the current version. Some of the components will dump their
1136current config's to you, like postfix. 1079current config's to you, like postfix.
1137</p> 1080</p>
1138 1081
1139<pre caption="Some services can dump their current config"> 1082<pre caption="Some services can dump their current config">
1140# <i>apachectl fullstatus</i> (needs lynx installed) 1083# <i>apache2ctl fullstatus</i> (needs lynx installed)
1141# <i>apachectl configtest</i> (checks config sanity) 1084# <i>apache2ctl configtest</i> (checks config sanity)
1142# <i>postconf -n</i> (will tell you exactly what param's postfix is using) 1085# <i>postconf -n</i> (will tell you exactly what param's postfix is using)
1143# <i>/etc/init.d/$service restart</i> 1086# <i>/etc/init.d/$service restart</i>
1144</pre> 1087</pre>
1145 1088
1146</body> 1089</body>
1160 1103
1161<pre caption="Checking the logs"> 1104<pre caption="Checking the logs">
1162# <i>kill -USR1 `ps -C metalog -o pid=`</i>(to turn off metalog buffering) 1105# <i>kill -USR1 `ps -C metalog -o pid=`</i>(to turn off metalog buffering)
1163# <i>nano -w /var/log/mail/current</i> 1106# <i>nano -w /var/log/mail/current</i>
1164# <i>cat /var/log/mysql/mysql.log</i> 1107# <i>cat /var/log/mysql/mysql.log</i>
1165# <i>tail /var/log/apache/error_log</i> 1108# <i>tail /var/log/apache2/error_log</i>
1166</pre> 1109</pre>
1167 1110
1168<p> 1111<p>
1169You may also find the debug_peer parameters in main.cf helpful. Setting these 1112You may also find the debug_peer parameters in main.cf helpful. Setting these
1170will increase log output over just verbose mode. 1113will increase log output over just verbose mode.
1253 <li> 1196 <li>
1254 <uri>http://www.google.com/</uri> - If all else fails, there's always 1197 <uri>http://www.google.com/</uri> - If all else fails, there's always
1255 google, which has never failed me 1198 google, which has never failed me
1256 </li> 1199 </li>
1257 <li> 1200 <li>
1258 I also spend a lot of time on irc.freenode.net #gentoo. Irc is a great 1201 I also spend a lot of time on <uri
1259 place to go for help. 1202 link="irc://irc.gentoo.org/gentoo">#gentoo</uri>. IRC is a great place to go
1203 for help.
1260 </li> 1204 </li>
1261</ul> 1205</ul>
1262 1206
1263</body> 1207</body>
1264</section> 1208</section>

Legend:
Removed from v.1.40  
changed lines
  Added in v.1.61

  ViewVC Help
Powered by ViewVC 1.1.20