Remove lfs-uefi.txt symlink
[linux_from_scratch_hints.git] / PREVIOUS_FORMAT / qmail_cyrus_imap.txt
blob3d666cb0f633283a9274a458c9f8d685664efe49
1 TITLE:          Qmail and Cyrus Imap with virtual domains
2 LFS VERSION:    Tested on LFS-4.0
3 AUTHOR:         Ivo Schaap <ivo@thecourtofeden.org>
5 SYNOPSIS:       How to install and configure a mail system that can 
6                 handle mail to multiple domains using virtual domains.
7                 
8 HINT:
10 version 1.2 (16/10/2002)
12  -  Changed LFS version from 3 to 4 
13  -  Added c-client to the list of prerequisites, there could be more deps !!
14  -  Moved Berkeley DB there as well and version updated from 3.0.1 -> 4.0.14
15  -  Moved cyrus-sasl-1.5.27  -> cyrus-sasl-2.1.9
16  -  Moved cyrus-imapd-2.0.16 -> cyrus-imapd-2.1.9
17  -  Added Transport Layer Security (TLS) support
18  -  Added Openssl 0.9.6g
19  -  Added Avmailgate 2.0.1.7
20  -  Added Nail 10.0
21  -  Added Fcron 2.0.0 
22  -  Added Procmail 3.22
23  -  Added SpamAssassin 2.43
24  -  Added Vipul's Razor v2.20 + sdk 2.20
25  -  Added F-prot Antivirus 3.12b
26  -  Added Distributed Checksum Clearinghouse 1.1.15
27  -  Added Anomy-sanitizer 1.55
28  -  Added Various comments and command improvements
30 version 1.1 (12/15/2001)
32  - Initial commit
36 TABLE OF CONTENTS
37 =================
39 1.  Sources
40 2.  Introduction
41 3.  Prerequisites
42 4.  Installation of Avmailgate
43 5.  Installation of Qmail
44 6.  Installation of Nail
45 7.  Installation of Fcron
46 8.  Installation of Procmail
47 9.  Installation of SpamAssassin
48 10. Installation of Razor-agents
49 11. Installation of Razor-agents-sdk
50 12. Installation of F-Prot Antivirus 
51 13. Installation of Distributed Checksum Clearinghouse
52 14. Installation of Anomy-sanitizer
53 15. Installation of Imap
54 16. Configuration of Qmail and Mailboxes
55 17. Configuration of Procmail
56 18. Starting up all processes
57 19. Monitoring the processes
58 20. Migrating mail from backups
59 21. Interesting readings
60 22. Legal Blurb
64 1. Sources
65 ==========
67 Berkeley DB: 
68 http://www.sleepycat.com/update/snapshot/db-4.0.14.tar.gz
70 C-client library: 
71 ftp://ftp.cac.washington.edu/imap/c-client.tar.Z
72 imap-2002.RC7
74 Openssl:
75 ftp://ftp.openssl.org/source/openssl-0.9.6g.tar.gz
77 Avmailgate:
78 http://www.hbedv.com/files/antivir/release/avlxmgt.tgz
79 avmailgate-2.0.1.7-Linux-glibc
81 The free license can be ordered here:
82 http://www.antivir.de/order/privreg/order_e.htm
84 Qmail:  
85 http://cr.yp.to/software/qmail-1.03.tar.gz
87 Nail:
88 http://omnibus.ruf.uni-freiburg.de/~gritter/archive/nail/nail-10.0.tar.gz
90 Fcron:
91 http://fcron.free.fr/fcron-2.0.0.src.tar.gz
93 Procmail:
94 http://www.procmail.org/procmail-3.22.tar.gz
96 SpamAssassin:
97 http://spamassassin.taint.org/released/Mail-SpamAssassin-2.43.tar.gz
99 Razor:
100 http://razor.sourceforge.net/download/index.html
101 razor-agents-sdk-2.03.tar.gz
102 razor-agents-2.20.tar.gz
104 F-Prot Antivirus:
105 ftp://ftp.f-prot.com/pub/f-prot_3.12b.tar.gz
107 Distributed Checksum Clearinghouse:
108 http://www.rhyolite.com/anti-spam/dcc/source/dcc-dccproc.tar.Z
109 dcc-dccproc-1.1.15
111 Anomy-sanitizer:
112 http://mailtools.anomy.net/dist/anomy-sanitizer-1.55.tar.gz
114 IMAP/SASL:
115 ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-imapd-2.1.9.tar.gz
116 ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-sasl-2.1.9.tar.gz
119 2. Introduction
120 ===============
122 First of all I wanna thank Gerard and all the others for providing
123 the platform where we do the stuff we do.
125 In this hint we setup a mail server that serve two virtual example domains
126 and have different example users per domain:
128    - linuxfromsource.org
130       - John the Ripper          john@linuxfromsource.org
131       - Susie Summer            susie@linuxfromsource.org
132       - Dirk Beekmans            dirk@linuxfromsource.org
134       
135    - linuxfrombinary.org
137       - Olaf Olsen               olaf@linuxfrombinary.org
138       - Jennifer Loopneus    jennifer@linuxfrombinary.org
139       - Pamela Andersom        pamela@linuxfrombinary.org
141 John is the local administer so he gets the mail for root, postmaster and 
142 himself. All the usernames must be unique as each user has its own box so if
143 olaf have a email account on linuxfrombinary AND linuxfromsource he must
144 be the same person because its the same mailbox. And if Olaf opens his 
145 mailbox he sees mail from both the domains. Comprende ?
147 There is also a cyrus user to administer the IMAP server daemon and the
148 mailboxes. But he got a password for both for unix and imap/sasl. 
150 A mail user do not needs a unix password set to get mail. If one of the 
151 mail users needs access on the mail server you give him a unix password
152 as well as the imap/sasl password.
156 3. Prerequisites
157 ================
159 A. The MX record
160 ----------------
162 Make sure there is an MX record in DNS to point mail for the virtual domains
163 to the host running qmail. (Mostly the DNS runs on the ISP side.)
165 This is what roughly happens:
167 Here is a mail to olaf@linuxfrombinary.org to your SMTP server. 
169 The SMPT server wants to find out who is linuxfrombinary.org. An email address
170 as well as a web site address needs to be resolved in an ip address.
171 DNS ( Domain Name Server) is used to resolve the domain in an ip address 
172 and point to a mail server that will accept connections.
173 An MX (mail exchange) record is used for that.
175 Now the mail is routed to your ip adders for your mail server on port 25.
176 Port 25 is your SMTP port that listens for mail from your domains. 
177 Your IP address can be your fixed DSL ip address or a connection on your
178 campus, or other fixed ip address connections to the internet. If you behind
179 masquerading you need to set up forwarding rules for both smtp and imap. It
180 should be possible have a dynamic ip address domain name solution on the 
181 internet from where you can host your mail server from dailup or isdn
182 connections.
185 B. Berkeley DB
186 --------------
188 UCB's database library version-4.0.14
189 Cyrus IMAP will not compile with the version of Berkeley DB 4.1.24.
190 Or maybe there is a patch for it. Let me know ;)
192 Use this to install it once your in the unpacked tarball of Berkeley DB.
194 cd build_unix/
195 ../dist/configure \
196  --prefix=/usr /
197  --enable-compat185 \
198 make docdir=/usr/doc/Berkeley-DB all install
200 chown -R 0.0  /usr/doc/Berkeley-DB 
201 chmod -R go-w /usr/doc/Berkeley-DB  
204 C.  c-client library  (Optional)
205 --------------------------------
207 I have this already installed and this is imap related. Adjust to taste
208 this is what i used. Its only a static library with some headers for
209 development. (this is the minimum requirement for IMAP in PHP.
211 cd src/osdep/unix
212 vi Makefile
214 < = Gone
215 > = New
217 31,34c31,34
218 < SSLDIR=/usr/local/ssl
219 < SSLCERTS=$(SSLDIR)/certs
220 < SSLINCLUDE=$(SSLDIR)/include
221 < SSLLIB=$(SSLDIR)/lib
223 > SSLDIR=/usr/ssl
224 > SSLCERTS=/etc/ssl/certs
225 > SSLINCLUDE=/usr/include
226 > SSLLIB=$/usr/lib
227 73,75c73,75
228 < SPOOLDIR=/usr/spool
229 < MAILSPOOL=$(SPOOLDIR)/mail
230 < NEWSSPOOL=$(SPOOLDIR)/news
232 > SPOOLDIR=/var/spool
233 > MAILSPOOL=/var/mail
234 > NEWSSPOOL=/var/news
236 cd ../../../
238 make slx &&
239 cd c-client                &&
240 cp c-client.a /usr/lib     &&
241 cp c-client.h /usr/include &&
242 cp imap4r1.h  /usr/include &&
243 cp rfc822.h   /usr/include &&
244 cp mail.h     /usr/include &&
245 cp linkage.h  /usr/include &&
246 cp env.h      /usr/include &&
247 cp env_unix.h /usr/include &&
248 cp fs.h       /usr/include &&
249 cp ftl.h      /usr/include &&
250 cp misc.h     /usr/include &&
251 cp nntp.h     /usr/include &&
252 cp nl.h       /usr/include &&
253 cp osdep.h    /usr/include &&
254 cp smtp.h     /usr/include &&
255 cp tcp.h      /usr/include &&
256 ln -s /usr/lib/c-client.a /usr/lib/libc-client.a &&
257 ln -s /usr/lib/c-client.a /usr/lib/libc-client4.a
260 D. Open Secure Socket Layer
261 ---------------------------
263 We Only need it if you plan to use imap with ssl but its also needed
264 with Openssh so you might already have it.
266 cp Configure Configure.dist
268 vi +337 Configure   # for optimization edit this file
270 And change:
271 -m486 
274 -march=i686
276 mv doc/apps/passwd.pod doc/apps/openssl-passwd.pod
277 ./Configure linux-elf \
278  --openssldir=/etc/ssl \
279  --prefix=/usr shared 
280 make MANDIR=/usr/share/man all install
281 rmdir /etc/ssl/lib
284 E. Other deps
285 -------------
287 If any one know of other imap/mail deps, mail me, i have 70+ packs already
288 installed beyond lfs-4 when i start building this server.
289 In /path/to/cyrus-imapd-2.1.9/doc/install-prereq.html you find them all.
292    
293 4.  Installation of Avmailgate
294 ==============================
296 Avmailgate offers virus protection by having a daemon listening on port 25.
297 This is the SMPT port. When mail gets thru, it uses qmail's sendmail wrapper
298 to inject the mail into the qmail queue.
300 The other option is to have qmail's smtp server started from (x)inetd and
301 listening on port xxx where avmailgate is forwarding virus checked mail to.
302 But this gives only more rules for the firewall when heres an other port open.
305 cd /usr/src/avmailgate-2.0.1.7-Linux-glibc
307 mkdir /usr/lib/AntiVir
309 cp vdf/antivir.vdf /usr/lib/AntiVir
310 cp bin/antivir     /usr/lib/AntiVir
312 chown -R daemon.daemon /usr/lib/AntiVir
314 cp etc/avmailgate.conf /etc
315 cp etc/avmailgate.acl /etc
316 cp etc/antivir.conf /etc
317 --------------------------------------------------------------------------------
318 Edit /etc/avmailgate.conf              # Here we say witch user and group 
319                                        # avgate runs under and to use the
320                                        # sendmail wrapper from qmail that 
321                                        # we install in the next section.
323 Change:
325 # User                            uucp 
326 # Group                           uucp
328 # ForwardTo /usr/lib/sendmail -oem -oi
332   User                            daemon
333   Group                           daemon
335   ForwardTo /usr/sbin/sendmail -oem -oi
336   
337 --------------------------------------------------------------------------------
338 Edit /etc/avmailgate.acl               # We do this to prevent relaying to 
339                                        # other domains than ours.
340 Change:
342 local: hbedv.com antivir.de
346 local: linuxfromsource.org linuxfrombinary.org
348 --------------------------------------------------------------------------------
350 cp bin/avgated /usr/sbin
351 cp bin/avgatefwd /usr/sbin
353 mkdir /var/spool/avmailgate 
354 chown daemon.daemon /var/spool/avmailgate 
356 chmod 700 /var/spool/avmailgate 
357 cd /var/spool/avmailgate 
358 mkdir incoming 
359 mkdir outgoing 
360 mkdir rejected 
361 chown daemon.daemon * 
362 chmod -R 700 * 
364 cp hbedv.key /usr/lib/AntiVir/avmgate.key                                                    
365 chown daemon.daemon /usr/lib/AntiVir/avmgate.key
367 cp script/antivirupdater /usr/sbin
369 In the fcron section we set the cron job for antivirupdater
371 cp init/rc.avgate /etc/rc.d/init.d/avgate
373 chmod 700 /etc/init.d/avgate
375 Adjust the Sxx and Kxx to your situation
377 cd /etc/rc.d/rc0.d &&
378 ln -s ../init.d/avgate Kxxavgate &&
379 cd ../rc3.d &&
380 ln -s ../init.d/avgate Sxxavgate &&
381 cd ../rc6.d &&
382 ln -s ../init.d/avgate Kxxavgate
386 5. Installation of Qmail
387 ========================
389 A. Create a working directory for Qmail and untar sources
390 ---------------------------------------------------------
392 mkdir /opt/qmail &&
393 mkdir /opt/qmail/alias &&
394 cd /usr/src &&
395 tar zxvpf qmail-1.03.tar.gz &&
396 cd qmail-1.03 &&
399 B. Change the program parameters. Read the documentation for other
400    modifications 
401 ------------------------------------------------------------------
403 vi conf-qmail
405 Add :
407 /opt/qmail
409 vi conf-cc
411 Add: (Use your own architecture)
413 gcc -O3 -march=i686
416 C. Create user and group ID's
417 -----------------------------
419 vi /etc/group
421 Add: (Use your own ID's if this is conflicting)
423 nofiles:x:100:
424 qmail:x:110:
426 vi /etc/passwd
428 Add: (Use your own ID's if this is conflicting)
430 alias:x:1000:100::/opt/qmail/alias:
431 qmaild:x:1001:100::/opt/qmail:
432 qmaill:x:1002:100::/opt/qmail:
433 qmailp:x:1003:100::/opt/qmail:
434 qmailq:x:1004:110::/opt/qmail:
435 qmailr:x:1005:110::/opt/qmail:
436 qmails:x:1006:110::/opt/qmail:
438 pwck && grpck 
441 D. DNS Hack to use DNS response packets larger than 512 bytes
442    Qmail 1.03 chokes on large DNS packets sometimes. 
443 -------------------------------------------------------------
445 vi +24 dns.c
447 And change:
449 static union { HEADER hdr; unsigned char buf[PACKETSZ]; } response;
453 static union { HEADER hdr; unsigned char buf[65536]; } response;
456 E. Final compilation and installation
457 -------------------------------------
459 make setup check
462 F. Create the init script.
463 --------------------------
465 cat << EOF > /etc/init.d/qmail
467 #!/bin/bash
468 # Begin $rc_base/init.d/qmail
470 # Based on sysklogd script from LFS-3.1 and earlier.
471 # Rewritten by Gerard Beekmans  - gerard@linuxfromscratch.org
473 source /etc/sysconfig/rc
474 source $rc_functions
476 test -x /opt/qmail/rc || exit 0
478 case "$1" in
479  start)
480   echo -n "Starting Qmail...  "
481   sh -cf '/opt/qmail/rc &'
482   evaluate_retval
483  ;;
485  stop)
486   echo -n "Stopping Qmail... "
487   killall -9 qmail-send
488   evaluate_retval
489  ;;
491  restart)
492   echo -n "Restarting Qmail... "
493   killall -HUP qmail-lspawn
494   killall -ALRM qmail-lspawn
495   evaluate_retval
496  ;;
498  *)
499   echo "Usage: $0 {start|stop|restart}"
500   exit 1
501   
502 esac
504 exit 0
506 # End /etc/rc.d/init.d/qmail
510 G. Set up links and permissions
511 -------------------------------
513 chmod 700 /etc/init.d/qmail
515 Adjust the Sxx and Kxx to your situation
517 cd /etc/rc.d/rc0.d &&
518 ln -s ../init.d/qmail Kxxqmail &&
519 cd ../rc3.d &&
520 ln -s ../init.d/qmail Sxxqmail &&
521 cd ../rc6.d &&
522 ln -s ../init.d/qmail Kxxqmail
524 cd /usr/sbin &&
525 ln -s /opt/qmail/bin/sendmail
528 H. Note
529 -------
531 Configuration of qmail can happen in many ways, read the documentation
532 on the different kinds of configurations. At the end of this document I
533 go into initialization and configuration of qmail.
537 6. Installation of Nail
538 ============================
540 This peace of software is used by internal processes such as 
541 fcron.
543 ./configure --prefix=/usr \
544 --with-mailspool=/var/mail \
545 --with-sendmail=/usr/sbin/sendmail &&
546 make &&
547 make install && 
548 cd /usr/bin &&
549 ln -s /usr/bin/nail mail &&
550 ln -s /usr/bin/nail mailx
554 7. Installation of fcron
555 ========================
557 Fcron is the program we use as scheduler for some virus update scripts.
558 Its a very handy program anyway so here we go.
560 A. Setting up a fcron user and group.
561 -------------------------------------
563 vi /etc/passwd
564 fcron:x:14:14::/dev/null:/bin/false
566 vi /etc/group
567 fcron:x:14:
570 B. Configure fcron
571 ------------------
573 ./configure --prefix=/usr \
574    --with-username=fcron \
575    --with-sendmail=/usr/sbin/sendmail \
576    --with-groupname=fcron 
579 C. Add Optimization for you system.
580 -----------------------------------
581 vi Makefile
583 < OPTIM         = -O2 -Wall
585 > OPTIM         = -O3 -march=i686 -Wall
588 D. Make and install fcron.
589 --------------------------
591 make &&
592 make install &&
593 cd /usr/sbin &&
594 ln -s fcron cron &&
595 cd /usr/bin &&
596 ln -s fcrontab crontab
598 E. Add init script to /etc/rc.d/init.d
599 --------------------------------------
601 cat > /etc/rc.d/init.d/fcron << "EOF"
602 #!/bin/sh
603 # Begin $rc_base/init.d/fcron
604 # Based on sysklogd script from LFS-3.1 and earlier.
605 # Rewritten by Gerard Beekmans  - gerard@linuxfromscratch.org
606 source /etc/sysconfig/rc
607 source $rc_functions
608 case "$1" in
609         start)
610                 echo "Starting fcron..."
611                 loadproc fcron
612                 ;;
613         stop)
614                 echo "Stopping fcron..."
615                 killproc fcron
616                 ;;
617         restart)
618                 $0 stop
619                 sleep 1
620                 $0 start
621                 ;; 
622         status)
623                 statusproc fcron
624                 ;;
625         *)
626                 echo "Usage: $0 {start|stop|restart|status}"
627                 exit 1
628                 ;;
629 esac
630 # End $rc_base/init.d/fcron
633 F. Set up links and permissions
634 -------------------------------
636 chmod 700 /etc/rc.d/init.d/fcron
638 Adjust the Sxx and Kxx to your situation.
640 cd /etc/rc.d/rc0.d &&
641 ln -s ../init.d/fcron Kxxfcron &&
642 cd ../rc3.d &&
643 ln -s ../init.d/fcron Sxxfcron &&
644 cd ../rc6.d &&
645 ln -s ../init.d/fcron Kxxfcron
647 use this to start fron
649 /etc/init.d/fcron start
651 So if we want to make use of the scheduler do this
653 fcrontab -e -u root
655 We add the entries we need when appropriate programs are installed.
657 Avmailgate:
659 25 0 * * * root /usr/sbin/antivirupdater -q
661 F-prot Antivirus:
663 27 4,16 * * *   /usr/f-prot/check-updates.sh -cron
667 8. Installation of Procmail.
668 ============================
670 We use procmail to filter the delivery of mail to /usr/cyrus/bin/deliver that
671 delivers the mail to the IMAP folders. It will not make use of any mail{box,dir}
672 delivery method.
674 cd /path/to/procmail-3.22/src 
675 make BASENAME=/usr install
679 9. Installation of SpamAssassin.
680 ================================
682 read:
683 http://spamassassin.taint.org/dist/INSTALL
685 There are some perl-modules that not come with the presumed perl-5.8.0 standard
686 installation in LFS 4.0 or perl-5.8.0 in general.
688 SpamAssassin Razor Cyrus and probably more depends on perl, no worries there is 
689 an easy way to update your system.
692 When you are connected to the internet commence this as root:
694 perl -MCPAN -e shell  
696 A series of questions is asked and stores this information in:
697 /usr/lib/perl5/5.8.0/CPAN/Config.pm 
699 if you get weird looping experiences say /usr/bin/wget --passive in
700 the questions asked.
702 Now type this in the CPAN shell:
704 o conf prerequisites_policy ask
707 And now for ease of administration, install these optional perl modules .
709 i /Term::ReadKey/
710 install Term::ReadKey
712 i /Term::Readline/
713 install Term::Readline
715 i /Term::Readline::GNU/
716 install Term::Readline::GNU
718 i /Term::Readline::Perl/
719 install Term::Readline::Perl
721 What follows are dependences of SpamAssassin although it doesn't need it.
723 i /HTML::Parser/
724 install HTML::Parser
726 i /Mail::Audit/
727 install Mail::Audit
729 i /Mail::Internet/
730 install Mail::Internet
732 i /Net::SMTP/
733 install Net::SMTP
735 SpamAssassin make a lot use of them if you do install them.
737 SpamAssassin:
739 i /Mail::SpamAssassin/
740 install Mail::SpamAssassin
742 quit
745 Once the modules are installed you can read all about it by doing:
747 perldoc <name>::<name> 
751 perldoc Mail::Audit
754 Oke now the local source tarball method. 
756 Untar the SpamAssassin archive and say:
758 perl Makefile.PL
759 make
760 make -s install
762 If you want to prevent spam checking from eg. user@domain.com you 
763 only have to this:
765 Edit /etc/mail/spamassassin/local.cf
767 Add:
769 whitelist_from user@domain.com
773 10. Installation of Razor-agents.
774 =================================
775 Read: 
776 http://razor.sourceforge.net/docs/install.html
778 Untar the razor-agents archive and say:
780 perl Makefile.PL
781 make
782 make -s install
786 11. Installation of Razor-agents-sdk.
787 =====================================
789 Oke Razor will work fine without them, so this is optional.
791 perl Makefile.PL
792 make
793 make -s install
797 12. Installation of F-Prot Antivirus.
798 =====================================
800 cd /usr
802 tar zxvf /path/to/fp-linux_3.12b.tar.gz
803 mv fp-linux_3.12b f-prot
805 ln -fs /usr/f-prot/f-prot.sh bin/f-prot
806 ln -fs /usr/f-prot/man8/f-prot.8 man/man8/
807 ln -fs /usr/f-prot/man8/check-updates.sh.8 man/man8/
809 chmod +x /usr/f-prot/f-prot*
810 chmod +x /usr/f-prot/check*
812 ln -fs /usr/f-prot/man8/f-prot.8 man/man8/
813 ln -fs /usr/f-prot/man8/check-updates.sh.8 man/man8/
815 For more information see this:
817 /usr/bin/f-prot -help
821 13. Installation of Distributed Checksum Clearinghouse.
822 =======================================================
824 ./configure \
825  --bindir=/usr/bin \
826  --mandir=/usr/man
827 make all install
829 Now to see if it all works do:
831 cdcc 'info'
835 14. Installation of Anomy-sanitizer.
836 ===================================
838 Anomy-sanitizer uses this perl library's, but they are already
839 installed with a standard perl install.
841 MIME::Base64 
842 MIME::QuotedPrint 
845 Untar the packet in /usr/src
847 cd /usr/src 
848 mv anomy /usr
849 chmod 750 /usr/anomy
850 mkdir /var/quarantine
852 This whole section is used from the mail.txt hint.
853 Its a good config so why not use it ?
856 cat > /usr/anomy/anomy.conf << "EOF"
857 # Configuration file for Anomy Sanitizer
860 # Do not log to STDERR:
861 feat_log_stderr = 0
863 # Don't insert log in the message itself:
864 feat_log_inline = 0
866 # Advertisement to insert in each mail header:
867 header_info = X-Sanitizer: This mail was sanitized
868 header_url = 0
869 header_rev = 0
871 # Enable filename based policy decisions:
872 feat_files = 1
874 # Protect against buffer overflows and null values:
875 feat_lengths = 1
877 # Replace MIME boundaries with our own:
878 feat_boundaries = 1
880 # Fix invalid and ambiguous MIME boundaries, if possible:
881 feat_fixmime = 1
883 # Trust signed and/or encrypted messages:
884 feat_trust_pgp = 1
885 msg_pgp_warning = WARNING: Unsanitized content follows.\n
887 # Defang shell scripts:
888 feat_scripts = 0
890 # Defang active HTML:
891 feat_html = 1
893 # Defang UUEncoded files:
894 feat_uuencoded = 0
896 # Sanitize forwarded content too:
897 feat_forwards = 1
899 # Testing? Set to 1 for testing, 0 for production:
900 feat_testing = 0
902 ## Warn user about UN scanned parts, etc.
903 feat_verbose = 1
905 # Force all parts (except text/html parts) to
906 # have file names.
907 feat_force_name = 1
909 # Disable web bugs:
910 feat_webbugs = 1
912 # Disable "score" based mail discarding:
913 score_panic = 0
914 score_bad = 0
916 msg_file_drop  = \n*****\n
917 msg_file_drop += NOTE: An attachment named %FILENAME was deleted from
918 msg_file_drop += this message because was a windows executable.
919 msg_file_drop += Contact the system administrator for more information.
922 ## File attachment name mangling rules:
925 file_name_tpl       = /var/quarantine/att-$F-$T.$$
927 # Number of rulesets we are defining:
928 file_list_rules = 2
929 file_default_policy = defang
931 # Delete probably nasty attachments:
932 file_list_1 = (?i)(winmail.dat)|
933 file_list_1 += (\.(vb[se]|exe|com|cab|dll|ocx|msi|cmd|bat|pif|lnk|hlp|ms[ip]|reg|asd))$
934 file_list_1_policy = drop
935 file_list_1_scanner = 0
937 # Allow known "safe" file types and those that can be
938 # scanned by the downstream virus scanner:
939 file_list_2 = (?i)\.(doc|dot|rtf|xls|ppt|xlw|jpg|gif|png|tiff?|txt|zip|tgz|gz)
940 file_list_2_policy = accept
941 file_list_2_scanner = 0
943 # Any attachment not listed above gets renamed.
948 13. Installation of Imap.
949 ========================
951 Do some unpacking, by now you should know ;)
953 A. Compile and install SASL
954 ---------------------------
956 ./configure --prefix=/usr --disable-krb4 \
957    --with-gnu-ld &&
958 make &&
959 make install
962 B. Create uid/gid for the cyrus admin
963 -------------------------------------
965 mkdir /usr/cyrus
967 We assume a user of "cyrus" and a group of "mail",
968 though any user and group name can be used. 
970 vi /etc/passwd
972    Add: (Use your own ID's if this is conflicting)
974 cyrus:x:90:90:Imap-Server:/usr/cyrus:/bin/bash
976 vi /etc/group
978    Add: (Use your own ID's if this is conflicting)
980 mail:x:90:daemon
982 passwd cyrus &&
984 pwck && pwconv
987 C. Find a missing header.
988 -------------------------
990 First find com_err.h and link it to /usr/include/com_err.h
991 or if you don't have it get it here:
993 http://www.ludd.luth.se/~jnilsson/cvsweb/cvsweb.cgi/src/contrib/com_err
995 locate com_err.h
997 On a LFS-4 system its located @ /usr/include/et/com_err.h
999 cd /usr/include/ &&
1000 ln -s et/com_err.h .
1003 D. Compile and install IMAP
1004 ---------------------------
1006 ./configure --prefix=/usr \
1007  --with-auth=unix \
1008  --without-krb \
1009  --with-cyrus-user=cyrus \
1010  --with-cyrus-group=mail &&
1011 make depend &&
1012 make all &&
1013 make install
1015 And install some tools
1017 cp -av tools/ /usr/cyrus &&
1018 rm -r /usr/tools/CVS &&
1019 chown -R cyrus.mail /usr/cyrus
1021 E. Configuring IMAP
1022 -------------------
1024 mkdir /var/adm
1026 The last 3 lines are only necessary if you use SSL
1027 Edit /etc/imapd.conf
1029 configdirectory: /var/imap
1030 partition-default: /var/spool/imap
1031 admins: cyrus root
1032 srvtab: /var/imap/srvtab
1033 allowanonymouslogin: no
1034 tls_ca_file: /var/imap/server.pem
1035 tls_cert_file: /var/imap/server.pem
1036 tls_key_file: /var/imap/server.pem
1039 F. Making the director's
1040 ------------------------
1042 touch /var/adm/imapd.log
1043 mkdir /var/imap /var/spool/imap /var/imap/srvtab
1044 chown cyrus /var/imap /var/spool/imap /var/imap/srvtab
1045 chgrp mail /var/imap /var/spool/imap /var/imap/srvtab
1046 chmod 750 /var/spool/imap /var/imap/srvtab
1047 chmod 755 /var/imap
1049 G. Making the imap structure
1050 ----------------------------
1052 su - cyrus
1053 tools/mkimap
1054 cd /var/imap
1055 chattr +S . user quota user/* quota/*
1056 chattr +S /var/spool/imap
1057 exit
1059 touch /var/spool/mqueue
1060 chattr +S /var/spool/mqueue
1063 H. Change Other files
1064 ---------------------
1066 Added to /etc/services although only imap/imaps is needed.
1068 imap            143/tcp     # remove old imap2 !
1069 imsp            406/tcp
1070 aca             674/tcp
1071 imaps           993/tcp
1072 pop3s           995/tcp
1073 kpop            1109/tcp
1074 sieve           2000/tcp
1075 lmtp            2003/tcp
1076 fud             4201/udp
1079 Add to: /etc/syslog.conf
1081 local6.debug -/var/log/imapd.log
1082 auth.debug -/var/log/auth.log
1084 And restart the syslog daemon:
1086 /etc/init.d/sysklogd restart
1089 I. Setting the cyrus user password for imap
1090 -------------------------------------------
1092 /usr/sbin/saslpasswd2 cyrus
1094 chown cyrus.mail /etc/sasldb2
1096 cd /usr/src/cyrus-imapd-2.1.9
1098 You can uncomment the things you don't like here
1100 cp master/conf/normal.conf /etc/cyrus.conf
1103 J. Getting SSL to work.
1104 -----------------------
1105 We already adapted the /etc/imapd.conf for SSL
1106 Its known that M$ Outlook and Netscape mail clients 
1107 can handle SSL connections.
1109 Type this:
1111 openssl req -new -x509 -nodes -out /var/imap/server.pem -keyout \
1112    /var/imap/server.pem -days 365 &&
1113 chown cyrus.mail /var/imap/server.pem
1116 K. Making the init.d script.
1117 ----------------------------
1119 cat > /etc/rc.d/init.d/imapd << "EOF"
1120 #!/bin/bash
1121 # Begin $rc_base/init.d/imapd
1123 # Based on sysklogd script from LFS-3.1 and earlier.
1124 # Rewritten by Gerard Beekmans  - gerard@linuxfromscratch.org
1126 source /etc/sysconfig/rc
1127 source $rc_functions
1129 case "$1" in
1130  start)
1131   echo "Starting the IMAP server..."
1132   /usr/cyrus/bin/master &
1133   evaluate_retval
1134   ;;
1136  stop)
1137   echo "Stopping the IMAP server..."
1138   killproc /usr/cyrus/bin/master
1139   ;;
1141  reload)
1142   echo "Reloading the IMAP server..."
1143   reloadproc /usr/cyrus/bin/master
1144   ;;
1146  restart)
1147   $0 stop
1148   sleep 1
1149   $0 start
1150   ;;
1152  status)
1153   statusproc /usr/cyrus/bin/master
1154   ;;
1156  *)
1157   echo "Usage: $0 {start|stop|reload|restart|status}"
1158   exit 1
1159   ;;
1161 esac
1163 # End $rc_base/init.d/imapd
1166 Adjust the runlevel link numbers Kxx and Sxx to taste.
1168 chmod 700 /etc/rc.d/init.d/imapd &&
1169 cd /etc/rc.d/rc0.d &&
1170 ln -s ../init.d/imapd Kxximapd &&
1171 cd ../rc3.d &&
1172 ln -s ../init.d/imapd Sxximapd &&
1173 cd ../rc6.d &&
1174 ln -s ../init.d/imapd Kxximapd
1177 /etc/init.d/imapd start
1180 Well, if it works, you supposed to see this:
1182 netstat -vat
1183 Active Internet connections (servers and established)
1184 Proto Recv-Q Send-Q Local Address           Foreign Address         State      
1185 tcp        0      0 *:imaps                 *:*                     LISTEN      
1186 tcp        0      0 *:pop3s                 *:*                     LISTEN      
1187 tcp        0      0 *:pop3                  *:*                     LISTEN      
1188 tcp        0      0 *:imap                  *:*                     LISTEN      
1189 tcp        0      0 *:sieve                 *:*                     LISTEN      
1191 You might only need imap or imaps , adjust this in /etc/cyrus.conf
1192 Comment out services that you don't want. 
1194 L. Check configuration
1195 ----------------------
1197 Now lets see what works and what not. 
1199 If you want to login with telnet to test you need to add:
1201 allowplaintext yes 
1203 to /etc/imapd.conf
1205 Now try:
1207 telnet localhost imap
1209 Test all the authentications possible and again fiddling with the
1210 /etc/imapd.conf wont hurt. Read the imapd.conf man page and just change the
1211 the config file, restart the daemon and: 
1213 tail -f /var/log/imapd.log
1214 tail -f /var/log/sys.log
1215 tail -f /var/log/auth.log
1217 Now become the cyrus admin and test the various options.
1219 su - cyrus
1221 imtest -m login -p imap localhost
1222 imtest -m OTP -p imap localhost
1223 imtest -m DIGEST-MD5 -p imap localhost
1224 imtest -m CRAM-MD5 -p imap localhost
1226 Use this to bail out !!
1227 . logout
1229 You can test STARTTLS by using imtest:
1231 imtest -t "" localhost
1234 M. Per User Imap Configuration
1235 ------------------------------
1237 This is the bare minimum to perform for each imap user you want to add.
1239 First become the cyrus administrator
1241 su - cyrus 
1243 Use the cyradm program to administor the IMAP folders for each user.
1245 cyradm --auth login localhost
1247 localhost.localnet> cm user.john
1248 localhost.localnet> cm user.john.SPAM
1249 localhost.localnet> quit
1251 Become root again
1253 exit
1255 And set the imap password for john
1257 saslpasswd2 john
1260 There are more things possible, but knowing to delete a mailbox is handy 
1261 if you new to all this.
1263 Say to the access control list of the user john mailbox that the 
1264 cyrus user may delete john's folders, this is not the default case.
1266 localhost.localnet> setaclmailbox user.john cyrus c
1268 localhost.localnet> deletemailbox user.john
1270 If you want to get into it do this:
1272 localhost.localnet> help
1275 authenticate, login, auth         authenticate to server
1276 chdir, cd                         change current directory
1277 createmailbox, create, cm         create mailbox
1278 deleteaclmailbox, deleteacl, dam  remove ACLs from mailbox
1279 deletemailbox, delete, dm         delete mailbox
1280 disconnect, disc                  disconnect from current server
1281 exit, quit                        exit cyradm
1282 help, ?                           show commands
1283 info                              display mailbox/server metadata
1284 listacl, lam, listaclmailbox      list ACLs on mailbox
1285 listmailbox, lm                   list mailboxes
1286 listquota, lq                     list quotas on specified root
1287 listquotaroot, lqr, lqm           show quota roots and quotas for mailbox
1288 reconstruct                       reconstruct mailbox (if supported
1289 renamemailbox, rename, renm       rename (and optionally relocate) mailbox
1290 server, servername, connect       show current server or connect to server
1291 setaclmailbox, sam, setacl        set ACLs on mailbox
1292 setinfo                           set server metadata
1293 setquota, sq                      set quota on mailbox or resource
1294 version, ver                      display version info of current server
1298 14. Configuration of Qmail and Mailboxes.
1299 =========================================
1301 A. First make sure all mail users have valid unix accounts.
1302 -----------------------------------------------------------
1304    Users will not require a password set. So they become 
1305    valid unix accounts without unix login. 
1306    John is an admin because root is not supposed to get mail.
1309 vi /etc/passwd
1311 john:x:501:500:John the ripper:/home/john:/bin/bash
1312 susie:x:502:500:Susie Summer:/home/susie:/bin/bash
1313 dirk:x:503:500:Dirk Beekmans:/home/dirk:/bin/bash
1314 olaf:x:504:500:Olaf Olsen:/home/olaf:/bin/bash
1315 jennifer:x:505:500:Jennifer Loopneus:/home/jennifer:/bin/bash
1316 pamela:x:506:500:Pamela Andersom:/home/pamela:/bin/bash/bash
1318 vi /etc/group
1320 mailuser:x:500:john,susie,dirk,olaf,jennifer,pamela
1322 cd /home 
1324 mkdir john susie dirk olaf jennifer pamela
1326 chown -R <user>.mailuser <userdir>/ (for all users)
1328 You repeat the above line if you finished or do it as last
1329    
1330 B. Create a master user ID and home directory for the new domain
1331 ----------------------------------------------------------------
1333 This is roughly how stuff works.
1334 Mail is coming in for a domain, lets say pamela@linuxfrombinary.org.
1335 It's first put into a drop box /home/binary/Maildir/ and then processed
1336 further via .qmail-xxx files. These files contain a user name who is supposed
1337 to get the mail. The user has a .qmail file in his or her home directory
1338 which says what to do with the incoming mail. In this case pipe it to
1339 the program /usr/bin/procmail that filters the mail and send that to the 
1340 /usr/cyrus/bin/deliver program which stores it in the IMAP boxes.
1342 cd /home
1344 mkdir source binary
1346 vi /etc/passwd
1348 source:x:507:500:Mail account for linuxfromsource.org:/home/source:/bin/bash
1349 binary:x:508:500:Mail account for linuxfrombinary.org:/home/binary:/bin/bash
1351 vi /etc/group
1353 mailuser:x:500:john,susie,dirk,olaf,jennifer,pamela,source,binary
1356 chown -R source.mailuser source/
1357 chown -R binary.mailuser binary/
1360 C. Editing the Qmail Control/Config files
1361 -----------------------------------------
1363 Editing the control files is tricky and I've spent lot's of time 
1364 fiddling around with it. Key thing to understand is that 
1365 the host and domainname have something to do with the canonicalized
1366 name that is assigned to your link with the internet.
1367 For the people that use a ppp or an adsl connection this is often
1368 something like sdf23-2.dsl.blabla.com Please don't ask me why,
1369 it works and if anyone has a good explanation mail me !!
1371 One way of finding out is with the commands that come with bind
1372 dig or nslookup you can also try to login on an other box, logout,
1373 and than run to that other box login again and read: your last login
1374 was on xxx.xxxx.xxxxx.org or do an chat session on that box. I know
1375 it isn't elegant but it works ;-)
1377 For now lets hack some qmail
1380 --------------------------------------------------------------------------------
1381 cat << EOF > /opt/qmail/rc 
1382 #!/bin/sh
1384 # Using splogger to send the log through syslog.
1385 # Using qmail-local to deliver messages to Maildir by default.
1387 exec env - PATH="/opt/qmail/bin:$PATH" \
1388    qmail-start ./Maildir/ splogger qmail &
1390 --------------------------------------------------------------------------------
1392 chmod 700 /opt/qmail/rc
1394 cd /opt/qmail/control
1396 --------------------------------------------------------------------------------
1398 Edit: me                               # This is the hostname of local server
1400 Add:
1402 <hostname> (example adsl32.net.xs4all.nl)
1404 --------------------------------------------------------------------------------
1406 Edit: virtualdomains                   # Specify virtual domains 
1408 Add:
1410 linuxfromsource.org:source
1411 linuxfrombinary.org:binary
1413 --------------------------------------------------------------------------------
1415 Edit: locals                           # Domains that should be treated as 
1416                                          locals
1418 Add:
1420 localhost                              # The local name
1421 adsl32.net.xs4all.nl                   # The canonicalized name
1422 intern.net                             # An example local domain
1424 --------------------------------------------------------------------------------
1426 Edit: defaultdomain                    # Same as 'me' minus the first part 
1428 Add:
1430 <domainname> (example net.xs4all.nl)
1432 --------------------------------------------------------------------------------
1434 Edit: smtpgreeting                     # Adjust to taste
1436 Add:
1438 Hi and welcome to this SMTP server
1440 --------------------------------------------------------------------------------
1442 Edit: rcpthosts                        # Important file to prevent relaying of
1443                                          mail by outsiders, List all machines
1444                                          and domains on the network that 
1445                                          allowed to relay mail on this server.
1447 Add:
1449 linuxfrombinary.org
1450 linuxfromsource.org
1451 otherinterndomain.org
1452 internhost1
1453 internhost2
1455 chmod 644 *
1458 Make the aliases, John is a mortal user on the system who gets
1459 administrative email eg for root and for bounced or failed messages.
1460 The first three aliases are necessary. For each user an alias is a necessity.
1461 and only needs the username
1463 cd /opt/qmail/alias
1465 echo john > .qmail-mailer-daemon
1466 echo john > .qmail-postmaster
1467 echo john > .qmail-root
1469 and further for all users:
1471 echo <user> > .qmail-<user>
1473 eg 
1475 echo john > .qmail-john
1478 D. Per user virtual domain config 
1479 --------------------------------
1481 Now we split up our users for the virtual domains. If new mail arrives it is
1482 forwarded to the user in the first part of the email address. Lets say there
1483 is mail for susie@linuxfromsource.org. The alias file .qmail-susie is used to 
1484 forward the mail to susie, '&user' means forward. The .qmail file in her home
1485 directory now determine the faith of the message.
1487 The file .qmail-default is used if all other usernames fails to have a
1488 .qmail-<user> alias for it. For example 'zuzie@linuxfromsource.org'.
1489 You can write one line that says: ./Maildir/ to .qmail-default.
1490 Now unresolved mail is sitting in the /home/virt-dom/Maildir/new directory.
1492 John is the local mail admin who loves to get the unresolved mail and therefore
1493 we say &john to '.qmail-default'. Now John determine the faith of the message.
1494 He either trash it of forward it to the appropriate recipient.
1498 cd /home/source
1499 /opt/qmail/bin/maildirmake Maildir
1500 echo '&john'       > .qmail-default
1501 echo '&john'       > .qmail-postmaster
1502 echo '&john'       > .qmail-webmaster
1503 echo '&john'       > .qmail-root
1504 echo '&john'       > .qmail-john
1505 echo '&susie'      > .qmail-susie
1506 echo '&dirk'       > .qmail-dirk
1507 chown -R source.mailuser .
1508 chmod 640 .qmail-*
1511 cd /home/binary
1512 /opt/qmail/bin/maildirmake Maildir
1513 echo '&john'       > .qmail-default
1514 echo '&john'       > .qmail-postmaster
1515 echo '&john'       > .qmail-webmaster
1516 echo '&john'       > .qmail-root
1517 echo '&olaf'       > .qmail-olaf
1518 echo '&jennifer'   > .qmail-jennifer
1519 echo '&pamela'     > .qmail-pamela
1520 chown -R binary.mailuser .
1521 chmod 640 .qmail-*
1524 And now for all users substitute <user> for the login name. Here comes the 
1525 filtering with procmail into play. 
1527 cd /home/<user>
1529 echo '| preline /usr/bin/procmail' > .qmail
1531 Now make sure the permissions are set right.
1533 chown -R <user>.mailuser <userdir>/ (for all users)
1536    
1537 16. Configuration of Procmail.
1538 ==============================
1540 Here you find a example configuration file, adjust to taste
1541 This goes to each users home directory, change the <user>
1542 with the real user name eg. john
1544 touch /var/log/procmail.log
1545 chmod 666 /var/log/procmail.log
1547 chmod 600 /home/<user>/.procmailrc
1549 cat > .procmailrc << "EOF"
1550 USER="<user>"
1551 PATH=/usr/bin:/bin:/usr/cyrus/bin:/usr/anomy/bin
1552 SHELL=/bin/bash
1553 #VERBOSE=1                             # uncomment these if you want to see
1554 #LOGABSTRACT=all                       # more what's happening in procmail.log
1555 LOGFILE="/var/log/procmail.log"
1556 SANE="deliver -a $USER -m user.$USER"
1557 SPAM="$SANE.SPAM"
1558 ANOMY=/usr/anomy
1560   #######################################################
1561   # FIRST: REMOVE THE LEADING "From " field             #
1562   # Cyrus bombs if it sees a leading "From " (not       #
1563   # to be confused with "From:"). By running sed        #
1564   # as a filter we simply remove the first line without #
1565   # any real thought.                                   #
1566   #######################################################
1569 | sed 1d
1571 # Anomy mail sanitizer
1573 :0fw
1574 | sanitizer.pl /usr/anomy/anomy.conf
1577 # Spam Assassin
1579 :0fw
1580 | spamassassin 
1583 * ^X-Spam-Status: Yes
1584 | $SPAM
1587 # Empty To: From: Subject:
1590 * !^To:
1591 | $SPAM
1594 * !^From:
1595 | $SPAM
1598 * !^Subject:
1599 | $SPAM
1602 # Porn Spam although you might wand to see those ;-)
1605 * ^Subject.*(\|<\pornography\>)
1606 | $SPAM
1608 :0 B
1609 * ^.*(\|<\pornography\>)
1610 | $SPAM
1613 # Example From spam traps although SpamAssassin should filter it.
1616 * ^FROM_advertising
1617 | $SPAM
1620 * ^From:.*(advertising|sales|offers|promotion|reply|request|theuseful)
1621 | $SPAM
1624 # Example Subject spam traps
1627 * ^Subject:.*\[ADV\]
1628 | $SPAM
1631 * ^Subject:\ ADV
1632 | $SPAM
1635 # Else
1636    
1638 | $SANE 
1642 EXITCODE=$?
1643 HOST
1649 16. Starting up all processes
1650 =============================
1652 You should know how to make the links for the different run levels.
1653 Otherwise Gerard Beekmans has a guide where this issue is addressed.
1655 /etc/init.d/sysklogd restart
1656 /etc/init.d/avgate   start
1657 /etc/init.d/qmail    start
1658 /etc/init.d/imap     start
1662 17. Monitoring the processes.
1663 =============================
1665 Oke just start mailing everyone from localhost and remote and
1666 have a terminal running with the following command:
1668 tail -f /var/log/mail.log
1670 tail -f /var/log/sys.log
1672 tail -f /var/adm/imapd.log
1673 or 
1674 tail -f /var/log/procmail.log
1676 netstat -vat
1677 Active Internet connections (servers and established)
1678 Proto Recv-Q Send-Q Local Address           Foreign Address         State      
1679 tcp        0      0 *:pop3                  *:*                     LISTEN      
1680 tcp        0      0 *:imap                  *:*                     LISTEN      
1681 tcp        0      0 *:ssh                   *:*                     LISTEN      
1682 tcp        0      0 *:smtp                  *:*                     LISTEN      
1683 Active UNIX domain sockets (servers and established)
1684 Proto RefCnt Flags       Type       State         I-Node Path
1685 unix  2      [ ACC ]     STREAM     LISTENING     16068  /var/imap/socket/lmtp
1688 If you wanna know WTF Qmail is doing:
1690 for reading the queue:
1691 /opt/qmail/bin/qmail-qread
1693 for statistics:
1694 /opt/qmail/bin/qmail-qstat
1696 for information:
1697 /opt/qmail/bin/qmail-showctl
1701 18. Migrating mail from backups.
1702 ================================
1704 Make a back up of the /var/spool/imap/user directory 
1705 and the /var/imap/mailboxes.db on your existing mail server.
1707 cd /var/spool/imap
1708 tar cvpf user-backup.tar user/
1709 mv user-backup.tar ../../imap
1711 Add to the backup /var/imap/mailboxes.db
1713 cd ../../imap
1714 tar uvpf user-backup.tar mailboxes.db
1716 gzip -9 user-backup.tar
1719 Go to the new system and unpack the user folders and mailboxes.db
1721 mv user-backup.tar.gz /var/spool/imap
1722 cd /var/spool/imap
1723 tar zxvpf user-backup.tar.gz 
1724 mv mailboxes.db ../../imap/
1726 Now that all the old mailboxes are restored, we can rebuild the mailboxes.db.
1728 su - cyrus                             # Become the cyrus user.
1730 ctl_cyrusdb -r                         # rebuild the cyrus mailboxes database
1731 reconstruct                            # reconstruct mailboxes
1733 cyradm --auth login localhost          # Use the admin console for cyrus-imap.
1734 Password:                              # Enter the imap/sasl password.
1735 localhost.localnet> lm                 # Check to see if mailboxes are restored.
1736 localhost.localnet> exit               # Leave the cyrusadm console.
1738 exit                                   # exit the cyrus user.
1740 Every user that has imap login access needs a entry in /etc/sasldb2 again
1741 So do this for every imap user on the new server.
1743 saslpasswd2 <user>
1747 If you want a hint on reading a remote imap box with fetchmail on a client,
1748 compile fetchmail and procmail and put the following in a .fetchmailrc in your
1749 home dir and do 
1751 fetchmail -v
1753 <snip>
1754 poll "linuxfromsource.org"
1755 protocol imap
1756 no envelope
1757 no dns
1758 username "john"
1759 password "xxxx"
1760 mda "/usr/bin/procmail -d john"
1761 </snip>
1765 <snip>
1766 poll mail.linuxfromsource.org port 993 
1767 protocol IMAP:
1768 user john
1769 password secret
1771 </snip>
1775 <snip>
1776 poll mail.linuxfrombinary.org with proto imap:
1777 plugin "ssh %h /usr/cyrus/bin/imtest" auth ssh;
1778 user john is john here
1779 </snip>
1782 19. Interesting readings.
1783 =========================
1785 All this information didn't come to me in a dream. It's a combination of 
1786 sources that I used. A little file that I used to log thing has grown into
1787 this hint and hopefully it's usefull for others as well. Understanding e-mail
1788 by this hint is not gonna help you enough, you have to RTFM A LOT.
1791 The Big HOWTO:
1792 http://linuxdoc.org/HOWTO/Cyrus-IMAP.html
1794 Source documentation:
1795 file://localhost/usr/src/cyrus-imapd-2.0.16/doc/index.html
1797 Article's:
1798 http://www.linuxjournal.com/article.php?sid=2313
1799 http://www.linuxworld.com/site-stories/2002/0410.ldap4.html
1800 http://www.abiglime.com/webmaster/articles/cgi/062398.htm
1801 http://www.summersault.com/chris/techno/qmail/qmail-antispam.html
1802 http://sysadmin.oreilly.com/news/imap2_1000.html
1804 Sites:
1805 http://www.openantivirus.org/projects.php
1806 http://docsrv.caldera.com:8457/en/volutionmsg_ag/msgag.mailadmin.html
1808 Google, Some ppl on #lfs, a friend enz
1810 Running Qmail - ISBN 0-672-31945-4 - Richard Blum - Sams Publishing 2000
1814 20. Legal Blurb
1815 ==============
1817 The author does not feel responsible for loss or destruction of data and
1818 mail due to typos and bad language. So if you wipe out you system or get your
1819 dog killed don't come to me to cry on my shoulder. Be a man/woman and take 
1820 responsibility for your own actions. On the other hand if your are successful
1821 and want to contribute, throw a BIG bag of money to Gerard Beekmans, he deserves
1822 it. This is my contribution to LFS and improvements are welcome.