maxsearchrecordsperpage config option
[freeside.git] / FS / FS / Conf.pm
1 package FS::Conf;
2
3 use vars qw($default_dir @config_items $DEBUG );
4 use IO::File;
5 use FS::ConfItem;
6
7 $DEBUG = 0;
8
9 =head1 NAME
10
11 FS::Conf - Freeside configuration values
12
13 =head1 SYNOPSIS
14
15   use FS::Conf;
16
17   $conf = new FS::Conf "/config/directory";
18
19   $FS::Conf::default_dir = "/config/directory";
20   $conf = new FS::Conf;
21
22   $dir = $conf->dir;
23
24   $value = $conf->config('key');
25   @list  = $conf->config('key');
26   $bool  = $conf->exists('key');
27
28   @config_items = $conf->config_items;
29
30 =head1 DESCRIPTION
31
32 Read and write Freeside configuration values.  Keys currently map to filenames,
33 but this may change in the future.
34
35 =head1 METHODS
36
37 =over 4
38
39 =item new [ DIRECTORY ]
40
41 Create a new configuration object.  A directory arguement is required if
42 $FS::Conf::default_dir has not been set.
43
44 =cut
45
46 sub new {
47   my($proto,$dir) = @_;
48   my($class) = ref($proto) || $proto;
49   my($self) = { 'dir' => $dir || $default_dir } ;
50   bless ($self, $class);
51 }
52
53 =item dir
54
55 Returns the directory.
56
57 =cut
58
59 sub dir {
60   my($self) = @_;
61   my $dir = $self->{dir};
62   -e $dir or die "FATAL: $dir doesn't exist!";
63   -d $dir or die "FATAL: $dir isn't a directory!";
64   -r $dir or die "FATAL: Can't read $dir!";
65   -x $dir or die "FATAL: $dir not searchable (executable)!";
66   $dir =~ /^(.*)$/;
67   $1;
68 }
69
70 =item config 
71
72 Returns the configuration value or values (depending on context) for key.
73
74 =cut
75
76 sub config {
77   my($self,$file)=@_;
78   my($dir)=$self->dir;
79   my $fh = new IO::File "<$dir/$file" or return;
80   if ( wantarray ) {
81     map {
82       /^(.*)$/
83         or die "Illegal line (array context) in $dir/$file:\n$_\n";
84       $1;
85     } <$fh>;
86   } else {
87     <$fh> =~ /^(.*)$/
88       or die "Illegal line (scalar context) in $dir/$file:\n$_\n";
89     $1;
90   }
91 }
92
93 =item exists
94
95 Returns true if the specified key exists, even if the corresponding value
96 is undefined.
97
98 =cut
99
100 sub exists {
101   my($self,$file)=@_;
102   my($dir) = $self->dir;
103   -e "$dir/$file";
104 }
105
106 =item touch
107
108 =cut
109
110 sub touch {
111   my($self, $file) = @_;
112   my $dir = $self->dir;
113   unless ( $self->exists($file) ) {
114     warn "[FS::Conf] TOUCH $file\n" if $DEBUG;
115     system('touch', "$dir/$file");
116   }
117 }
118
119 =item set
120
121 =cut
122
123 sub set {
124   my($self, $file, $value) = @_;
125   my $dir = $self->dir;
126   $value =~ /^(.*)$/s;
127   $value = $1;
128   unless ( $self->config($file) eq $value ) {
129     warn "[FS::Conf] SET $file\n" if $DEBUG;
130 #    warn "$dir" if is_tainted($dir);
131 #    warn "$dir" if is_tainted($file);
132     my $fh = new IO::File ">$dir/$file" or return;
133     print $fh "$value\n";
134   }
135 }
136 #sub is_tainted {
137 #             return ! eval { join('',@_), kill 0; 1; };
138 #         }
139
140 =item delete
141
142 =cut
143
144 sub delete {
145   my($self, $file) = @_;
146   my $dir = $self->dir;
147   if ( $self->exists($file) ) {
148     warn "[FS::Conf] DELETE $file\n";
149     unlink "$dir/$file";
150   }
151 }
152
153 =item config_items
154
155 Returns all of the possible configuration items as FS::ConfItem objects.  See
156 L<FS::ConfItem>.
157
158 =cut
159
160 sub config_items {
161 #  my $self = shift; 
162   @config_items;
163 }
164
165 =back
166
167 =head1 BUGS
168
169 Write access (touch, set, delete) should be documented.
170
171 If this was more than just crud that will never be useful outside Freeside I'd
172 worry that config_items is freeside-specific and icky.
173
174 =head1 SEE ALSO
175
176 "Configuration" in the web interface (config/config.cgi).
177
178 httemplate/docs/config.html
179
180 =cut
181
182 @config_items = map { new FS::ConfItem $_ } (
183
184   {
185     'key'         => 'address',
186     'section'     => 'depreciated',
187     'description' => 'This configuration option is no longer used.  See <a href="#invoice_template">invoice_template</a> instead.',
188     'type'        => 'text',
189   },
190
191   {
192     'key'         => 'apacheroot',
193     'section'     => 'apache',
194     'description' => 'The directory containing Apache virtual hosts',
195     'type'        => 'text',
196   },
197
198   {
199     'key'         => 'apachemachine',
200     'section'     => 'apache',
201     'description' => 'A machine with the apacheroot directory and user home directories.  The existance of this file enables setup of virtual host directories, and, in conjunction with the `home\' configuration file, symlinks into user home directories.',
202     'type'        => 'text',
203   },
204
205   {
206     'key'         => 'apachemachines',
207     'section'     => 'apache',
208     'description' => 'Your Apache machines, one per line.  This enables export of `/etc/apache/vhosts.conf\', which can be included in your Apache configuration via the <a href="http://www.apache.org/docs/mod/core.html#include">Include</a> directive.',
209     'type'        => 'textarea',
210   },
211
212   {
213     'key'         => 'bindprimary',
214     'section'     => 'BIND',
215     'description' => 'Your BIND primary nameserver.  This enables export of /var/named/named.conf and zone files into /var/named',
216     'type'        => 'text',
217   },
218
219   {
220     'key'         => 'bindsecondaries',
221     'section'     => 'BIND',
222     'description' => 'Your BIND secondary nameservers, one per line.  This enables export of /var/named/named.conf',
223     'type'        => 'textarea',
224   },
225
226   {
227     'key'         => 'business-onlinepayment',
228     'section'     => 'billing',
229     'description' => '<a href="http://search.cpan.org/search?mode=module&query=Business%3A%3AOnlinePayment">Business::OnlinePayment</a> support, at least three lines: processor, login, and password.  An optional fourth line specifies the action or actions (multiple actions are separated with `,\': for example: `Authorization Only, Post Authorization\').    Optional additional lines are passed to Business::OnlinePayment as %processor_options.',
230     'type'        => 'textarea',
231   },
232
233   {
234     'key'         => 'bsdshellmachines',
235     'section'     => 'shell',
236     'description' => 'Your BSD flavored shell (and mail) machines, one per line.  This enables export of `/etc/passwd\' and `/etc/master.passwd\'.',
237     'type'        => 'textarea',
238   },
239
240   {
241     'key'         => 'countrydefault',
242     'section'     => 'UI',
243     'description' => 'Default two-letter country code (if not supplied, the default is `US\')',
244     'type'        => 'text',
245   },
246
247   {
248     'key'         => 'cybercash3.2',
249     'section'     => 'billing',
250     'description' => '<a href="http://www.cybercash.com/cashregister/">CyberCash Cashregister v3.2</a> support.  Two lines: the full path and name of your merchant_conf file, and the transaction type (`mauthonly\' or `mauthcapture\').',
251     'type'        => 'textarea',
252   },
253
254   {
255     'key'         => 'cyrus',
256     'section'     => 'mail',
257     'description' => 'Integration with <a href="http://asg.web.cmu.edu/cyrus/imapd/">Cyrus IMAP Server</a>, three lines: IMAP server, admin username, and admin password.  Cyrus::IMAP::Admin should be installed locally and the connection to the server secured.',
258     'type'        => 'textarea',
259   },
260
261   {
262     'key'         => 'deletecustomers',
263     'section'     => 'UI',
264     'description' => 'Enable customer deletions.  Be very careful!  Deleting a customer will remove all traces that this customer ever existed!  It should probably only be used when auditing a legacy database.  Normally, you cancel all of a customers\' packages if they cancel service.',
265     'type'        => 'checkbox',
266   },
267
268   {
269     'key'         => 'dirhash',
270     'section'     => 'shell',
271     'description' => 'Optional numeric value to control directory hashing.  If positive, hashes directories for the specified number of levels from the front of the username.  If negative, hashes directories for the specified number of levels from the end of the username.  Some examples: <ul><li>1: user -> <a href="#home">/home</a>/u/user<li>2: user -> <a href="#home">/home</a>/u/s/user<li>-1: user -> <a href="#home">/home</a>/r/user<li>-2: user -> <a href="#home">home</a>/r/e/user</ul>',
272     'type'        => 'text',
273   },
274
275   {
276     'key'         => 'disable_customer_referrals',
277     'section'     => 'UI',
278     'description' => 'Disable new customer-to-customer referrals in the web interface',
279     'type'        => 'checkbox',
280   },
281
282   {
283     'key'         => 'domain',
284     'section'     => 'depreciated',
285     'description' => 'Your domain name.',
286     'type'        => 'text',
287   },
288
289   {
290     'key'         => 'editreferrals',
291     'section'     => 'UI',
292     'description' => 'Enable referral modification for existing customers',
293     'type'       => 'checkbox',
294   },
295
296   {
297     'key'         => 'emailinvoiceonly',
298     'section'     => 'billing',
299     'description' => 'Disables postal mail invoices',
300     'type'       => 'checkbox',
301   },
302
303   {
304     'key'         => 'disablepostalinvoicedefault',
305     'section'     => 'billing',
306     'description' => 'Disables postal mail invoices as the default option in the UI.  Be careful not to setup customers which are not sent invoices.  See <a href ="#emailinvoiceauto">emailinvoiceauto</a>.',
307     'type'       => 'checkbox',
308   },
309
310   {
311     'key'         => 'emailinvoiceauto',
312     'section'     => 'billing',
313     'description' => 'Automatically adds new accounts to the email invoice list upon customer creation',
314     'type'       => 'checkbox',
315   },
316
317   {
318     'key'         => 'erpcdmachines',
319     'section'     => '',
320     'description' => 'Your ERPCD authenticaion machines, one per line.  This enables export of `/usr/annex/acp_passwd\' and `/usr/annex/acp_dialup\'',
321     'type'        => 'textarea',
322   },
323
324   {
325     'key'         => 'hidecancelledpackages',
326     'section'     => 'UI',
327     'description' => 'Prevent cancelled packages from showing up in listings (though they will still be in the database)',
328     'type'        => 'checkbox',
329   },
330
331   {
332     'key'         => 'hidecancelledcustomers',
333     'section'     => 'UI',
334     'description' => 'Prevent customers with only cancelled packages from showing up in listings (though they will still be in the database)',
335     'type'        => 'checkbox',
336   },
337
338   {
339     'key'         => 'home',
340     'section'     => 'required',
341     'description' => 'For new users, prefixed to username to create a directory name.  Should have a leading but not a trailing slash.',
342     'type'        => 'text',
343   },
344
345   {
346     'key'         => 'icradiusmachines',
347     'section'     => 'radius',
348     'description' => 'Your <a href="ftp://ftp.cheapnet.net/pub/icradius">ICRADIUS</a> machines or <a href="http://www.freeradius.org/">FreeRADIUS</a> (with MySQL authentication) machines, one per line.  Turning this option on (even if empty) turns on radcheck table population (in the freeside database - the radcheck table needs to be created manually).  Machines listed in this file will have the radcheck table exported to them.  Each line should contain four items, separted by whitespace: machine name, MySQL database name, MySQL username, and MySQL password.  For example: "<CODE>radius.isp.tld&nbsp;radius_db&nbsp;radius_user&nbsp;passw0rd</CODE>".  You do not need to use MySQL for your Freeside database to export to an ICRADIUS/FreeRADIUS mysql database with this option.',
349     'type'        => [qw( checkbox textarea )],
350   },
351
352   {
353     'key'         => 'icradius_mysqldest',
354     'section'     => 'radius',
355     'description' => 'Destination directory for the MySQL databases, on the ICRADIUS/FreeRADIUS machines.  Defaults to "/usr/local/var/".',
356     'type'        => 'text',
357   },
358
359   {
360     'key'         => 'icradius_mysqlsource',
361     'section'     => 'radius',
362     'description' => 'Source directory for for the MySQL radcheck table files, on the Freeside machine.  Defaults to "/usr/local/var/freeside".',
363     'type'        => 'text',
364   },
365
366   {
367     'key'         => 'icradius_secrets',
368     'section'     => 'radius',
369     'description' => 'Optionally specifies a MySQL database for ICRADIUS/FreeRADIUS export, if you\'re not running MySQL for your Freeside database.  The database should be on the Freeside machine and store data in the <a href="#icradius_mysqlsource">icradius_mysqlsource</a> directory.  Three lines: DBI data source, username and password.',
370     'type'        => 'textarea',
371   },
372
373   {
374     'key'         => 'invoice_from',
375     'section'     => 'required',
376     'description' => 'Return address on email invoices',
377     'type'        => 'text',
378   },
379
380   {
381     'key'         => 'invoice_template',
382     'section'     => 'required',
383     'description' => 'Required template file for invoices.  See the <a href="../docs/billing.html">billing documentation</a> for details.',
384     'type'        => 'textarea',
385   },
386
387   {
388     'key'         => 'lpr',
389     'section'     => 'required',
390     'description' => 'Print command for paper invoices, for example `lpr -h\'',
391     'type'        => 'text',
392   },
393
394   {
395     'key'         => 'maildisablecatchall',
396     'section'     => 'depreciated',
397     'description' => '<b>DEPRECIATED</b>, now the default.  Turning this option on used to disable the requirement that each virtual domain have a catch-all mailbox.',
398     'type'        => 'checkbox',
399   },
400
401   {
402     'key'         => 'money_char',
403     'section'     => '',
404     'description' => 'Currency symbol - defaults to `$\'',
405     'type'        => 'text',
406   },
407
408   {
409     'key'         => 'mxmachines',
410     'section'     => 'BIND',
411     'description' => 'MX entries for new domains, weight and machine, one per line, with trailing `.\'',
412     'type'        => 'textarea',
413   },
414
415   {
416     'key'         => 'nsmachines',
417     'section'     => 'BIND',
418     'description' => 'NS nameservers for new domains, one per line, with trailing `.\'',
419     'type'        => 'textarea',
420   },
421
422   {
423     'key'         => 'nismachines',
424     'section'     => 'shell',
425     'description' => 'Your NIS master (not slave master) machines, one per line.  This enables export of `/etc/global/passwd\' and `/etc/global/shadow\'.',
426     'type'        => 'textarea',
427   },
428
429   {
430     'key'         => 'passwordmin',
431     'section'     => 'password',
432     'description' => 'Minimum password length (default 6)',
433     'type'        => 'text',
434   },
435
436   {
437     'key'         => 'passwordmax',
438     'section'     => 'password',
439     'description' => 'Maximum password length (default 8) (don\'t set this over 12 if you need to import or export crypt() passwords)',
440     'type'        => 'text',
441   },
442
443   {
444     'key'         => 'qmailmachines',
445     'section'     => 'mail',
446     'description' => 'Your qmail machines, one per line.  This enables export of `/var/qmail/control/virtualdomains\', `/var/qmail/control/recipientmap\', and `/var/qmail/control/rcpthosts\'.  Setting this option (even if empty) also turns on user `.qmail-extension\' file maintenance in conjunction with the <b>shellmachine</b> option.',
447     'type'        => [qw( checkbox textarea )],
448   },
449
450   {
451     'key'         => 'radiusmachines',
452     'section'     => 'radius',
453     'description' => 'Your RADIUS authentication machines, one per line.  This enables export of `/etc/raddb/users\'.',
454     'type'        => 'textarea',
455   },
456
457   {
458     'key'         => 'referraldefault',
459     'section'     => 'UI',
460     'description' => 'Default referral, specified by refnum',
461     'type'        => 'text',
462   },
463
464 #  {
465 #    'key'         => 'registries',
466 #    'section'     => 'required',
467 #    'description' => 'Directory which contains domain registry information.  Each registry is a directory.',
468 #  },
469
470   {
471     'key'         => 'maxsearchrecordsperpage',
472     'section'     => 'UI',
473     'description' => 'If set, number of search records to return per page.',
474     'type'        => 'text',
475   },
476
477   {
478     'key'         => 'sendmailconfigpath',
479     'section'     => 'mail',
480     'description' => 'Sendmail configuration file path.  Defaults to `/etc\'.  Many newer distributions use `/etc/mail\'.',
481     'type'        => 'text',
482   },
483
484   {
485     'key'         => 'sendmailmachines',
486     'section'     => 'mail',
487     'description' => 'Your sendmail machines, one per line.  This enables export of `/etc/virtusertable\' and `/etc/sendmail.cw\'.',
488     'type'        => 'textarea',
489   },
490
491   {
492     'key'         => 'sendmailrestart',
493     'section'     => 'mail',
494     'description' => 'If defined, the command which is run on sendmail machines after files are copied.',
495     'type'        => 'text',
496   },
497
498   {
499     'key'         => 'session-start',
500     'section'     => 'session',
501     'description' => 'If defined, the command which is executed on the Freeside machine when a session begins.  The contents of the file are treated as a double-quoted perl string, with the following variables available: <code>$ip</code>, <code>$nasip</code> and <code>$nasfqdn</code>, which are the IP address of the starting session, and the IP address and fully-qualified domain name of the NAS this session is on.',
502     'type'        => 'text',
503   },
504
505   {
506     'key'         => 'session-stop',
507     'section'     => 'session',
508     'description' => 'If defined, the command which is executed on the Freeside machine when a session ends.  The contents of the file are treated as a double-quoted perl string, with the following variables available: <code>$ip</code>, <code>$nasip</code> and <code>$nasfqdn</code>, which are the IP address of the starting session, and the IP address and fully-qualified domain name of the NAS this session is on.',
509     'type'        => 'text',
510   },
511
512   {
513     'key'         => 'shellmachine',
514     'section'     => 'shell',
515     'description' => 'A single machine with user home directories mounted.  This enables home directory creation, renaming and archiving/deletion.  In conjunction with `qmailmachines\', it also enables `.qmail-extension\' file maintenance.',
516     'type'        => 'text',
517   },
518
519   {
520     'key'         => 'shellmachine-useradd',
521     'section'     => 'shell',
522     'description' => 'The command(s) to run on shellmachine when an account is created.  If the <b>shellmachine</b> option is set but this option is not, <code>useradd -d $dir -m -s $shell -u $uid $username</code> is the default.  If this option is set but empty, <code>cp -pr /etc/skel $dir; chown -R $uid.$gid $dir</code> is the default instead.  Otherwise the value is evaluated as a double-quoted perl string, with the following variables available: <code>$username</code>, <code>$uid</code>, <code>$gid</code>, <code>$dir</code>, and <code>$shell</code>.',
523     'type'        => [qw( checkbox text )],
524   },
525
526   {
527     'key'         => 'shellmachine-userdel',
528     'section'     => 'shell',
529     'description' => 'The command(s) to run on shellmachine when an account is deleted.  If the <b>shellmachine</b> option is set but this option is not, <code>userdel $username</code> is the default.  If this option is set but empty, <code>rm -rf $dir</code> is the default instead.  Otherwise the value is evaluated as a double-quoted perl string, with the following variables available: <code>$username</code> and <code>$dir</code>.',
530     'type'        => [qw( checkbox text )],
531   },
532
533   {
534     'key'         => 'shellmachine-usermod',
535     'section'     => 'shell',
536     'description' => 'The command(s) to run on shellmachine when an account is modified.  If the <b>shellmachine</b> option is set but this option is empty, <code>[ -d $old_dir ] &amp;&amp; mv $old_dir $new_dir || ( chmod u+t $old_dir; mkdir $new_dir; cd $old_dir; find . -depth -print | cpio -pdm $new_dir; chmod u-t $new_dir; chown -R $uid.$gid $new_dir; rm -rf $old_dir )</code> is the default.  Otherwise the contents of the file are treated as a double-quoted perl string, with the following variables available: <code>$old_dir</code>, <code>$new_dir</code>, <code>$uid</code> and <code>$gid</code>.',
537     #'type'        => [qw( checkbox text )],
538     'type'        => 'text',
539   },
540
541   {
542     'key'         => 'shellmachines',
543     'section'     => 'shell',
544     'description' => 'Your Linux and System V flavored shell (and mail) machines, one per line.  This enables export of `/etc/passwd\' and `/etc/shadow\' files.',
545      'type'        => 'textarea',
546  },
547
548   {
549     'key'         => 'shells',
550     'section'     => 'required',
551     'description' => 'Legal shells (think /etc/shells).  You probably want to `cut -d: -f7 /etc/passwd | sort | uniq\' initially so that importing doesn\'t fail with `Illegal shell\' errors, then remove any special entries afterwords.  A blank line specifies that an empty shell is permitted.',
552     'type'        => 'textarea',
553   },
554
555   {
556     'key'         => 'showpasswords',
557     'section'     => 'UI',
558     'description' => 'Display unencrypted user passwords in the web interface',
559     'type'        => 'checkbox',
560   },
561
562   {
563     'key'         => 'signupurl',
564     'section'     => 'UI',
565     'description' => 'if you are using customer-to-customer referrals, and you enter the URL of your <a href="../docs/signup.html">signup server CGI</a>, the customer view screen will display a customized link to the signup server with the appropriate customer as referral',
566     'type'        => 'text',
567   },
568
569   {
570     'key'         => 'smtpmachine',
571     'section'     => 'required',
572     'description' => 'SMTP relay for Freeside\'s outgoing mail',
573     'type'        => 'text',
574   },
575
576   {
577     'key'         => 'soadefaultttl',
578     'section'     => 'BIND',
579     'description' => 'SOA default TTL for new domains.',
580     'type'        => 'text',
581   },
582
583   {
584     'key'         => 'soaemail',
585     'section'     => 'BIND',
586     'description' => 'SOA email for new domains, in BIND form (`.\' instead of `@\'), with trailing `.\'',
587     'type'        => 'text',
588   },
589
590   {
591     'key'         => 'soaexpire',
592     'section'     => 'BIND',
593     'description' => 'SOA expire for new domains',
594     'type'        => 'text',
595   },
596
597   {
598     'key'         => 'soamachine',
599     'section'     => 'BIND',
600     'description' => 'SOA machine for new domains, with trailing `.\'',
601     'type'        => 'text',
602   },
603
604   {
605     'key'         => 'soarefresh',
606     'section'     => 'BIND',
607     'description' => 'SOA refresh for new domains',
608     'type'        => 'text',
609   },
610
611   {
612     'key'         => 'soaretry',
613     'section'     => 'BIND',
614     'description' => 'SOA retry for new domains',
615     'type'        => 'text',
616   },
617
618   {
619     'key'         => 'statedefault',
620     'section'     => 'UI',
621     'description' => 'Default state or province (if not supplied, the default is `CA\')',
622     'type'        => 'text',
623   },
624
625   {
626     'key'         => 'textradiusprepend',
627     'section'     => 'depreciated',
628     'description' => '<b>DEPRECIATED</b>, use RADIUS check attributes instead.  This option will be removed soon.  The contents will be prepended to the first line of a user\'s RADIUS entry in text exports.',
629     'type'        => 'text',
630   },
631
632   {
633     'key'         => 'unsuspendauto',
634     'section'     => 'billing',
635     'description' => 'Enables the automatic unsuspension of suspended packages when a customer\'s balance due changes from positive to zero or negative as the result of a payment or credit',
636     'type'        => 'checkbox',
637   },
638
639   {
640     'key'         => 'usernamemin',
641     'section'     => 'username',
642     'description' => 'Minimum username length (default 2)',
643     'type'        => 'text',
644   },
645
646   {
647     'key'         => 'usernamemax',
648     'section'     => 'username',
649     'description' => 'Maximum username length',
650     'type'        => 'text',
651   },
652
653   {
654     'key'         => 'username-ampersand',
655     'section'     => 'username',
656     'description' => 'Allow the ampersand character (&amp;) in usernames.  Be careful when using this option in conjunction with <a href="#shellmachine-useradd">shellmachine-useradd</a> and other configuration options which execute shell commands, as the ampersand will be interpreted by the shell if not quoted.',
657     'type'        => 'checkbox',
658   },
659
660   {
661     'key'         => 'username-letter',
662     'section'     => 'username',
663     'description' => 'Usernames must contain at least one letter',
664     'type'        => 'checkbox',
665   },
666
667   {
668     'key'         => 'username-letterfirst',
669     'section'     => 'username',
670     'description' => 'Usernames must start with a letter',
671     'type'        => 'checkbox',
672   },
673
674   {
675     'key'         => 'username-noperiod',
676     'section'     => 'username',
677     'description' => 'Disallow periods in usernames',
678     'type'        => 'checkbox',
679   },
680
681   {
682     'key'         => 'username-uppercase',
683     'section'     => 'username',
684     'description' => 'Allow uppercase characters in usernames',
685     'type'        => 'checkbox',
686   },
687
688   {
689     'key'         => 'username_policy',
690     'section'     => '',
691     'description' => 'This file controls the mechanism for preventing duplicate usernames in passwd/radius files exported from svc_accts.  This should be one of \'prepend domsvc\' \'append domsvc\' or \'append domain\'',
692 #    'type'        => 'select',
693     'type'        => 'text',
694   },
695
696   {
697     'key'         => 'vpopmailmachines',
698     'section'     => 'mail',
699     'description' => 'Your vpopmail pop toasters, one per line.  Each line is of the form "machinename vpopdir vpopuid vpopgid".  For example: <code>poptoaster.domain.tld /home/vpopmail 508 508</code>  Note: vpopuid and vpopgid are values taken from the vpopmail machine\'s /etc/passwd',
700     'type'        => 'textarea',
701   },
702
703 );
704
705 1;
706