| 1 | = Lancelot Installation = |
|---|
| 2 | |
|---|
| 3 | == Abstract == |
|---|
| 4 | |
|---|
| 5 | This document explains how to install Project Lancelot on your |
|---|
| 6 | computer. |
|---|
| 7 | |
|---|
| 8 | == Getting and unpacking the distribution == |
|---|
| 9 | |
|---|
| 10 | Project Lancelot is best installed on your mail server. This is |
|---|
| 11 | because it is integrated into your mail system so that incoming |
|---|
| 12 | messages that are to do with lists managed by Project Lancelot are |
|---|
| 13 | diverted to a Project Lancelot program, which handles the posting, |
|---|
| 14 | subscribing, etc. that the messages ask for. |
|---|
| 15 | |
|---|
| 16 | First of all, you have to obtain the software, e.g., from the |
|---|
| 17 | [http://lancelot.anselms.net/download/ Project Lancelot download site]. |
|---|
| 18 | Change to a suitable directory on your system and unpack the TAR.GZ |
|---|
| 19 | archive: |
|---|
| 20 | {{{ |
|---|
| 21 | $ wget http://lancelot.anselms.net/download/lancelot-current.tar.gz |
|---|
| 22 | $ tar xvzf lancelot-current.tar.gz |
|---|
| 23 | }}} |
|---|
| 24 | This will create a directory called ''lancelot-''VERSION, which |
|---|
| 25 | contains the actual Project Lancelot code, documentation, etc. |
|---|
| 26 | |
|---|
| 27 | Project Lancelot is essentially a set of Perl modules, and can be |
|---|
| 28 | ''compiled'' like other Perl modules, using |
|---|
| 29 | {{{ |
|---|
| 30 | $ perl Makefile.PL |
|---|
| 31 | $ make test |
|---|
| 32 | }}} |
|---|
| 33 | (the tests that come with the package are scanty, though). |
|---|
| 34 | |
|---|
| 35 | You will probably have to become ''root'' to be able to install |
|---|
| 36 | Project Lancelot to wherever Perl-related stuff installed on your |
|---|
| 37 | system: |
|---|
| 38 | {{{ |
|---|
| 39 | # make install_site |
|---|
| 40 | }}} |
|---|
| 41 | This will usually put the Perl modules, executable programs, man |
|---|
| 42 | pages, etc. somewhere below ''/usr/local''. You can select an |
|---|
| 43 | alternative destination directory by using something like |
|---|
| 44 | {{{ |
|---|
| 45 | $ perl Makefile.PL PREFIX=/opt/lancelot |
|---|
| 46 | }}} |
|---|
| 47 | when creating the package Makefile. |
|---|
| 48 | |
|---|
| 49 | |
|---|
| 50 | == Mail server issues == |
|---|
| 51 | |
|---|
| 52 | Project Lancelot can work together with a wide variety of mail server |
|---|
| 53 | programs (MTAs). If you get Project Lancelot to run with a MTA not |
|---|
| 54 | listed here and have something useful to tell us (and other Project |
|---|
| 55 | Lancelot users), feel free to let us know! |
|---|
| 56 | |
|---|
| 57 | === Generic Sendmail-like === |
|---|
| 58 | |
|---|
| 59 | The easiest way to create mailing lists using Project Lancelot, on a |
|---|
| 60 | MTA that handles mail redirection the way Sendmail does (such as |
|---|
| 61 | Sendmail itself, Exim, or Postfix), is by using the /etc/aliases file |
|---|
| 62 | (called /etc/mail/aliases on some systems) to direct mail to "list |
|---|
| 63 | addresses" to the ''pl-incoming'' program. This is best done using the |
|---|
| 64 | ''address extension'' facility available in recent versions of |
|---|
| 65 | Sendmail (and the others). An alias like |
|---|
| 66 | {{{ |
|---|
| 67 | list: "|/usr/local/bin/pl-incoming list@example.com" |
|---|
| 68 | }}} |
|---|
| 69 | is used to handle mail to any address of the form |
|---|
| 70 | ''list+SOMETHING@example.com'', like ''list+subscribe@example.com'' |
|---|
| 71 | etc. Note that the address extension facility may have to be enabled |
|---|
| 72 | in your MTA, e.g., by using the '''recipient_delimiter''' parameter in |
|---|
| 73 | Postfix. |
|---|
| 74 | |
|---|
| 75 | === Postfix === |
|---|
| 76 | |
|---|
| 77 | Project Lancelot can be installed for Postfix as per the ''generic |
|---|
| 78 | Sendmail-like'' instructions above; however, there is a more |
|---|
| 79 | convenient method if you are in a position to set aside a whole |
|---|
| 80 | subdomain to your mailing lists (such as ''lists.example.com''). This |
|---|
| 81 | works as follows: |
|---|
| 82 | |
|---|
| 83 | First create a special user for your Project Lancelot lists, such as |
|---|
| 84 | ''lancelot'': |
|---|
| 85 | {{{ |
|---|
| 86 | # useradd -m lancelot |
|---|
| 87 | }}} |
|---|
| 88 | The user does not require login permission; i.e., no password must be |
|---|
| 89 | set. |
|---|
| 90 | |
|---|
| 91 | Then change ''/etc/postfix/master.cf'' to add a "transport" for |
|---|
| 92 | Project Lancelot as follows: |
|---|
| 93 | {{{ |
|---|
| 94 | lancelot unix - n n - - pipe |
|---|
| 95 | flags=DRh user=lancelot |
|---|
| 96 | argv=/usr/local/bin/pl-incoming ${user}@${nexthop} |
|---|
| 97 | }}} |
|---|
| 98 | And direct all mail to your mailing list subdomain to that transport |
|---|
| 99 | by entering |
|---|
| 100 | {{{ |
|---|
| 101 | lists.example.com lancelot: |
|---|
| 102 | }}} |
|---|
| 103 | into your "transport table" (usually in ''/etc/postfix/transport''). |
|---|
| 104 | Don't forget to do |
|---|
| 105 | {{{ |
|---|
| 106 | # postmap hash:/etc/postfix/transport |
|---|
| 107 | }}} |
|---|
| 108 | (or whatever is suitable for your system). |
|---|
| 109 | |
|---|
| 110 | You may also want to ensure that messages sent to more than one |
|---|
| 111 | list on your system are passed to individual instances of |
|---|
| 112 | ''pl-incoming'', by adding the following lines to |
|---|
| 113 | ''/etc/postfix/main.cf'': |
|---|
| 114 | {{{ |
|---|
| 115 | lancelot_destination_concurrency_limit = 1 |
|---|
| 116 | lancelot_destination_recipient_limit = 1 |
|---|
| 117 | }}} |
|---|
| 118 | Also make sure that your '''recipient_delimiter''' is set to something |
|---|
| 119 | sensible such as "+" ("-" will also do but then you will not be able |
|---|
| 120 | to use "-" within mailing list names). All the addresses used by |
|---|
| 121 | Project Lancelot mailing lists will then look like |
|---|
| 122 | ''list+SOMETHING@example.com''. |
|---|
| 123 | |
|---|
| 124 | You can now add mailing lists as the ''lancelot'' user: |
|---|
| 125 | {{{ |
|---|
| 126 | # /bin/su - lancelot |
|---|
| 127 | lancelot$ pl-init test@lists.example.com admin@example.com |
|---|
| 128 | }}} |
|---|
| 129 | This requires no further per-list configuration of your mail server, |
|---|
| 130 | except that your '''mail.delimiter''' parameter should be set to match |
|---|
| 131 | your Postfix '''recipient_delimiter'''. The most convenient method of |
|---|
| 132 | ensuring this is to add something like "mail.delimiter = +" to your |
|---|
| 133 | ''/etc/lancelot/defaults.conf'' file. |
|---|
| 134 | |
|---|
| 135 | === Other MTAs === |
|---|
| 136 | |
|---|
| 137 | If you get Project Lancelot to run with another MTA such as Exim or |
|---|
| 138 | Qmail, do let us know how so we can add this information here. |
|---|
| 139 | |
|---|
| 140 | == pl-janitor and cron == |
|---|
| 141 | |
|---|
| 142 | The pl-janitor(1) program is essential for automatic bounce |
|---|
| 143 | processing. You will want to run this from cron at periodic intervals. |
|---|
| 144 | Add a cron job like |
|---|
| 145 | {{{ |
|---|
| 146 | 33 */6 * * * lancelot /usr/local/bin/pl-janitor /home/lancelot/.pl |
|---|
| 147 | }}} |
|---|
| 148 | (where ''/home/lancelot/.pl'' is the directory where the mailing lists |
|---|
| 149 | live). pl-janitor(1) picks up all mailing lists in the directories |
|---|
| 150 | passed on the command line. You may also pass the names of mailing |
|---|
| 151 | lists directly but the directory method is usually more convenient. |
|---|
| 152 | |
|---|
| 153 | You should be able to get by with one pl-janitor(1) instance per user |
|---|
| 154 | who is managing mailing lists; individual users should add a line |
|---|
| 155 | similar to the one above to their personal crontabs using the |
|---|
| 156 | crontab(1) command but omit the first ''lancelot'' which is only |
|---|
| 157 | necessary in a system-wide crontab file. See crontab(5) for details. |
|---|
| 158 | |
|---|
| 159 | One good method, if you're using the ''lancelot'' user for system-wide |
|---|
| 160 | mailing lists as suggested above, is to add a user-specific crontab |
|---|
| 161 | for ''lancelot'' by logging in as that user and executing ''crontab |
|---|
| 162 | -e''. |
|---|
| 163 | |
|---|
| 164 | The period at which pl-janitor(1) runs is related to your bounce |
|---|
| 165 | parameter settings; if you use the standard setup then running |
|---|
| 166 | pl-janitor(1) once per day would probably be quite sufficient, but |
|---|
| 167 | four times (as above) isn't wrong, either. |
|---|