Changeset 303:6f57b7328cb8
- Timestamp:
- 08/15/11 11:23:59 (9 months ago)
- Branch:
- default
- Files:
-
- 24 modified
- 10 moved
-
MANIFEST (modified) (3 diffs)
-
bin/pl-bouncedb (moved) (moved from bin/ll-bouncedb) (2 diffs)
-
bin/pl-conf (moved) (moved from bin/ll-conf) (7 diffs)
-
bin/pl-incoming (moved) (moved from bin/ll-incoming) (3 diffs)
-
bin/pl-init (moved) (moved from bin/ll-init) (8 diffs)
-
bin/pl-janitor (moved) (moved from bin/ll-janitor) (4 diffs, 1 prop)
-
bin/pl-list (moved) (moved from bin/ll-list) (4 diffs)
-
bin/pl-subchange (moved) (moved from bin/ll-subchange) (4 diffs)
-
bin/pl-subscribe (moved) (moved from bin/ll-subscribe) (3 diffs)
-
bin/pl-unsubscribe (moved) (moved from bin/ll-unsubscribe) (3 diffs)
-
doc/FAQ.txt (modified) (5 diffs)
-
doc/INSTALL.txt (modified) (6 diffs)
-
doc/Lancelot-HOWTO.txt (modified) (9 diffs)
-
doc/cmds.txt (modified) (8 diffs)
-
doc/config.txt (modified) (4 diffs)
-
doc/remote-admin.txt (modified) (1 diff)
-
lib/Lancelot/DB.pm (modified) (8 diffs)
-
lib/Lancelot/Module/do_config.pm (modified) (1 diff)
-
lib/Lancelot/Module/post_digest.pm (modified) (1 diff)
-
lib/Lancelot/Module/prep_config.pm (modified) (1 diff)
-
lib/Lancelot/Module/process_bounce.pm (modified) (1 diff)
-
lib/Lancelot/SMTPTest.pm (modified) (2 diffs)
-
lib/Lancelot/Template.pm (modified) (2 diffs)
-
smtp-test/msg.lrr.0 (modified) (2 diffs)
-
t/00db.t (modified) (12 diffs)
-
t/01template.t (modified) (2 diffs)
-
t/02pl-scripts.t (moved) (moved from t/02ll-scripts.t) (1 diff)
-
t/20archive-store.t (modified) (13 diffs)
-
t/20list-headers.t (modified) (6 diffs)
-
t/20policy-addresses.t (modified) (7 diffs)
-
t/20policy-subscribe.t (modified) (1 diff)
-
t/25digest-plain.t (modified) (16 diffs)
-
t/30moderate.t (modified) (11 diffs)
-
t/80remote-adm.t (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
MANIFEST
r302 r303 1 1 .includepath 2 2 .project 3 bin/ll-bouncedb 4 bin/ll-conf 5 bin/ll-incoming 6 bin/ll-init 7 bin/ll-janitor 8 bin/ll-list 9 bin/ll-subchange 10 bin/ll-subscribe 11 bin/ll-unsubscribe 3 bin/pl-bouncedb 4 bin/pl-conf 5 bin/pl-incoming 6 bin/pl-init 7 bin/pl-janitor 8 bin/pl-list 9 bin/pl-subchange 10 bin/pl-subscribe 12 11 bin/pl-thread 12 bin/pl-unsubscribe 13 13 COPYING 14 14 debian/changelog … … 49 49 lib/Lancelot/Module/list_headers.pm 50 50 lib/Lancelot/Module/moderate.pm 51 lib/Lancelot/Module/mod_process.pm52 51 lib/Lancelot/Module/policy_addresses.pm 53 52 lib/Lancelot/Module/policy_mime.pm … … 76 75 t/01message.t 77 76 t/01template.t 78 t/02 ll-scripts.t77 t/02pl-scripts.t 79 78 t/20archive-store.t 80 79 t/20list-headers.t -
bin/pl-bouncedb
r233 r303 3 3 =head1 NAME 4 4 5 ll-bouncedb - dump the Project Lancelot bounce database5 pl-bouncedb - dump the Project Lancelot bounce database 6 6 7 7 =head1 SYNOPSIS 8 8 9 ll-bouncedb [-dv?] --dump [--count=BUCKETS] [--size=SECS]9 pl-bouncedb [-dv?] --dump [--count=BUCKETS] [--size=SECS] 10 10 [--threshold=THRESHOLD] [--timebase=SECS] list@domain 11 ll-bouncedb [-dv?] --parse [--address=ADDRESS] [--parser=PARSERS]11 pl-bouncedb [-dv?] --parse [--address=ADDRESS] [--parser=PARSERS] 12 12 list@domain [MESSAGE] 13 13 14 14 =head1 DESCRIPTION 15 15 16 The B< ll-bouncedb> command is useful for debugging Project Lancelot's17 bounce processing subsystem. B< ll-bouncedb --dump> dumps the content18 of the bounce database to standard output. B< ll-bouncedb --parse>16 The B<pl-bouncedb> command is useful for debugging Project Lancelot's 17 bounce processing subsystem. B<pl-bouncedb --dump> dumps the content 18 of the bounce database to standard output. B<pl-bouncedb --parse> 19 19 applies the given bounce parser(s) to a message and outputs the result 20 20 (without changing the database). The message is taken either from a … … 24 24 =head1 SEE ALSO 25 25 26 ll-incoming(1), ll-init(1), ll-subchange(1)26 pl-incoming(1), pl-init(1), pl-subchange(1) 27 27 28 28 =head1 AUTHOR -
bin/pl-conf
r261 r303 3 3 =head1 NAME 4 4 5 ll-conf - Query or modify Lancelot list configuration parameters5 pl-conf - Query or modify Lancelot list configuration parameters 6 6 7 7 =head1 SYNOPSIS 8 8 9 ll-conf [--query|-q] [--valueonly|-h] list@domain [parameter ...]10 ll-conf [--set|-s] list@domain ["parameter = value" ...]11 ll-conf [--import|-i] [--onlynew|-n] list@domain [file ...]12 ll-conf [--delete|-d] list@domain [parameter ...]13 ll-conf [--merge|-m] --into=list@domain list@domain14 ll-conf [--unmerge|-u] list@domain9 pl-conf [--query|-q] [--valueonly|-h] list@domain [parameter ...] 10 pl-conf [--set|-s] list@domain ["parameter = value" ...] 11 pl-conf [--import|-i] [--onlynew|-n] list@domain [file ...] 12 pl-conf [--delete|-d] list@domain [parameter ...] 13 pl-conf [--merge|-m] --into=list@domain list@domain 14 pl-conf [--unmerge|-u] list@domain 15 15 16 16 =head1 OVERVIEW 17 17 18 The B< ll-conf> command allows a list owner to query, change, or18 The B<pl-conf> command allows a list owner to query, change, or 19 19 delete various configuration parameters of a Lancelot list. 20 20 21 21 =head1 DESCRIPTION 22 22 23 The B< ll-conf> command can be used for four different purposes:23 The B<pl-conf> command can be used for four different purposes: 24 24 25 25 =head2 QUERYING PARAMETERS 26 26 27 With the B<--query> (or B<-q>) option, B< ll-conf> will print either27 With the B<--query> (or B<-q>) option, B<pl-conf> will print either 28 28 all of the configuration parameters (if no parameter names are given) 29 29 or the specified parameters to standard output, like … … 42 42 in a shell script. 43 43 44 The output of B< ll-conf --query> is suitable as input for45 B< ll-conf --import>, which is useful to clone, rename, or migrate Lancelot44 The output of B<pl-conf --query> is suitable as input for 45 B<pl-conf --import>, which is useful to clone, rename, or migrate Lancelot 46 46 lists. 47 47 48 48 =head2 SETTING PARAMETERS 49 49 50 With the B<--set> (or B<-s>) option, B< ll-conf> will take50 With the B<--set> (or B<-s>) option, B<pl-conf> will take 51 51 configuration parameter assignments from the command line and enter 52 52 them into the configuration database. A parameter's new value consists … … 55 55 use quotes as in 56 56 57 ll-conf --set 'mail.subjecttag = "[Test] "'57 pl-conf --set 'mail.subjecttag = "[Test] "' 58 58 59 59 (Only double quotes are allowed; to include a double quote in a … … 62 62 =head2 IMPORTING PARAMETERS WHOLESALE 63 63 64 With the B<--import> (or B<-i>) option, B< ll-conf> reads configuration64 With the B<--import> (or B<-i>) option, B<pl-conf> reads configuration 65 65 parameter assignments from files mentioned on the command line, or from 66 66 standard input. Blank lines and lines starting with the comment symbol, … … 74 74 =head2 DELETING PARAMETERS 75 75 76 With the B<--delete> (or B<-d>) option, B< ll-conf> deletes the configuration76 With the B<--delete> (or B<-d>) option, B<pl-conf> deletes the configuration 77 77 parameters listed on the command line from the database. 78 78 … … 143 143 =head1 SEE ALSO 144 144 145 ll-init(1), ll-list(1), ll-subchange(1), ll-subscribe(1), ll-unsubscribe(1)145 pl-init(1), pl-list(1), pl-subchange(1), pl-subscribe(1), pl-unsubscribe(1) 146 146 147 147 =head1 BUGS … … 255 255 $cmd ||= "/usr/bin/vi"; 256 256 257 my $file = File::Spec->join($db->get_listdir, " ll-conf.$$");257 my $file = File::Spec->join($db->get_listdir, "pl-conf.$$"); 258 258 # Hole Konfiguration nach $file 259 259 -
bin/pl-incoming
r262 r303 3 3 =head1 NAME 4 4 5 ll-incoming - process incoming messages on a Lancelot list5 pl-incoming - process incoming messages on a Lancelot list 6 6 7 7 =head1 SYNOPSIS 8 8 9 ll-incoming [-dv?] [--user=USER] list@domain9 pl-incoming [-dv?] [--user=USER] list@domain 10 10 11 11 =head1 DESCRIPTION 12 12 13 13 When a Lancelot list is installed, the local mail server must be directed 14 to forward all messages that arrive on the list address to B< ll-incoming>,15 e.g., by setting up suitable aliases. The B< ll-incoming> program parses14 to forward all messages that arrive on the list address to B<pl-incoming>, 15 e.g., by setting up suitable aliases. The B<pl-incoming> program parses 16 16 the incoming message and launches an appropriate workflow, for example 17 17 to post a message to all subscribers, or to handle a subscription or 18 18 unsubscription request. 19 19 20 B< ll-incoming> reads a message from standard input and considers its20 B<pl-incoming> reads a message from standard input and considers its 21 21 "To:" address. For a list called I<list>@I<domain>, several 22 22 possibilities exist: … … 39 39 number of successive steps to be taken with the message. 40 40 41 Normally B< ll-incoming> searches for the list's configuration within the41 Normally B<pl-incoming> searches for the list's configuration within the 42 42 home directory of the user running it. The B<--user> option specifies 43 43 a different user whose home directory is to be considered instead. Note that 44 44 the directories and files in question must be searchable/readable by the 45 user running B< ll-incoming>; the option does not arrange for any rights to45 user running B<pl-incoming>; the option does not arrange for any rights to 46 46 be available to that user that they would not otherwise have. The idea behind 47 47 this option is to be able to refer to individual users' mailing lists from … … 50 50 =head1 SEE ALSO 51 51 52 ll-conf(1), ll-init(1)52 pl-conf(1), pl-init(1) 53 53 54 54 =head1 AUTHOR -
bin/pl-init
r90 r303 3 3 =head1 NAME 4 4 5 ll-init - Initialise a Lancelot mailing list5 pl-init - Initialise a Lancelot mailing list 6 6 7 7 =head1 SYNOPSIS 8 8 9 ll-init [-v?] [--clone=otherlist] [-config=CONFIG] ...9 pl-init [-v?] [--clone=otherlist] [-config=CONFIG] ... 10 10 [--[no]mailfilter] [--our-isp] [--verbose] 11 11 list@domain owner-address … … 13 13 =head1 OVERVIEW 14 14 15 The B< ll-init> command creates a new Lancelot mailing list with no15 The B<pl-init> command creates a new Lancelot mailing list with no 16 16 subscribers and a basic (if sensible) configuration. 17 17 18 18 =head1 DESCRIPTION 19 19 20 The B< ll-init> command creates a new Lancelot mailing list with no20 The B<pl-init> command creates a new Lancelot mailing list with no 21 21 subscribers. It installs a basic configuration (which should be 22 22 sensible) and allows the list owner to change individual configuration … … 25 25 The initial configuration is derived from (1) hard-coded defaults, (2) 26 26 the content of a system-wide defaults file (if available), (3) the 27 content of the user-specific defaults file F<$HOME/. ll/defaults.conf>27 content of the user-specific defaults file F<$HOME/.pl/defaults.conf> 28 28 (if available), and (4) any configuration parameter assignments given 29 29 on the command line, in that order. Later settings override earlier … … 59 59 configuration has been cloned. There may be multiple B<--config> 60 60 options on the same command line. Configuration parameters may be 61 changed later using the B< ll-conf> command.61 changed later using the B<pl-conf> command. 62 62 63 63 USE QUOTES IF YOUR VALUES CONTAIN WHITESPACE. … … 67 67 For Our-ISP style lists, generates a F<.mailfilter> file 68 68 in the list directory which redirects the various list addresses to the 69 ll-incoming(1) program.69 pl-incoming(1) program. 70 70 71 71 =item B<--nomailfilter> … … 79 79 particular, this means that the list database will be created in 80 80 F<$HOME/domains/>I<domain>F</>I<list>F</list.db> rather than 81 F<$HOME/. ll/>I<list>F<@>I<domain>F</list.db>. Implies B<--mailfilter>.81 F<$HOME/.pl/>I<list>F<@>I<domain>F</list.db>. Implies B<--mailfilter>. 82 82 83 83 =back … … 85 85 =head1 SEE ALSO 86 86 87 ll-conf(1), ll-init(1), ll-incoming(1), ll-list(1), ll-subchange(1), ll-subscribe(1)87 pl-conf(1), pl-init(1), pl-incoming(1), pl-list(1), pl-subchange(1), pl-subscribe(1) 88 88 89 89 =head1 AUTHOR … … 159 159 160 160 if ($mfh) { 161 print $mfh qq{to "|$Bin/ ll-incoming $listaddr"\n};161 print $mfh qq{to "|$Bin/pl-incoming $listaddr"\n}; 162 162 $mfh->close; 163 163 chmod 0600, $mfname; -
bin/pl-janitor
- Property exe set to *
r300 r303 1 1 #!/usr/bin/perl -w 2 2 # 3 # ll-janitor --3 # pl-janitor -- 4 4 # 5 5 # Do periodic maintenance of Project Lancelot lists … … 11 11 =head1 NAME 12 12 13 ll-janitor -- do periodic maintenance of Project Lancelot lists13 pl-janitor -- do periodic maintenance of Project Lancelot lists 14 14 15 15 =head1 SYNOPSIS 16 16 17 ll-janitor [-dv?] list@domain|DIRECTORY ...17 pl-janitor [-dv?] list@domain|DIRECTORY ... 18 18 19 19 =head1 DESCRIPTION 20 20 21 The B< ll-janitor> program is supposed to be run by B<cron> and does21 The B<pl-janitor> program is supposed to be run by B<cron> and does 22 22 most of the work of automatic bounce processing. It checks whether a 23 23 subscribing address has had excessive bounces and blocks it from receiving … … 28 28 =head1 SEE ALSO 29 29 30 ll-bouncedb(1), ll-incoming(1)30 pl-bouncedb(1), pl-incoming(1) 31 31 32 32 =head1 AUTHOR … … 161 161 # lists immediately below them. This contains some special support for 162 162 # Our-ISP, where lists are in directories called $HOME/domains/DOMAIN/LIST; 163 # you need to use $HOME/domains/DOMAIN as an argument to ll-janitor in this163 # you need to use $HOME/domains/DOMAIN as an argument to pl-janitor in this 164 164 # case. 165 165 -
bin/pl-list
r255 r303 3 3 =head1 NAME 4 4 5 ll-list - Enumerate subscribers of a Lancelot list5 pl-list - Enumerate subscribers of a Lancelot list 6 6 7 7 =head1 SYNOPSIS 8 8 9 ll-list [-adlnrv?] [-s SEPARATOR] [--all] [--[no]digest] [--full]9 pl-list [-adlnrv?] [-s SEPARATOR] [--all] [--[no]digest] [--full] 10 10 [--[no]mail] [--name] [--[no]regular] [--separator=SEPARATOR] 11 11 [--verbose] list@domain [pattern] … … 13 13 =head1 OVERVIEW 14 14 15 The B< ll-list> command outputs a list of addresses from a Lancelot15 The B<pl-list> command outputs a list of addresses from a Lancelot 16 16 list's subscriber database. It can optionally include names and/or 17 17 subscription options, and select only those addresses matching a given … … 20 20 =head1 DESCRIPTION 21 21 22 The B< ll-list> command displays either all addresses from22 The B<pl-list> command displays either all addresses from 23 23 I<list@domain>'s subscriber database, or those matching the optional 24 she ll-style "glob" I<pattern>, which may contain "*", "?", and similar24 shepl-style "glob" I<pattern>, which may contain "*", "?", and similar 25 25 wild cards. 26 26 … … 111 111 =head1 SEE ALSO 112 112 113 ll-conf(1), ll-init(1), ll-subchange(1), ll-subscribe(1), ll-unsubscribe(1)113 pl-conf(1), pl-init(1), pl-subchange(1), pl-subscribe(1), pl-unsubscribe(1) 114 114 115 115 =head1 AUTHOR -
bin/pl-subchange
r167 r303 3 3 =head1 NAME 4 4 5 ll-subchange - Change subscriber database for a Lancelot list5 pl-subchange - Change subscriber database for a Lancelot list 6 6 7 7 =head1 SYNOPSIS 8 8 9 ll-subchange [-dv?] [--[no]digest] [--[no]mail] [--[no]moderated]9 pl-subchange [-dv?] [--[no]digest] [--[no]mail] [--[no]moderated] 10 10 [--[no]moderator] [--[no]admin] [--noauth] [--auth=AUTH] 11 11 [--name=NAME] [--status=STATUS] [--verbose] … … 14 14 =head1 OVERVIEW 15 15 16 The B< ll-subchange> command allows a list owner to change the delivery16 The B<pl-subchange> command allows a list owner to change the delivery 17 17 options and other data of addresses in a list's subscriber database 18 18 manually. Addresses may be listed on the command line or fed to the … … 21 21 =head1 DESCRIPTION 22 22 23 The B< ll-subchange> command takes addresses from the command line or,23 The B<pl-subchange> command takes addresses from the command line or, 24 24 alternatively, standard input (if none are specified on the command 25 25 line) and changes their options as specified by the command … … 164 164 =head1 SEE ALSO 165 165 166 ll-conf(1), ll-init(1), ll-list(1), ll-subscribe(1), ll-unsubscribe(1)166 pl-conf(1), pl-init(1), pl-list(1), pl-subscribe(1), pl-unsubscribe(1) 167 167 168 168 =head1 AUTHOR -
bin/pl-subscribe
r91 r303 3 3 =head1 NAME 4 4 5 ll-subscribe - Add addresses to a Lancelot list's subscriber database5 pl-subscribe - Add addresses to a Lancelot list's subscriber database 6 6 7 7 =head1 SYNOPSIS 8 8 9 ll-subscribe [-dwv?] [--[no]digest] [--[no]mail] [--[no]moderated]9 pl-subscribe [-dwv?] [--[no]digest] [--[no]mail] [--[no]moderated] 10 10 [--[no]welcome] [--verbose] list@domain [address ...] 11 11 12 12 =head1 OVERVIEW 13 13 14 The B< ll-subscribe> command allows a list owner to add addresses to a14 The B<pl-subscribe> command allows a list owner to add addresses to a 15 15 list's subscriber database manually. Addresses may be listed on the command 16 16 line or fed to the command on its standard input. … … 18 18 =head1 DESCRIPTION 19 19 20 The B< ll-subscribe> command takes addresses from the command line or,20 The B<pl-subscribe> command takes addresses from the command line or, 21 21 alternatively, standard input (if none are specified on the command 22 22 line) and adds them to the given list's subscriber database. Various … … 113 113 =head1 SEE ALSO 114 114 115 ll-conf(1), ll-init(1), ll-list(1), ll-subchange(1), ll-unsubscribe(1)115 pl-conf(1), pl-init(1), pl-list(1), pl-subchange(1), pl-unsubscribe(1) 116 116 117 117 =head1 AUTHOR -
bin/pl-unsubscribe
r90 r303 3 3 =head1 NAME 4 4 5 ll-unsubscribe - Remove addresses from a Lancelot list's subscriber database5 pl-unsubscribe - Remove addresses from a Lancelot list's subscriber database 6 6 7 7 =head1 SYNOPSIS 8 8 9 ll-unsubscribe [-gv?] [--[no]goodbye] [--verbose] list@domain9 pl-unsubscribe [-gv?] [--[no]goodbye] [--verbose] list@domain 10 10 [address ...] 11 11 12 12 =head1 OVERVIEW 13 13 14 The B< ll-unsubscribe> command allows a list owner to remove addresses14 The B<pl-unsubscribe> command allows a list owner to remove addresses 15 15 from a list's subscriber database manually. Addresses may be listed 16 16 on the command line or fed to the command on its standard input. … … 18 18 =head1 DESCRIPTION 19 19 20 The B< ll-unsubscribe> command takes addresses from the command line or,20 The B<pl-unsubscribe> command takes addresses from the command line or, 21 21 alternatively, standard input (if none are specified on the command 22 22 line) and removes them from the given list's subscriber database. … … 49 49 =head1 SEE ALSO 50 50 51 ll-conf(1), ll-init(1), ll-list(1), ll-subchange(1), ll-subscribe(1)51 pl-conf(1), pl-init(1), pl-list(1), pl-subchange(1), pl-subscribe(1) 52 52 53 53 =head1 AUTHOR -
doc/FAQ.txt
r150 r303 41 41 existing list using 42 42 {{{ 43 $ ll-init --clone=oldlist@example.com newlist@example.com admin@example.com43 $ pl-init --clone=oldlist@example.com newlist@example.com admin@example.com 44 44 }}} 45 45 This will use the configuration settings from ''oldlist@example.com'' 46 46 except for the '''list.name''', '''list.address''', and 47 47 '''list.owneraddress''' parameters, which are set as for a new 48 list. The details are in ll-init(1). It is also possible to override48 list. The details are in pl-init(1). It is also possible to override 49 49 individual items when cloning a list, by giving them on the command 50 50 line as usual. … … 53 53 configuration items is by doing 54 54 {{{ 55 $ ll-conf -q oldlist@example.com PATTERN | ll-conf -i newlist@example.com55 $ pl-conf -q oldlist@example.com PATTERN | pl-conf -i newlist@example.com 56 56 }}} 57 57 where PATTERN is something like ''digest.*'' (to transfer all digest … … 67 67 directory, and therefore there is no problem with this in 68 68 principle. The main problem is actually getting mail for a new mailing 69 list into ll-incoming(1) without having the mail administrator edit an69 list into pl-incoming(1) without having the mail administrator edit an 70 70 aliases file (or similar). How to do this depends on the system's 71 71 MTA. … … 74 74 say ''jdoe-list@example.com'', the user ''jdoe'' simply puts a 75 75 ''.qmail-list-default'' file into their home directory that redirects 76 all mail into ll-incoming(1) (some translation of return codes may be76 all mail into pl-incoming(1) (some translation of return codes may be 77 77 necessary). 78 78 … … 86 86 probably best to use an MDA on steroids like Procmail or Mailfilter to 87 87 funnel all messages whose address extensions start with a list name to 88 the ll-incoming(1) command, e.g. (for Procmail),88 the pl-incoming(1) command, e.g. (for Procmail), 89 89 {{{ 90 90 :0 H : list.lock 91 91 ^TOjdoe+list 92 |/usr/bin/ ll-incoming list@example.com92 |/usr/bin/pl-incoming list@example.com 93 93 }}} 94 94 If you're handling mail for many different domains, a more convenient -
doc/INSTALL.txt
r129 r303 61 61 Sendmail itself, Exim, or Postfix), is by using the /etc/aliases file 62 62 (called /etc/mail/aliases on some systems) to direct mail to "list 63 addresses" to the '' ll-incoming'' program. This is best done using the63 addresses" to the ''pl-incoming'' program. This is best done using the 64 64 ''address extension'' facility available in recent versions of 65 65 Sendmail (and the others). An alias like 66 66 {{{ 67 list: "|/usr/local/bin/ ll-incoming list@example.com"67 list: "|/usr/local/bin/pl-incoming list@example.com" 68 68 }}} 69 69 is used to handle mail to any address of the form … … 94 94 lancelot unix - n n - - pipe 95 95 flags=DRh user=lancelot 96 argv=/usr/local/bin/ ll-incoming ${user}@${nexthop}96 argv=/usr/local/bin/pl-incoming ${user}@${nexthop} 97 97 }}} 98 98 And direct all mail to your mailing list subdomain to that transport … … 110 110 You may also want to ensure that messages sent to more than one 111 111 list on your system are passed to individual instances of 112 '' ll-incoming'', by adding the following lines to112 ''pl-incoming'', by adding the following lines to 113 113 ''/etc/postfix/main.cf'': 114 114 {{{ … … 125 125 {{{ 126 126 # /bin/su - lancelot 127 lancelot$ ll-init test@lists.example.com admin@example.com127 lancelot$ pl-init test@lists.example.com admin@example.com 128 128 }}} 129 129 This requires no further per-list configuration of your mail server, … … 138 138 Qmail, do let us know how so we can add this information here. 139 139 140 == ll-janitor and cron ==140 == pl-janitor and cron == 141 141 142 The ll-janitor(1) program is essential for automatic bounce142 The pl-janitor(1) program is essential for automatic bounce 143 143 processing. You will want to run this from cron at periodic intervals. 144 144 Add a cron job like 145 145 {{{ 146 33 */6 * * * lancelot /usr/local/bin/ ll-janitor /home/lancelot/.ll146 33 */6 * * * lancelot /usr/local/bin/pl-janitor /home/lancelot/.pl 147 147 }}} 148 (where ''/home/lancelot/. ll'' is the directory where the mailing lists149 live). ll-janitor(1) picks up all mailing lists in the directories148 (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 150 passed on the command line. You may also pass the names of mailing 151 151 lists directly but the directory method is usually more convenient. 152 152 153 You should be able to get by with one ll-janitor(1) instance per user153 You should be able to get by with one pl-janitor(1) instance per user 154 154 who is managing mailing lists; individual users should add a line 155 155 similar to the one above to their personal crontabs using the … … 162 162 -e''. 163 163 164 The period at which ll-janitor(1) runs is related to your bounce164 The period at which pl-janitor(1) runs is related to your bounce 165 165 parameter settings; if you use the standard setup then running 166 ll-janitor(1) once per day would probably be quite sufficient, but166 pl-janitor(1) once per day would probably be quite sufficient, but 167 167 four times (as above) isn't wrong, either. -
doc/Lancelot-HOWTO.txt
r297 r303 9 9 == Creating a list == 10 10 11 To create a Project Lancelot list, invoke the ll-init(1) command with11 To create a Project Lancelot list, invoke the pl-init(1) command with 12 12 the list address and the list owner's (your) address as its 13 13 arguments. For the purposes of this example, let's assume that the … … 15 15 E. Newman at ''alfred@example.com'': 16 16 {{{ 17 $ ll-init test@example.com alfred@example.com18 }}} 19 This will create a ''. ll'' directory inside your home directory (if it17 $ pl-init test@example.com alfred@example.com 18 }}} 19 This will create a ''.pl'' directory inside your home directory (if it 20 20 doesn't already exist) and, within that directory, a directory called 21 21 ''test@example.com'' containing a file called ''list.db''. This file … … 28 28 ''alias'' such as 29 29 {{{ 30 test: "|/usr/local/bin/ ll-incoming test@example.com"30 test: "|/usr/local/bin/pl-incoming test@example.com" 31 31 }}} 32 32 in your system's alias database (usually /etc/aliases). You will probably … … 47 47 }}} 48 48 (The password, "foobar" here, is of no consequence.) Then invoke 49 ll-init(1) as above, but giving the '''--our-isp''' command line option:50 {{{ 51 $ ll-init --our-isp test@example.com alfred@example.com49 pl-init(1) as above, but giving the '''--our-isp''' command line option: 50 {{{ 51 $ pl-init --our-isp test@example.com alfred@example.com 52 52 }}} 53 53 This will create the list configuration database in … … 59 59 $HOME/domains/DOMAIN/LOCAL/.mailfilter (here, 60 60 $HOME/domains/example.com/test/.mailfilter) containing a recipe like 61 {{{ to "|/usr/bin/ ll-incoming test@example.com" }}} The good news is61 {{{ to "|/usr/bin/pl-incoming test@example.com" }}} The good news is 62 62 that Project Lancelot does this for you unless you specify the 63 63 '''--nomailfilter''' option. … … 71 71 can set. 72 72 73 Use the ll-conf(1) to look at and change configuration parameters. You can73 Use the pl-conf(1) to look at and change configuration parameters. You can 74 74 inspect all of the configuration using 75 75 {{{ 76 $ ll-conf -q test@example.com76 $ pl-conf -q test@example.com 77 77 digests.enable = 0 78 78 digests.maxperiod = 0 … … 84 84 individual parameters from the command line, use 85 85 {{{ 86 $ ll-conf -s test@example.com "list.ownername = Alfred E. Newman"86 $ pl-conf -s test@example.com "list.ownername = Alfred E. Newman" 87 87 }}} 88 88 You can also write the whole configuration to a file and work this over 89 89 using your favourite text editor, then reimport the configuration: 90 90 {{{ 91 $ ll-conf -q test@example.com >test.conf91 $ pl-conf -q test@example.com >test.conf 92 92 $ emacs test.conf 93 $ ll-conf -i test@example.com <test.conf93 $ pl-conf -i test@example.com <test.conf 94 94 }}} 95 95 Blank lines and comment lines (starting with ''#'') are ignored when 96 96 a configuration is imported, so feel free to add comments to test.conf -- 97 you just need to force yourself not to use " ll-conf -s" to change parameters97 you just need to force yourself not to use "pl-conf -s" to change parameters 98 98 behind test.conf's back. 99 99 … … 114 114 change the subscription database manually. Here's how to add subscribers: 115 115 {{{ 116 $ ll-subscribe test@example.com joe.blow@example.org sue.foo@example.net116 $ pl-subscribe test@example.com joe.blow@example.org sue.foo@example.net 117 117 }}} 118 118 This will add Joe Blow's and Sue Foo's addresses to the subscriber 119 database. ll-subscribe(1) takes arbitrarily many (well almost)120 addresses on the command line, but if you do not give any, ll-subscribe(1)119 database. pl-subscribe(1) takes arbitrarily many (well almost) 120 addresses on the command line, but if you do not give any, pl-subscribe(1) 121 121 will read standard input instead: 122 122 {{{ 123 $ ll-subscribe test@example.com <members-list.txt124 }}} 125 Use ll-list(1) to check who's subscribing:126 {{{ 127 $ ll-list test@example.com123 $ pl-subscribe test@example.com <members-list.txt 124 }}} 125 Use pl-list(1) to check who's subscribing: 126 {{{ 127 $ pl-list test@example.com 128 128 sue.foo@example.net 129 129 joe.blow@example.org … … 133 133 not be added a second time. 134 134 135 You can remove subscribers again using the ll-unsubscribe(1) command,136 which works essentially like ll-subscribe(1):137 {{{ 138 $ ll-unsubscribe test@example.com joe.blow@example.org135 You can remove subscribers again using the pl-unsubscribe(1) command, 136 which works essentially like pl-subscribe(1): 137 {{{ 138 $ pl-unsubscribe test@example.com joe.blow@example.org 139 139 }}} 140 140 -
doc/cmds.txt
r1 r303 2 2 ====================================================== 3 3 4 ll-init(1): Mailingliste anlegen4 pl-init(1): Mailingliste anlegen 5 5 -------------------------------- 6 6 7 Syntax: ll-init [OPTIONEN] LISTE@DOMAIN EIGENTÜMER-ADRESSE7 Syntax: pl-init [OPTIONEN] LISTE@DOMAIN EIGENTÜMER-ADRESSE 8 8 9 9 Legt eine neue Liste an und richtet die Datenbank dafür ein. Die 10 Datenbank wird unter dem Namen »LISTE@DOMAIN. lldb« im10 Datenbank wird unter dem Namen »LISTE@DOMAIN.pldb« im 11 11 Heimatverzeichnis des aufrufenden Benutzers plaziert. 12 12 … … 24 24 Parameter der Konfiguration von ANDERELISTE@ANDEREDOMAIN 25 25 können mit der --config-Option modifiziert werden. 26 --mailfilter: Es wird eine Datei namens »mailfilter. ll« erzeugt, die die27 nötigen Adreßumleitungen nach ll-incoming(1) enthält.26 --mailfilter: Es wird eine Datei namens »mailfilter.pl« erzeugt, die die 27 nötigen Adreßumleitungen nach pl-incoming(1) enthält. 28 28 29 29 30 ll-conf(1): Mailinglisten-Konfigurationsparameter ändern30 pl-conf(1): Mailinglisten-Konfigurationsparameter ändern 31 31 -------------------------------------------------------- 32 32 33 Syntax: ll-conf --query LISTE@DOMAIN [PARAMETER ...]34 ll-conf --set LISTE@DOMAIN "PARAMETER = WERT" ...35 ll-conf --import LISTE@DOMAIN33 Syntax: pl-conf --query LISTE@DOMAIN [PARAMETER ...] 34 pl-conf --set LISTE@DOMAIN "PARAMETER = WERT" ... 35 pl-conf --import LISTE@DOMAIN 36 36 37 37 Mit der Option »--query« gibt dieses Programm die Werte der benannten … … 41 41 42 42 43 ll-subscribe(1): Abonnenten manuell hinzufügen43 pl-subscribe(1): Abonnenten manuell hinzufügen 44 44 ---------------------------------------------- 45 45 46 Syntax: ll-subscribe [OPTIONEN] LISTE@DOMAIN [ADRESSE ...]46 Syntax: pl-subscribe [OPTIONEN] LISTE@DOMAIN [ADRESSE ...] 47 47 48 48 Fügt die aufgezählten ADRESSEn der Abonnentenliste hinzu, sofern sie 49 49 noch nicht darin enthalten sind, und setzt ggf. Optionen. Schon 50 50 enthaltene Adressen werden nicht modifiziert. Werden keine Adressen 51 aufgezählt, liest ll-subscribe(1) Adressen von der Standardeingabe.51 aufgezählt, liest pl-subscribe(1) Adressen von der Standardeingabe. 52 52 53 53 Optionen: … … 62 62 63 63 64 ll-unsubscribe(1): Abonnenten manuell löschen64 pl-unsubscribe(1): Abonnenten manuell löschen 65 65 --------------------------------------------- 66 66 67 Syntax: ll-unsubscribe [OPTIONEN] LISTE@DOMAIN [ADRESSE ...]67 Syntax: pl-unsubscribe [OPTIONEN] LISTE@DOMAIN [ADRESSE ...] 68 68 69 69 Entfernt die aufgezählten Adressen aus der Abonnentenliste, sofern sie 70 70 darin enthalten sind. Werden keine Adressen aufgezählt, liest 71 ll-unsubscribe(1) Adressen von der Standardeingabe.71 pl-unsubscribe(1) Adressen von der Standardeingabe. 72 72 73 73 Optionen: … … 79 79 80 80 81 ll-subchange(1): Abonnenten-Optionen ändern81 pl-subchange(1): Abonnenten-Optionen ändern 82 82 ------------------------------------------- 83 83 84 Syntax: ll-subchange [OPTIONEN] LISTE@DOMAIN [ADRESSE ...]84 Syntax: pl-subchange [OPTIONEN] LISTE@DOMAIN [ADRESSE ...] 85 85 86 86 Ändert Abonnementsoptionen für die benannten Adressen (sofern sie in 87 87 der Datenbank für die Liste stehen). Werden keine Adressen aufgezählt, 88 liest ll-subchange(1) Adressen von der Standardeingabe.88 liest pl-subchange(1) Adressen von der Standardeingabe. 89 89 90 90 Optionen: … … 106 106 107 107 108 ll-list(1): Listet aktuelle Abonnenten auf108 pl-list(1): Listet aktuelle Abonnenten auf 109 109 ------------------------------------------ 110 110 111 Syntax: ll-list [OPTIONEN] LISTE@DOMAIN111 Syntax: pl-list [OPTIONEN] LISTE@DOMAIN 112 112 113 113 Gibt Adressen aus der Datenbank für LISTE@DOMAIN auf der … … 137 137 138 138 139 ll-incoming(1): Behandelt eingehende Mail139 pl-incoming(1): Behandelt eingehende Mail 140 140 ----------------------------------------- 141 141 142 Syntax: ll-incoming LISTE@DOMAIN142 Syntax: pl-incoming LISTE@DOMAIN 143 143 144 144 Bearbeitet eingehende Mail an die Listenadresse(n). Bei der Installation der 145 145 Liste muß dafür gesorgt werden, daß Mail an die folgenden Adressen nach 146 ll-incoming(1) geleitet wird:146 pl-incoming(1) geleitet wird: 147 147 148 148 LISTE@DOMAIN - Adresse für Beiträge … … 159 159 160 160 161 ll-janitor(1): Besorgt periodische Aufräumungsarbeiten161 pl-janitor(1): Besorgt periodische Aufräumungsarbeiten 162 162 ------------------------------------------------------ 163 163 164 Syntax: ll-janitor LISTE@DOMAIN164 Syntax: pl-janitor LISTE@DOMAIN 165 165 166 166 Dieses Programm wird periodisch z. B. von cron(8) aufgerufen und -
doc/config.txt
r29 r303 3 3 # This file documents all Lancelot list configuration parameters. It can 4 4 # serve as the basis for a Lancelot list configuration; just change it 5 # and read it using " ll-conf --import <config.txt".5 # and read it using "pl-conf --import <config.txt". 6 6 # 7 7 # == Ground Rules == … … 24 24 # 25 25 # In addition to these directories, Lancelot always searches the 26 # ''. ll/list@domain/templates'' and ''.ll/templates'' directories within26 # ''.pl/list@domain/templates'' and ''.pl/templates'' directories within 27 27 # the list owner's home directory. 28 28 … … 38 38 # address that is used to submit messages to the list. The local MTA must 39 39 # be suitably configured so the ''list@domain'' and ''list-SOMETHING@domain'' 40 # addresses are forwarded to the ll-incoming(1) command.40 # addresses are forwarded to the pl-incoming(1) command. 41 41 42 42 list.address = test@example.com … … 93 93 # 94 94 # The following parameters deal with the processing of incoming mail, 95 # by ll-incoming(1) and various processing modules.95 # by pl-incoming(1) and various processing modules. 96 96 # 97 97 # === mail.workflow.submit === -
doc/remote-admin.txt
r219 r303 189 189 them: 190 190 {{{ 191 ll-subchange --admin --auth=password:secret list@example.com \191 pl-subchange --admin --auth=password:secret list@example.com \ 192 192 listadmin@example.com 193 193 }}} -
lib/Lancelot/DB.pm
r299 r303 347 347 This method enables access to the database for the mailing list named 348 348 in C<$listaddr>, such as 'testlist@example.com'. Generally, the database 349 for a list is stored in C<$ENV{HOME}/. ll/$listaddr/list.db>.349 for a list is stored in C<$ENV{HOME}/.pl/$listaddr/list.db>. 350 350 351 351 C<\%options> is a reference to a hash containing further options. The … … 364 364 set of hard-coded defaults. Then it incorporates the content of the 365 365 files F</etc/lancelot/defaults.conf> and (if it exists) 366 F<$HOME/. ll/defaults.conf>. Later settings override existing366 F<$HOME/.pl/defaults.conf>. Later settings override existing 367 367 settings. Finally, the list address is forced to be C<$listaddr>. 368 368 … … 377 377 sub new { 378 378 my ($class, $listaddr, $optref) = @_; 379 my ($create)= $optref->{create};379 my $create = $optref->{create}; 380 380 my $self = bless {}, $class; 381 381 my ($local, $domain) = split /\@/, $listaddr; … … 390 390 } 391 391 my @default_files = ("/etc/lancelot/defaults.conf", 392 File::Spec->join($home, ". ll", "defaults.conf"));392 File::Spec->join($home, ".pl", "defaults.conf")); 393 393 394 394 log "debug", "initialising database for $listaddr"; … … 397 397 # 398 398 # If the home directory finishes with .../domains/DOMAIN/LOCAL, we 399 # are probably doing Our-ISP style delivery using ll-incoming(1),399 # are probably doing Our-ISP style delivery using pl-incoming(1), 400 400 # and the list database is directly below that "home directory". 401 401 # 402 402 # Otherwise we're checking a few likely places, namely the 403 # . ll/LOCAL@DOMAIN subdirectory of the user's (real) $HOME as well as403 # .pl/LOCAL@DOMAIN subdirectory of the user's (real) $HOME as well as 404 404 # the explicit Our-ISP style list directory for command-line programs. 405 405 406 my $ndir = File::Spec->join($home, ". ll", $listaddr);406 my $ndir = File::Spec->join($home, ".pl", $listaddr); 407 407 my $odir = File::Spec->join($home, "domains", $domain, $local); 408 408 my $vdir = File::Spec->join("/vol/mail", $user, $domain, $local); … … 412 412 log "debug", "create option given, check whether database exists"; 413 413 if ($optref->{ourisp}) { 414 $self->{listdir} = -d dirname($vdir) ? $vdir : $ndir; 414 log "debug", "ourisp hack: vdir=$odir ndir=$odir"; 415 $self->{listdir} = -d dirname($vdir) ? $vdir : $odir; 415 416 } else { 416 417 $self->{listdir} = $ndir; … … 962 963 # We need to insert an address (and user) record for an unconfirmed 963 964 # subscription request so we can key the confirmation table off the 964 # subscription table. The ll-janitor(1) command is used to clean965 # subscription table. The pl-janitor(1) command is used to clean 965 966 # overdue unconfirmed subscription records from the list database. 966 967 $self->add_address($address, { status => 'UNCONFIRMED' }); … … 1700 1701 1701 1702 # The address and user records are left in the database -- these 1702 # can be cleaned out periodically through ll-janitor, or1703 # can be cleaned out periodically through pl-janitor, or 1703 1704 # explicitly via a web frontend like Guinevere. This is so people's 1704 1705 # accounts in the web frontend won't be closed simply because they -
lib/Lancelot/Module/do_config.pm
r195 r303 1 1 # Module/do_config.pm -- 2 2 # 3 # Perform subscriber configuration requests ( ll-subchange(1) backend)3 # Perform subscriber configuration requests (pl-subchange(1) backend) 4 4 # 5 5 # Copyright (C) 2006 Anselm Lingnau <anselm@anselms.net>. -
lib/Lancelot/Module/post_digest.pm
r263 r303 77 77 78 78 Send a digest comprising messages nos. $from .. $to to the subscribers. 79 This is a separate function for the convenience of ll-janitor(1), which79 This is a separate function for the convenience of pl-janitor(1), which 80 80 must be able to send digests when it is time to do so (rather than 81 81 post_digest, which sends a digest when enough material has accumulated). -
lib/Lancelot/Module/prep_config.pm
r162 r303 1 1 # Module/prep_config.pm -- 2 2 # 3 # Parse and prepare a subscriber configuration request ( ll-subchange backend)3 # Parse and prepare a subscriber configuration request (pl-subchange backend) 4 4 # 5 5 # Copyright (C) 2006 Anselm Lingnau <anselm@anselms.net>. -
lib/Lancelot/Module/process_bounce.pm
r283 r303 77 77 # "$bucket_size" seconds long (any bounces that occur earlier than the 78 78 # start of the earliest bucket are disregarded, and will in due course 79 # be removed from the database by " ll-janitor"). Each bucket contains79 # be removed from the database by "pl-janitor"). Each bucket contains 80 80 # the maximum bounce score encountered within the time period covered 81 81 # by that bucket. The total bounce score is the sum of the contents of -
lib/Lancelot/SMTPTest.pm
r212 r303 27 27 use Lancelot::SMTPTest qw/run_program/; 28 28 29 my @cmd = qw/ ll-incoming --verbose=STDERR:all=debug list@example.com/;29 my @cmd = qw/pl-incoming --verbose=STDERR:all=debug list@example.com/; 30 30 my $message = ...; # mail message with headers goes here 31 31 my $outdir = "smtp-test"; … … 36 36 37 37 This module makes it possible to test the Project Lancelot SMTP 38 client. It runs instances of C< ll-incoming> with preconfigured38 client. It runs instances of C<pl-incoming> with preconfigured 39 39 messages as input (as if they had arrived by mail) and provides a 40 simple SMTP server that C< ll-incoming> can talk to in turn. This SMTP40 simple SMTP server that C<pl-incoming> can talk to in turn. This SMTP 41 41 server writes incoming messages to a specified directory, so you can 42 42 compare them against known-good examples. -
lib/Lancelot/Template.pm
r293 r303 37 37 processing modules (for example) using the C<register> method, or will 38 38 be searched for in files like 39 F<$HOME/. ll/>I<list>@I<domain>F</templates/>I<language>/I<name>.39 F<$HOME/.pl/>I<list>@I<domain>F</templates/>I<language>/I<name>. 40 40 41 41 Within a template, "<<foo>>" expressions will be replaced by the … … 98 98 push @dirs, File::Spec->join($db->get_listdir, "templates"); 99 99 if (my $homedir = $ENV{HOME} || get_homedir()) { 100 push @dirs, File::Spec->join($homedir, ". ll", "templates");100 push @dirs, File::Spec->join($homedir, ".pl", "templates"); 101 101 } 102 102 -
smtp-test/msg.lrr.0
r288 r303 1 SMTP-From: ll-testlist+owner@example.com1 SMTP-From: pl-testlist+owner@example.com 2 2 SMTP-To: hugo@example.com 3 From: Ll-testlist Management <ll-testlist+owner@example.com>3 From: Pl-testlist Management <pl-testlist+owner@example.com> 4 4 To: hugo@example.com 5 5 Subject: Results of your administrative request (remote admin test) … … 18 18 Do not hesitate to contact us if you have any questions. 19 19 20 The Ll-testlist Management Team20 The Pl-testlist Management Team 21 21 -
t/00db.t
r292 r303 1 1 #!/usr/bin/perl -w 2 3 BEGIN { chdir 't' if -d 't' } 4 use lib '../lib'; 5 use blib; 2 6 3 7 use Test::More tests => 223; … … 19 23 20 24 # This must not conflict with a real list name. 21 my ($listname_local, $listname_domain) = (' ll-testlist', 'example.com');22 my ($listname)= "$listname_local\@$listname_domain";25 my ($listname_local, $listname_domain) = ('pl-testlist', 'example.com'); 26 my $listname = "$listname_local\@$listname_domain"; 23 27 24 28 can_ok('Lancelot::DB', 'new'); 25 rmtree("$ENV{HOME}/. ll/$listname", 1);29 rmtree("$ENV{HOME}/.pl/$listname", 1); 26 30 my $db = new Lancelot::DB $listname, { "create" => 0 }; 27 31 ok( !defined $db, "new() returned undef for non-existing list" ); … … 49 53 "and the proper list address"); 50 54 51 ok( $db->set_parameter(' ll-test', 'xyzzy'),55 ok( $db->set_parameter('pl-test', 'xyzzy'), 52 56 "set_parameter() seems to work" ); 53 my $test = $db->get_parameter(' ll-test');57 my $test = $db->get_parameter('pl-test'); 54 58 is( $test, 'xyzzy', "and get_parameter() gets the same back" ); 55 59 … … 96 100 97 101 $ENV{HOME} = $home; 98 rmtree "$ENV{HOME}/. ll/$listname";102 rmtree "$ENV{HOME}/.pl/$listname"; 99 103 $db = new Lancelot::DB $listname, { create => 1 }; 100 104 undef $db; 101 105 102 open F, "> $ENV{HOME}/. ll/$listname/list.db";106 open F, "> $ENV{HOME}/.pl/$listname/list.db"; 103 107 print F "Hallo\n"; 104 108 close F; … … 106 110 ok( !defined $db, "list.db too short"); 107 111 108 open F, "> $ENV{HOME}/. ll/$listname/list.db";112 open F, "> $ENV{HOME}/.pl/$listname/list.db"; 109 113 print F "** This file contains an SQLite 2.1 database"; # Yeah right. 110 114 close F; 111 115 $db = new Lancelot::DB $listname, { create => 0 }; 112 116 ok( !defined $db, "list.db is SQLite2 file"); 113 rmtree "$ENV{HOME}/. ll/$listname";117 rmtree "$ENV{HOME}/.pl/$listname"; 114 118 115 119 $db = new Lancelot::DB $listname, { create => 1 }; … … 120 124 $db->get_addresses(); 121 125 } "invalid sqlite:foobar subscriber data source type"; 122 rmtree "$ENV{HOME}/. ll/$listname";126 rmtree "$ENV{HOME}/.pl/$listname"; 123 127 124 128 $db = new Lancelot::DB $listname, { create => 1 }; … … 129 133 $db->get_addresses(); 130 134 } "invalid foo:bar subscriber data source type"; 131 rmtree "$ENV{HOME}/. ll/$listname";135 rmtree "$ENV{HOME}/.pl/$listname"; 132 136 133 137 $db = new Lancelot::DB $listname, { create => 1 }; … … 140 144 141 145 $ENV{HOME} = $home; 142 rmtree "$ENV{HOME}/. ll/$listname";146 rmtree "$ENV{HOME}/.pl/$listname"; 143 147 $db = new Lancelot::DB $listname, { create => 1 }; 144 148 my $dir = $db->get_listdir(); 145 is( $dir, "$ENV{HOME}/. ll/$listname", "get_listdir() seems to work" );149 is( $dir, "$ENV{HOME}/.pl/$listname", "get_listdir() seems to work" ); 146 150 147 151 # Parameter … … 150 154 can_ok($db, 'increment_parameter'); 151 155 can_ok($db, 'get_parameter'); 152 $db->set_parameter(' ll-inctest', '0');153 is( $db->increment_parameter(' ll-inctest'), 0, "increment_parameter() result" );154 is( $db->get_parameter(' ll-inctest'), 1, "increment_parameter() db entry" );156 $db->set_parameter('pl-inctest', '0'); 157 is( $db->increment_parameter('pl-inctest'), 0, "increment_parameter() result" ); 158 is( $db->get_parameter('pl-inctest'), 1, "increment_parameter() db entry" ); 155 159 156 160 local $Test::DatabaseRow::dbh = $db->{dbh}; … … 196 200 dies_ok { $db->set_configs_from_file('nonexistent.cfg', 1) } 197 201 "set_configs_from_file: nonexistent file (must_exist)"; 198 ok( $db->set_configs_from_file('t /test.cfg', 0) == 2,199 "set_configs_from_file: t /test.cfg");202 ok( $db->set_configs_from_file('test.cfg', 0) == 2, 203 "set_configs_from_file: test.cfg"); 200 204 201 205 can_ok($db, 'init_address_db'); … … 394 398 395 399 my $ref = { 396 status => 'SUBSCRIBED', name => 'Jane Doe', auth => '', 400 status => 'SUBSCRIBED', name => 'Jane Doe', auth => '', id => '2', 397 401 }; 398 402 $ref->{$_} = 0 foreach (@options); … … 400 404 can_ok($db, 'get_address_options'); 401 405 my $aa = (Email::Address->parse($address))[0]; 402 foreach my $a ($ address, ucfirst($address), $aa) {406 foreach my $a ($fulladdress, ucfirst($aa), $aa) { 403 407 foreach my $i (0 .. $#options) { 404 408 $db->set_address_options($a, { $options[$i] => 1 }); -
t/01template.t
r293 r303 12 12 # This must not conflict with a real list name. 13 13 14 my ($listname_local, $listname_domain) = (' ll-testlist', 'example.com');14 my ($listname_local, $listname_domain) = ('pl-testlist', 'example.com'); 15 15 my $listname = "$listname_local\@$listname_domain"; 16 rmtree("$ENV{HOME}/. ll/$listname");16 rmtree("$ENV{HOME}/.pl/$listname"); 17 17 my $db = new Lancelot::DB $listname, { create => 1 }; 18 18 $db->delete_configs("lancelot.templatedirs"); … … 52 52 my $tdir = File::Spec->join($db->get_listdir, "templates", "en"); 53 53 mkpath $tdir; 54 open OUT, "> ".File::Spec->join($tdir, " ll-test1");54 open OUT, "> ".File::Spec->join($tdir, "pl-test1"); 55 55 print OUT "Test\n"; 56 56 close OUT; 57 57 58 is (Lancelot::Template::find($db, " ll-test1", "en"), "Test\n",58 is (Lancelot::Template::find($db, "pl-test1", "en"), "Test\n", 59 59 "find (listdir)"); 60 is (Lancelot::Template->process(" ll-test1", "en", $db, {}), "Test\n",60 is (Lancelot::Template->process("pl-test1", "en", $db, {}), "Test\n", 61 61 "process (simple)"); 62 62 rmtree(File::Spec->join($db->get_listdir, "templates")); 63 63 64 $tdir = File::Spec->join($ENV{HOME}, '. ll', 'templates', 'en');64 $tdir = File::Spec->join($ENV{HOME}, '.pl', 'templates', 'en'); 65 65 mkpath $tdir unless -d $tdir; 66 open OUT, "> ".File::Spec->join($tdir, " ll-test2");66 open OUT, "> ".File::Spec->join($tdir, "pl-test2"); 67 67 print OUT "Test\n"; 68 68 close OUT; 69 69 70 is (Lancelot::Template::find($db, " ll-test2", "en"), "Test\n",70 is (Lancelot::Template::find($db, "pl-test2", "en"), "Test\n", 71 71 "find (home directory)"); 72 72 my $saved_home = $ENV{'HOME'}; 73 73 delete $ENV{'HOME'}; 74 is (Lancelot::Template::find($db, " ll-test2", "en"), "Test\n",74 is (Lancelot::Template::find($db, "pl-test2", "en"), "Test\n", 75 75 "find (home dir, with default from /etc/passwd)"); 76 76 my $override = Sub::Override->new( 77 77 'Lancelot::Template::get_homedir' => sub { return undef; } 78 78 ); 79 is (Lancelot::Template::find($db, " ll-test2", "en"), undef,79 is (Lancelot::Template::find($db, "pl-test2", "en"), undef, 80 80 "find (home dir, with overridden getpwuid)"); 81 81 $override->restore(); 82 82 $ENV{'HOME'} = $saved_home; 83 83 84 unlink File::Spec->join($ENV{HOME}, '. ll', 'templates', 'en', 'll-test2');84 unlink File::Spec->join($ENV{HOME}, '.pl', 'templates', 'en', 'pl-test2'); 85 85 86 $tdir = File::Spec->join("/tmp", " ll-test3", "en");86 $tdir = File::Spec->join("/tmp", "pl-test3", "en"); 87 87 mkpath $tdir unless -d $tdir; 88 open OUT, "> ".File::Spec->join($tdir, " ll-test3");88 open OUT, "> ".File::Spec->join($tdir, "pl-test3"); 89 89 print OUT "Test\n"; 90 90 close OUT; 91 91 92 ok (!defined Lancelot::Template::find($db, " ll-test3", "en"),92 ok (!defined Lancelot::Template::find($db, "pl-test3", "en"), 93 93 "find (templatedirs not set)"); 94 $db->set_config("lancelot.templatedirs", "/tmp/ ll-test3");95 is (Lancelot::Template::find($db, " ll-test3", "en"), "Test\n",94 $db->set_config("lancelot.templatedirs", "/tmp/pl-test3"); 95 is (Lancelot::Template::find($db, "pl-test3", "en"), "Test\n", 96 96 "find (templatedirs set)"); 97 rmtree(File::Spec->join("/tmp", " ll-test3"));97 rmtree(File::Spec->join("/tmp", "pl-test3")); 98 98 99 99 $db->delete_configs("lancelot.templatedirs"); 100 ok (!defined Lancelot::Template->process(" ll-test4", "en", $db, {}),100 ok (!defined Lancelot::Template->process("pl-test4", "en", $db, {}), 101 101 "process (undefined template)"); 102 Lancelot::Template->register(" ll-test4", "en", "Hello world\n");103 is (Lancelot::Template->process(" ll-test4", "en", $db, {}), "Hello world\n",102 Lancelot::Template->register("pl-test4", "en", "Hello world\n"); 103 is (Lancelot::Template->process("pl-test4", "en", $db, {}), "Hello world\n", 104 104 "process (fallback to registered template)"); 105 is (Lancelot::Template->process(" ll-test4", "de", $db, {}), "Hello world\n",105 is (Lancelot::Template->process("pl-test4", "de", $db, {}), "Hello world\n", 106 106 "process (fallback to registered template - in English)"); 107 107 108 Lancelot::Template->register(" ll-test5", "en", "a<<b>>c\n");109 is (Lancelot::Template->process(" ll-test5", "en", $db, { b => 'B' }), "aBc\n",108 Lancelot::Template->register("pl-test5", "en", "a<<b>>c\n"); 109 is (Lancelot::Template->process("pl-test5", "en", $db, { b => 'B' }), "aBc\n", 110 110 "process (with replacement)"); -
t/02pl-scripts.t
r208 r303 30 30 my (@out, @err); 31 31 32 execscript ("blib/script/ ll-init test\@localhost $ENV{USER}\@localhost", [], \@out, \@err);32 execscript ("blib/script/pl-init test\@localhost $ENV{USER}\@localhost", [], \@out, \@err); 33 33 is (@err, 0, "init errors"); 34 execscript ("blib/script/ ll-subscribe --nowelcome --nomail test\@localhost", \@in, \@out, \@err);34 execscript ("blib/script/pl-subscribe --nowelcome --nomail test\@localhost", \@in, \@out, \@err); 35 35 is (@err, 0, "subscribe errors"); 36 36 cleanup('NONE', 0); -
t/20archive-store.t
r218 r303 23 23 BEGIN { use_ok('Lancelot::Module::archive_store'); } 24 24 25 my ($listname) = ' ll-testlist@example.com';25 my ($listname) = 'pl-testlist@example.com'; 26 26 27 rmtree("$ENV{HOME}/. ll/$listname", 0);27 rmtree("$ENV{HOME}/.pl/$listname", 0); 28 28 29 29 my $db = new Lancelot::DB $listname, { create => 1 }; 30 $db->set_config('list.name', ' Ll-testlist');30 $db->set_config('list.name', 'Pl-testlist'); 31 31 32 32 my $msg = Lancelot::Message->new('From: hugo@example.com 33 To: ll-testlist@example.net33 To: pl-testlist@example.net 34 34 Subject: Test 35 35 … … 47 47 "nonsubscriber archive_store STDERR output"); 48 48 is($result, "", "nonsubscriber archive_store result OK"); 49 ok(! -e "$ENV{HOME}/. ll/$listname/archive", "no archive directory created");49 ok(! -e "$ENV{HOME}/.pl/$listname/archive", "no archive directory created"); 50 50 Lancelot::Log::init "NONE:"; 51 51 … … 57 57 $db->delete_configs('archive.dirmode'); # should be 0755 58 58 $msg = Lancelot::Message->new('From: hugo@example.com 59 To: ll-testlist@example.net59 To: pl-testlist@example.net 60 60 Subject: Test 61 61 … … 66 66 $result = Lancelot::Module::archive_store::execute($db, $msg); 67 67 is($result, "", "subscriber archive_store result OK"); 68 my $adir = "$ENV{HOME}/. ll/$listname/archive";68 my $adir = "$ENV{HOME}/.pl/$listname/archive"; 69 69 ok(-d $adir, "archive directory created"); 70 70 file_mode_is($adir, 0755, "archive directory mode is 0755"); … … 74 74 file_readable_ok($fname, "archive file is readable"); 75 75 file_contents_is($fname, 'From: hugo@example.com 76 To: ll-testlist@example.net76 To: pl-testlist@example.net 77 77 Subject: Test 78 78 … … 83 83 84 84 $msg = Lancelot::Message->new('From: hugo@example.com 85 To: ll-testlist@example.net85 To: pl-testlist@example.net 86 86 Subject: Test 87 87 … … 99 99 $db->set_config('archive.directory', 'other-archive'); 100 100 $msg = Lancelot::Message->new('From: hugo@example.com 101 To: ll-testlist@example.net101 To: pl-testlist@example.net 102 102 Subject: Test 103 103 … … 106 106 $result = Lancelot::Module::archive_store::execute($db, $msg); 107 107 is($result, "", "archive.directory test result"); 108 $adir = "$ENV{HOME}/. ll/$listname/other-archive";108 $adir = "$ENV{HOME}/.pl/$listname/other-archive"; 109 109 ok(-d $adir, "archive directory created"); 110 110 file_mode_is($adir, 0755, "archive directory mode is 0755"); … … 118 118 $result = Lancelot::Module::archive_store::execute($db, $msg); 119 119 is($result, "", "archive.dirmode test result"); 120 $adir = "$ENV{HOME}/. ll/$listname/other-archive";120 $adir = "$ENV{HOME}/.pl/$listname/other-archive"; 121 121 ok(-d $adir, "archive directory created"); 122 122 file_mode_is($adir, 0750, "archive directory mode is 0750"); … … 127 127 $result = Lancelot::Module::archive_store::execute($db, $msg); 128 128 is($result, "", "octal archive.dirmode test result"); 129 $adir = "$ENV{HOME}/. ll/$listname/other-archive";129 $adir = "$ENV{HOME}/.pl/$listname/other-archive"; 130 130 ok(-d $adir, "archive directory created"); 131 131 file_mode_is($adir, 0700, "archive directory mode is 0700"); … … 133 133 # absolute pathname for archive directory 134 134 rmtree($adir, 0); 135 $adir = "$ENV{HOME}/. ll/$listname/other-archive";135 $adir = "$ENV{HOME}/.pl/$listname/other-archive"; 136 136 $db->set_config('archive.directory', $adir); 137 137 $result = Lancelot::Module::archive_store::execute($db, $msg); … … 141 141 # archive directory impossible to create 142 142 rmtree($adir, 0); 143 $adir = "$ENV{HOME}/. ll/$listname/other-archive";143 $adir = "$ENV{HOME}/.pl/$listname/other-archive"; 144 144 chmod 0111, dirname($adir); 145 145 $db->set_config('archive.directory', $adir); … … 151 151 # archive file impossible to create 152 152 rmtree($adir, 0); 153 $adir = "$ENV{HOME}/. ll/$listname/other-archive";153 $adir = "$ENV{HOME}/.pl/$listname/other-archive"; 154 154 mkpath "$adir/0", 0; 155 155 chmod 0111, "$adir/0"; -
t/20list-headers.t
r294 r303 18 18 BEGIN { use_ok('Lancelot::Module::list_headers'); } 19 19 20 my $listname = ' ll-testlist@example.com';20 my $listname = 'pl-testlist@example.com'; 21 21 22 rmtree("$ENV{HOME}/. ll/$listname", 0);22 rmtree("$ENV{HOME}/.pl/$listname", 0); 23 23 24 24 my $db = new Lancelot::DB $listname, { create => 1 }; 25 $db->set_config('list.name', ' Ll-testlist');25 $db->set_config('list.name', 'Pl-testlist'); 26 26 $db->set_config('mail.delimiter', '+'); 27 27 … … 37 37 '); 38 38 39 $db->set_config('mail.listid', '< ll-testlist.example.com>');39 $db->set_config('mail.listid', '<pl-testlist.example.com>'); 40 40 my $tmsg = copy_msg($msg); 41 41 my $result = Lancelot::Module::list_headers::execute($db, $tmsg); 42 is($tmsg->header('List-ID'), '< ll-testlist.example.com>', 'explicit list ID');42 is($tmsg->header('List-ID'), '<pl-testlist.example.com>', 'explicit list ID'); 43 43 44 44 $db->delete_configs('mail.listid'); 45 45 $tmsg = copy_msg($msg); 46 46 $result = Lancelot::Module::list_headers::execute($db, $tmsg); 47 is($tmsg->header('List-ID'), '< ll-testlist.list-id.example.com>',47 is($tmsg->header('List-ID'), '<pl-testlist.list-id.example.com>', 48 48 'default list ID'); 49 49 … … 65 65 foreach my $h (@hdrs) { 66 66 is($tmsg->header('List-'.ucfirst($h)), 67 "<mailto: ll-testlist+$h\@example.com>",67 "<mailto:pl-testlist+$h\@example.com>", 68 68 "List-\u$h value"); 69 69 } … … 75 75 foreach my $h (@hdrs) { 76 76 is($tmsg->header('List-'.ucfirst($h)), 77 "<mailto: ll-testlist-$h\@example.com>",77 "<mailto:pl-testlist-$h\@example.com>", 78 78 "List-\u$h value (default mail.delimiter)"); 79 79 } … … 164 164 # reply-to munging 165 165 166 $db->set_config('mail.replyto', ' ll-testlist@example.com');166 $db->set_config('mail.replyto', 'pl-testlist@example.com'); 167 167 $db->set_config('mail.forcereplyto', 0); 168 168 $tmsg = copy_msg($msg); 169 169 $result = Lancelot::Module::list_headers::execute($db, $tmsg); 170 is($tmsg->header('Reply-To'), ' ll-testlist@example.com',170 is($tmsg->header('Reply-To'), 'pl-testlist@example.com', 171 171 'optional list reply-to'); 172 172 … … 178 178 $db->set_config('mail.forcereplyto', 1); 179 179 $result = Lancelot::Module::list_headers::execute($db, $tmsg); 180 is($tmsg->header('Reply-To'), ' ll-testlist@example.com',180 is($tmsg->header('Reply-To'), 'pl-testlist@example.com', 181 181 'forced list reply-to'); 182 182 -
t/20policy-addresses.t
r218 r303 18 18 BEGIN { use_ok('Lancelot::Module::policy_addresses'); } 19 19 20 my ($listname) = ' ll-testlist@example.com';20 my ($listname) = 'pl-testlist@example.com'; 21 21 22 rmtree("$ENV{HOME}/. ll/$listname", 0);22 rmtree("$ENV{HOME}/.pl/$listname", 0); 23 23 24 24 my $db = new Lancelot::DB $listname, { create => 1 }; 25 $db->set_config('list.name', ' Ll-testlist');25 $db->set_config('list.name', 'Pl-testlist'); 26 26 27 27 # Tests for explicit addressing … … 43 43 # List address in To: header 44 44 $msg = Lancelot::Message->new('From: hugo@example.com 45 To: ll-testlist@example.com45 To: pl-testlist@example.com 46 46 Subject: Test 47 47 … … 53 53 # List address in To: header 54 54 $msg = Lancelot::Message->new('From: hugo@example.com 55 To: Project Lancelot Test List < ll-testlist@example.com>55 To: Project Lancelot Test List <pl-testlist@example.com> 56 56 Subject: Test 57 57 … … 64 64 $msg = Lancelot::Message->new('From: hugo@example.com 65 65 To: susi@example.net 66 Cc: ll-testlist@example.com66 Cc: pl-testlist@example.com 67 67 Subject: Test 68 68 … … 79 79 $db->add_address('hugo@example.com'); 80 80 $msg = Lancelot::Message->new('From: hugo@example.com 81 To: ll-testlist@example.com81 To: pl-testlist@example.com 82 82 Subject: Test 83 83 … … 89 89 $db->add_address('susi@example.com', { status => 'BLACKLIST' }); 90 90 $msg = Lancelot::Message->new('From: susi@example.com 91 To: ll-testlist@example.com91 To: pl-testlist@example.com 92 92 Subject: Test 93 93 … … 98 98 99 99 $msg = Lancelot::Message->new('From: heinz@example.com 100 To: ll-testlist@example.com100 To: pl-testlist@example.com 101 101 Subject: Test 102 102 -
t/20policy-subscribe.t
r218 r303 18 18 BEGIN { use_ok('Lancelot::Module::policy_subscribe'); } 19 19 20 my ($listname) = ' ll-testlist@example.com';20 my ($listname) = 'pl-testlist@example.com'; 21 21 22 rmtree("$ENV{HOME}/. ll/$listname", 0);22 rmtree("$ENV{HOME}/.pl/$listname", 0); 23 23 24 24 my $db = new Lancelot::DB $listname, { create => 1 }; 25 $db->set_config('list.name', ' Ll-testlist');25 $db->set_config('list.name', 'Pl-testlist'); 26 26 27 27 -
t/25digest-plain.t
r290 r303 23 23 BEGIN { use_ok('Lancelot::Digest::plain'); } 24 24 25 my $listname = ' ll-testlist@example.com';26 27 rmtree("$ENV{HOME}/. ll/$listname", 0);25 my $listname = 'pl-testlist@example.com'; 26 27 rmtree("$ENV{HOME}/.pl/$listname", 0); 28 28 29 29 my $db = new Lancelot::DB $listname, { create => 1 }; 30 $db->set_config('list.name', ' Ll-testlist');30 $db->set_config('list.name', 'Pl-testlist'); 31 31 32 32 # Fake an archive of messages to prepare a digest from … … 34 34 for (my $i = 1; $i <= 10; $i++) { 35 35 my $msg = Lancelot::Message->new(sprintf 'From: hugo@example.com 36 To: ll-testlist@example.com36 To: pl-testlist@example.com 37 37 Subject: Test %u 38 38 Date: Mon, 12 May 2008 12:00:%02u +0200 … … 47 47 my $ok = q|Date: \w{3}, \d{1,2} \w{3} \d{4} \d{2}:\d{2}:\d{2} [-+]\d{4} 48 48 MIME-Version: 1.0 49 From: ll-testlist\+digest@example.com50 Reply-To: ll-testlist@example.com51 To: ll-testlist@example.com52 Subject: Ll-testlist Digest V1 #153 Content-Type: text/plain; charset="iso-8859-1" 54 55 Ll-testlist Digest\s{9,10}\w{3}, \d{1,2} \w{3} \d{4}\s{9,10}Volume 1 : Issue 156 57 Today's Topics: 58 59 Test 1 60 61 ---------------------------------------------------------------------- 62 63 Date: Mon, 12 May 2008 12:00:01 \+0200 64 From: hugo@example.com 65 To: ll-testlist@example.com66 Subject: Test 1 67 68 This is test message 1. 69 70 ------------------------------ 71 72 End of Ll-testlist Digest V1 Issue #149 From: pl-testlist\+digest@example.com 50 Reply-To: pl-testlist@example.com 51 To: pl-testlist@example.com 52 Subject: Pl-testlist Digest V1 #1 53 Content-Type: text/plain; charset="iso-8859-1" 54 55 Pl-testlist Digest\s{9,10}\w{3}, \d{1,2} \w{3} \d{4}\s{9,10}Volume 1 : Issue 1 56 57 Today's Topics: 58 59 Test 1 60 61 ---------------------------------------------------------------------- 62 63 Date: Mon, 12 May 2008 12:00:01 \+0200 64 From: hugo@example.com 65 To: pl-testlist@example.com 66 Subject: Test 1 67 68 This is test message 1. 69 70 ------------------------------ 71 72 End of Pl-testlist Digest V1 Issue #1 73 73 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* 74 74 |; … … 82 82 $ok = q|Date: \w{3}, \d{1,2} \w{3} \d{4} \d{2}:\d{2}:\d{2} [-+]\d{4} 83 83 MIME-Version: 1.0 84 From: ll-testlist\+digest@example.com85 Reply-To: ll-testlist@example.com86 To: ll-testlist@example.com87 Subject: Ll-testlist Digest V1 #188 Content-Type: text/plain; charset="iso-8859-1" 89 90 Ll-testlist Digest\s{9,10}\w{3}, \d{1,2} \w{3} \d{4}\s{9,10}Volume 1 : Issue 184 From: pl-testlist\+digest@example.com 85 Reply-To: pl-testlist@example.com 86 To: pl-testlist@example.com 87 Subject: Pl-testlist Digest V1 #1 88 Content-Type: text/plain; charset="iso-8859-1" 89 90 Pl-testlist Digest\s{9,10}\w{3}, \d{1,2} \w{3} \d{4}\s{9,10}Volume 1 : Issue 1 91 91 92 92 Today's Topics: … … 99 99 Date: Mon, 12 May 2008 12:00:01 \+0200 100 100 From: hugo@example.com 101 To: ll-testlist@example.com101 To: pl-testlist@example.com 102 102 Subject: Test 1 103 103 … … 108 108 Date: Mon, 12 May 2008 12:00:02 \+0200 109 109 From: hugo@example.com 110 To: ll-testlist@example.com110 To: pl-testlist@example.com 111 111 Subject: Test 2 112 112 … … 115 115 ------------------------------ 116 116 117 End of Ll-testlist Digest V1 Issue #1117 End of Pl-testlist Digest V1 Issue #1 118 118 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* 119 119 |; … … 125 125 $ok = q|Date: \w{3}, \d{1,2} \w{3} \d{4} \d{2}:\d{2}:\d{2} [-+]\d{4} 126 126 MIME-Version: 1.0 127 From: ll-testlist\+digest@example.com128 Reply-To: ll-testlist@example.com129 To: ll-testlist@example.com130 Subject: Ll-testlist Digest V1 #1131 Content-Type: text/plain; charset="iso-8859-1" 132 133 Ll-testlist Digest\s{9,10}\w{3}, \d{1,2} \w{3} \d{4}\s{9,10}Volume 1 : Issue 1134 135 Today's Topics: 136 137 Test 1 138 139 ---------------------------------------------------------------------- 140 141 Date: Mon, 12 May 2008 12:00:01 \+0200 142 From: hugo@example.com 143 To: ll-testlist@example.com127 From: pl-testlist\+digest@example.com 128 Reply-To: pl-testlist@example.com 129 To: pl-testlist@example.com 130 Subject: Pl-testlist Digest V1 #1 131 Content-Type: text/plain; charset="iso-8859-1" 132 133 Pl-testlist Digest\s{9,10}\w{3}, \d{1,2} \w{3} \d{4}\s{9,10}Volume 1 : Issue 1 134 135 Today's Topics: 136 137 Test 1 138 139 ---------------------------------------------------------------------- 140 141 Date: Mon, 12 May 2008 12:00:01 \+0200 142 From: hugo@example.com 143 To: pl-testlist@example.com 144 144 Subject: Test 1 145 145 … … 150 150 Date: Mon, 12 May 2008 12:00:04 \+0200 151 151 From: hugo@example.com 152 To: ll-testlist@example.com152 To: pl-testlist@example.com 153 153 Subject: Test 1 154 154 … … 157 157 ------------------------------ 158 158 159 End of Ll-testlist Digest V1 Issue #1159 End of Pl-testlist Digest V1 Issue #1 160 160 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* 161 161 |; … … 173 173 $ok = q|Date: \w{3}, \d{1,2} \w{3} \d{4} \d{2}:\d{2}:\d{2} [-+]\d{4} 174 174 MIME-Version: 1.0 175 From: ll-testlist-digest@example.com176 Reply-To: ll-testlist@example.com177 To: ll-testlist@example.com178 Subject: Ll-testlist Digest V1 #1179 Content-Type: text/plain; charset="iso-8859-1" 180 181 Ll-testlist Digest\s{9,10}\w{3}, \d{1,2} \w{3} \d{4}\s{9,10}Volume 1 : Issue 1182 183 Today's Topics: 184 185 Test 1 186 187 ---------------------------------------------------------------------- 188 189 Date: Mon, 12 May 2008 12:00:01 \+0200 190 From: hugo@example.com 191 To: ll-testlist@example.com192 Subject: Test 1 193 194 This is test message 1. 195 196 ------------------------------ 197 198 End of Ll-testlist Digest V1 Issue #1175 From: pl-testlist-digest@example.com 176 Reply-To: pl-testlist@example.com 177 To: pl-testlist@example.com 178 Subject: Pl-testlist Digest V1 #1 179 Content-Type: text/plain; charset="iso-8859-1" 180 181 Pl-testlist Digest\s{9,10}\w{3}, \d{1,2} \w{3} \d{4}\s{9,10}Volume 1 : Issue 1 182 183 Today's Topics: 184 185 Test 1 186 187 ---------------------------------------------------------------------- 188 189 Date: Mon, 12 May 2008 12:00:01 \+0200 190 From: hugo@example.com 191 To: pl-testlist@example.com 192 Subject: Test 1 193 194 This is test message 1. 195 196 ------------------------------ 197 198 End of Pl-testlist Digest V1 Issue #1 199 199 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* 200 200 |; … … 208 208 $ok = q|Date: \w{3}, \d{1,2} \w{3} \d{4} \d{2}:\d{2}:\d{2} [-+]\d{4} 209 209 MIME-Version: 1.0 210 From: ll-testlist\+digest@example.com211 Reply-To: ll-testlist@example.com212 To: ll-testlist@example.com213 Subject: Ll-testlist Digest V1 #1214 Content-Type: text/plain; charset="iso-8859-1" 215 216 Ll-testlist Digest\s{9,10}\w{3}, \d{1,2} \w{3} \d{4}\s{9,10}Volume 1 : Issue 1217 218 Today's Topics: 219 220 Test 1 221 222 ---------------------------------------------------------------------- 223 224 Date: Mon, 12 May 2008 12:00:01 \+0200 225 From: hugo@example.com 226 To: ll-testlist@example.com227 Subject: Test 1 228 229 This is test message 1. 230 231 ------------------------------ 232 233 End of Ll-testlist Digest V1 Issue #1210 From: pl-testlist\+digest@example.com 211 Reply-To: pl-testlist@example.com 212 To: pl-testlist@example.com 213 Subject: Pl-testlist Digest V1 #1 214 Content-Type: text/plain; charset="iso-8859-1" 215 216 Pl-testlist Digest\s{9,10}\w{3}, \d{1,2} \w{3} \d{4}\s{9,10}Volume 1 : Issue 1 217 218 Today's Topics: 219 220 Test 1 221 222 ---------------------------------------------------------------------- 223 224 Date: Mon, 12 May 2008 12:00:01 \+0200 225 From: hugo@example.com 226 To: pl-testlist@example.com 227 Subject: Test 1 228 229 This is test message 1. 230 231 ------------------------------ 232 233 End of Pl-testlist Digest V1 Issue #1 234 234 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* 235 235 |; … … 246 246 $ok = q|Date: \w{3}, \d{1,2} \w{3} \d{4} \d{2}:\d{2}:\d{2} [-+]\d{4} 247 247 MIME-Version: 1.0 248 From: ll-testlist-digest@example.com249 Reply-To: ll-testlist@example.com250 To: ll-testlist@example.com248 From: pl-testlist-digest@example.com 249 Reply-To: pl-testlist@example.com 250 To: pl-testlist@example.com 251 251 Subject: The Indigestion Digest V1 #1 252 252 Content-Type: text/plain; charset="iso-8859-1" … … 262 262 Date: Mon, 12 May 2008 12:00:01 \+0200 263 263 From: hugo@example.com 264 To: ll-testlist@example.com264 To: pl-testlist@example.com 265 265 Subject: Test 1 266 266 … … 283 283 $ok = q|Date: \w{3}, \d{1,2} \w{3} \d{4} \d{2}:\d{2}:\d{2} [-+]\d{4} 284 284 MIME-Version: 1.0 285 From: ll-testlist-digest@example.com286 Reply-To: ll-testlist@example.com287 To: ll-testlist@example.com288 Subject: Ll-testlist Digest V1 #1289 Content-Type: text/plain; charset="iso-8859-1" 290 291 Ll-testlist Digest\s{9,10}\w{3}, \d{1,2} \w{3} \d{4}\s{9,10}Volume 1 : Issue 1292 293 Today's Topics: 294 295 Test 1 296 297 ---------------------------------------------------------------------- 298 299 Date: Mon, 12 May 2008 12:00:01 \+0200 300 From: hugo@example.com 301 To: ll-testlist@example.com302 Subject: Test 1 303 304 This is test message 1. 305 306 ------------------------------ 307 308 End of Ll-testlist Digest V1 Issue #1285 From: pl-testlist-digest@example.com 286 Reply-To: pl-testlist@example.com 287 To: pl-testlist@example.com 288 Subject: Pl-testlist Digest V1 #1 289 Content-Type: text/plain; charset="iso-8859-1" 290 291 Pl-testlist Digest\s{9,10}\w{3}, \d{1,2} \w{3} \d{4}\s{9,10}Volume 1 : Issue 1 292 293 Today's Topics: 294 295 Test 1 296 297 ---------------------------------------------------------------------- 298 299 Date: Mon, 12 May 2008 12:00:01 \+0200 300 From: hugo@example.com 301 To: pl-testlist@example.com 302 Subject: Test 1 303 304 This is test message 1. 305 306 ------------------------------ 307 308 End of Pl-testlist Digest V1 Issue #1 309 309 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* 310 310 |; … … 314 314 like($s, qr/$ok/, 'basic digest match (unset archive.directory)'); 315 315 316 my $adir = "$ENV{HOME}/. ll/$listname/archive";316 my $adir = "$ENV{HOME}/.pl/$listname/archive"; 317 317 $db->set_config('archive.directory', $adir); 318 318 -
t/30moderate.t
r296 r303 25 25 BEGIN { use_ok('Lancelot::Module::moderate'); } 26 26 27 my $listname = ' ll-testlist@example.com';28 29 rmtree("$ENV{HOME}/. ll/$listname", 0);27 my $listname = 'pl-testlist@example.com'; 28 29 rmtree("$ENV{HOME}/.pl/$listname", 0); 30 30 31 31 my $db = new Lancelot::DB $listname, { create => 1 }; 32 $db->set_config('list.name', ' Ll-testlist');32 $db->set_config('list.name', 'Pl-testlist'); 33 33 $db->set_config('mail.delimiter', '+'); 34 34 $db->set_config('lancelot.mailer', 'Test'); … … 43 43 44 44 my $msg = Lancelot::Message->new('From: hugo@example.com 45 To: ll-testlist@example.com45 To: pl-testlist@example.com 46 46 Subject: Test 47 47 Date: Fri, 15 Jul 15:41:00 2011 +0200 … … 72 72 my $s = $emails[0]->as_string; 73 73 $s =~ s/\(\w{3} \w{3} \d{2} \d{2}:\d{2}:\d{2} \d{4}\)/(DATE)/; 74 is($s, 'From: Ll-testlist Management <ll-testlist+owner@example.com>75 To: ll-testlist+moderators@example.com76 Subject: Ll-testlist moderation notification77 Reply-To: ll-testlist+moderate@example.com74 is($s, 'From: Pl-testlist Management <pl-testlist+owner@example.com> 75 To: pl-testlist+moderators@example.com 76 Subject: Pl-testlist moderation notification 77 Reply-To: pl-testlist+moderate@example.com 78 78 79 79 Please attend to the following messages at your convenience. The … … 119 119 $db->set_config('mod.notifylines', 3); 120 120 my $t2msg = Lancelot::Message->new('From: unsubscribed@example.com 121 To: ll-testlist@example.com121 To: pl-testlist@example.com 122 122 Subject: Test 123 123 Date: Fri, 15 Jul 15:41:00 2011 +0200 … … 141 141 $db->add_address('fritz@example.com', { moderated => 1 }); 142 142 my $t3msg = Lancelot::Message->new('From: fritz@example.com 143 To: ll-testlist@example.com143 To: pl-testlist@example.com 144 144 Subject: Test 145 145 Date: Fri, 15 Jul 15:41:00 2011 +0200 … … 162 162 $s = $emails[0]->as_string; 163 163 $s =~ s/\(\w{3} \w{3} \d{2} \d{2}:\d{2}:\d{2} \d{4}\)/(DATE)/; 164 is($s, 'From: Ll-testlist Management <ll-testlist+owner@example.com>165 To: ll-testlist+moderators@example.com166 Subject: Ll-testlist moderation notification167 Reply-To: ll-testlist+moderate@example.com164 is($s, 'From: Pl-testlist Management <pl-testlist+owner@example.com> 165 To: pl-testlist+moderators@example.com 166 Subject: Pl-testlist moderation notification 167 Reply-To: pl-testlist+moderate@example.com 168 168 169 169 Please attend to the following messages at your convenience. The … … 204 204 205 205 $db->flush_mod_message(1); 206 chmod 0, "$ENV{HOME}/. ll/$listname/mod";206 chmod 0, "$ENV{HOME}/.pl/$listname/mod"; 207 207 @result = Lancelot::Module::moderate::execute($db, $t3msg); 208 208 is(scalar(@result), 2, "non-storable message: result length"); 209 209 is($result[0], "mod-error", "non-storable message: result/template"); 210 210 is_deeply($result[1], { 'mod-number' => 1, 211 'mod-name' => "$ENV{HOME}/. ll/$listname/mod/1" },211 'mod-name' => "$ENV{HOME}/.pl/$listname/mod/1" }, 212 212 "non-storable message: result/parameters"); 213 213 214 214 $db->flush_mod_message(1); 215 chmod 0700, "$ENV{HOME}/. ll/$listname/mod";215 chmod 0700, "$ENV{HOME}/.pl/$listname/mod"; 216 216 is(Lancelot::Module::moderate::notify_moderators($db), 0, 217 217 "notify_moderators w/o messages"); … … 220 220 $db->set_config('mod.disposal', 'approve'); 221 221 my $t5msg = Lancelot::Message->new('From: unsubscribed@example.com 222 To: ll-testlist@example.com222 To: pl-testlist@example.com 223 223 Subject: Test 224 224 Date: Fri, 15 Jul 15:41:00 2011 +0200 … … 229 229 $t5msg->set_flag('nonsubscriber', 1); 230 230 my $t4msg = Lancelot::Message->new('From: fritz@example.com 231 To: ll-testlist@example.com231 To: pl-testlist@example.com 232 232 Subject: Test 233 233 Date: Fri, 15 Jul 15:41:00 2011 +0200 … … 241 241 $s = $emails[0]->as_string; 242 242 $s =~ s/\(\w{3} \w{3} \d{2} \d{2}:\d{2}:\d{2} \d{4}\)/(DATE)/g; 243 is($s, 'From: Ll-testlist Management <ll-testlist+owner@example.com>244 To: ll-testlist+moderators@example.com245 Subject: Ll-testlist moderation notification246 Reply-To: ll-testlist+moderate@example.com243 is($s, 'From: Pl-testlist Management <pl-testlist+owner@example.com> 244 To: pl-testlist+moderators@example.com 245 Subject: Pl-testlist moderation notification 246 Reply-To: pl-testlist+moderate@example.com 247 247 248 248 Please attend to the following messages at your convenience. The … … 299 299 300 300 Lancelot::Log::init("STDERR:all=err"); 301 unlink "$ENV{HOME}/. ll/$listname/mod/2";301 unlink "$ENV{HOME}/.pl/$listname/mod/2"; 302 302 stderr_like(sub { Lancelot::Module::moderate::notify_moderators($db) }, 303 qr|^30moderate.t\[\d+\]: module: mod message $ENV{HOME}/. ll/$listname/mod/2 seems to have disappeared\n|,303 qr|^30moderate.t\[\d+\]: module: mod message $ENV{HOME}/.pl/$listname/mod/2 seems to have disappeared\n|, 304 304 "notify_moderators w/lost message"); -
t/80remote-adm.t
r288 r303 18 18 my $dir = "../smtp-test"; 19 19 20 my $listname = ' ll-testlist@example.com';20 my $listname = 'pl-testlist@example.com'; 21 21 22 rmtree("$ENV{HOME}/. ll/$listname", 0);22 rmtree("$ENV{HOME}/.pl/$listname", 0); 23 23 24 24 my $db = new Lancelot::DB $listname, { create => 1 }; 25 $db->set_config('list.name', ' Ll-testlist');25 $db->set_config('list.name', 'Pl-testlist'); 26 26 $db->set_config('smtp.server', 'localhost'); 27 27 $db->set_config('smtp.port', $smtpport); … … 30 30 $db->add_address('hugo@example.com'); 31 31 32 my @cmd = ('../blib/script/ ll-incoming', '--verbose=STDERR:all=debug', $listname);32 my @cmd = ('../blib/script/pl-incoming', '--verbose=STDERR:all=debug', $listname); 33 33 34 34 # First try sending an administrative request to a non-administrator 35 35 36 36 my $message = <<'END'; 37 Delivered-To: ll-testlist+admin@example.com37 Delivered-To: pl-testlist+admin@example.com 38 38 Return-Path: hugo@example.com 39 39 From: hugo@example.com 40 To: ll-testlist+admin@example.com40 To: pl-testlist+admin@example.com 41 41 Subject: remote admin test 42 42 Message-ID: <ra-1@example.com> … … 48 48 49 49 file_contents_is("$dir/msg.lrr-na.0", <<'END', "list request reply (not admin)"); 50 SMTP-From: ll-testlist+owner@example.com50 SMTP-From: pl-testlist+owner@example.com 51 51 SMTP-To: hugo@example.com 52 From: Ll-testlist Management <ll-testlist+owner@example.com>52 From: Pl-testlist Management <pl-testlist+owner@example.com> 53 53 To: hugo@example.com 54 54 Subject: Unauthorised administrative request (remote admin test) … … 60 60 Do not hesitate to contact us if you have any questions. 61 61 62 The Ll-testlist Management Team62 The Pl-testlist Management Team 63 63 64 64 END … … 71 71 72 72 file_contents_eq_or_diff("$dir/msg.lrr.0", <<'END', "list request reply", { style => 'Unified' }); 73 SMTP-From: ll-testlist+owner@example.com73 SMTP-From: pl-testlist+owner@example.com 74 74 SMTP-To: hugo@example.com 75 From: Ll-testlist Management <ll-testlist+owner@example.com>75 From: Pl-testlist Management <pl-testlist+owner@example.com> 76 76 To: hugo@example.com 77 77 Subject: Results of your administrative request (remote admin test) … … 90 90 Do not hesitate to contact us if you have any questions. 91 91 92 The Ll-testlist Management Team92 The Pl-testlist Management Team 93 93 94 94 END
