radiusprepend config file for DEFAULT entries etc.
[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     chmod 0644, "$dir/$file";
133     my $fh = new IO::File ">$dir/$file" or return;
134     chmod 0644, "$dir/$file";
135     print $fh "$value\n";
136   }
137 }
138 #sub is_tainted {
139 #             return ! eval { join('',@_), kill 0; 1; };
140 #         }
141
142 =item delete
143
144 =cut
145
146 sub delete {
147   my($self, $file) = @_;
148   my $dir = $self->dir;
149   if ( $self->exists($file) ) {
150     warn "[FS::Conf] DELETE $file\n";
151     unlink "$dir/$file";
152   }
153 }
154
155 =item config_items
156
157 Returns all of the possible configuration items as FS::ConfItem objects.  See
158 L<FS::ConfItem>.
159
160 =cut
161
162 sub config_items {
163 #  my $self = shift; 
164   @config_items;
165 }
166
167 =back
168
169 =head1 BUGS
170
171 Write access (touch, set, delete) should be documented.
172
173 If this was more than just crud that will never be useful outside Freeside I'd
174 worry that config_items is freeside-specific and icky.
175
176 =head1 SEE ALSO
177
178 "Configuration" in the web interface (config/config.cgi).
179
180 httemplate/docs/config.html
181
182 =cut
183
184 @config_items = map { new FS::ConfItem $_ } (
185
186   {
187     'key'         => 'address',
188     'section'     => 'depreciated',
189     'description' => 'This configuration option is no longer used.  See <a href="#invoice_template">invoice_template</a> instead.',
190     'type'        => 'text',
191   },
192
193   {
194     'key'         => 'apacheroot',
195     'section'     => 'apache',
196     'description' => 'The directory containing Apache virtual hosts',
197     'type'        => 'text',
198   },
199
200   {
201     'key'         => 'apachemachine',
202     'section'     => 'apache',
203     '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.',
204     'type'        => 'text',
205   },
206
207   {
208     'key'         => 'apachemachines',
209     'section'     => 'apache',
210     '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.',
211     'type'        => 'textarea',
212   },
213
214   {
215     'key'         => 'bindprimary',
216     'section'     => 'BIND',
217     'description' => 'Your BIND primary nameserver.  This enables export of /var/named/named.conf and zone files into /var/named',
218     'type'        => 'text',
219   },
220
221   {
222     'key'         => 'bindsecondaries',
223     'section'     => 'BIND',
224     'description' => 'Your BIND secondary nameservers, one per line.  This enables export of /var/named/named.conf',
225     'type'        => 'textarea',
226   },
227
228   {
229     'key'         => 'business-onlinepayment',
230     'section'     => 'billing',
231     '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.',
232     'type'        => 'textarea',
233   },
234
235   {
236     'key'         => 'bsdshellmachines',
237     'section'     => 'shell',
238     'description' => 'Your BSD flavored shell (and mail) machines, one per line.  This enables export of `/etc/passwd\' and `/etc/master.passwd\'.',
239     'type'        => 'textarea',
240   },
241
242   {
243     'key'         => 'countrydefault',
244     'section'     => 'UI',
245     'description' => 'Default two-letter country code (if not supplied, the default is `US\')',
246     'type'        => 'text',
247   },
248
249   {
250     'key'         => 'cybercash3.2',
251     'section'     => 'billing',
252     '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\').',
253     'type'        => 'textarea',
254   },
255
256   {
257     'key'         => 'cyrus',
258     'section'     => 'mail',
259     '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.',
260     'type'        => 'textarea',
261   },
262
263   {
264     'key'         => 'deletecustomers',
265     'section'     => 'UI',
266     '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.',
267     'type'        => 'checkbox',
268   },
269
270   {
271     'key'         => 'dirhash',
272     'section'     => 'shell',
273     '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>',
274     'type'        => 'text',
275   },
276
277   {
278     'key'         => 'disable_customer_referrals',
279     'section'     => 'UI',
280     'description' => 'Disable new customer-to-customer referrals in the web interface',
281     'type'        => 'checkbox',
282   },
283
284   {
285     'key'         => 'domain',
286     'section'     => 'depreciated',
287     'description' => 'Your domain name.',
288     'type'        => 'text',
289   },
290
291   {
292     'key'         => 'editreferrals',
293     'section'     => 'UI',
294     'description' => 'Enable referral modification for existing customers',
295     'type'       => 'checkbox',
296   },
297
298   {
299     'key'         => 'emailinvoiceonly',
300     'section'     => 'billing',
301     'description' => 'Disables postal mail invoices',
302     'type'       => 'checkbox',
303   },
304
305   {
306     'key'         => 'disablepostalinvoicedefault',
307     'section'     => 'billing',
308     '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>.',
309     'type'       => 'checkbox',
310   },
311
312   {
313     'key'         => 'emailinvoiceauto',
314     'section'     => 'billing',
315     'description' => 'Automatically adds new accounts to the email invoice list upon customer creation',
316     'type'       => 'checkbox',
317   },
318
319   {
320     'key'         => 'erpcdmachines',
321     'section'     => '',
322     'description' => 'Your ERPCD authenticaion machines, one per line.  This enables export of `/usr/annex/acp_passwd\' and `/usr/annex/acp_dialup\'',
323     'type'        => 'textarea',
324   },
325
326   {
327     'key'         => 'hidecancelledpackages',
328     'section'     => 'UI',
329     'description' => 'Prevent cancelled packages from showing up in listings (though they will still be in the database)',
330     'type'        => 'checkbox',
331   },
332
333   {
334     'key'         => 'hidecancelledcustomers',
335     'section'     => 'UI',
336     'description' => 'Prevent customers with only cancelled packages from showing up in listings (though they will still be in the database)',
337     'type'        => 'checkbox',
338   },
339
340   {
341     'key'         => 'home',
342     'section'     => 'required',
343     'description' => 'For new users, prefixed to username to create a directory name.  Should have a leading but not a trailing slash.',
344     'type'        => 'text',
345   },
346
347   {
348     'key'         => 'icradiusmachines',
349     'section'     => 'radius',
350     '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.',
351     'type'        => [qw( checkbox textarea )],
352   },
353
354   {
355     'key'         => 'icradius_mysqldest',
356     'section'     => 'radius',
357     'description' => 'Destination directory for the MySQL databases, on the ICRADIUS/FreeRADIUS machines.  Defaults to "/usr/local/var/".',
358     'type'        => 'text',
359   },
360
361   {
362     'key'         => 'icradius_mysqlsource',
363     'section'     => 'radius',
364     'description' => 'Source directory for for the MySQL radcheck table files, on the Freeside machine.  Defaults to "/usr/local/var/freeside".',
365     'type'        => 'text',
366   },
367
368   {
369     'key'         => 'icradius_secrets',
370     'section'     => 'radius',
371     '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.',
372     'type'        => 'textarea',
373   },
374
375   {
376     'key'         => 'invoice_from',
377     'section'     => 'required',
378     'description' => 'Return address on email invoices',
379     'type'        => 'text',
380   },
381
382   {
383     'key'         => 'invoice_template',
384     'section'     => 'required',
385     'description' => 'Required template file for invoices.  See the <a href="../docs/billing.html">billing documentation</a> for details.',
386     'type'        => 'textarea',
387   },
388
389   {
390     'key'         => 'lpr',
391     'section'     => 'required',
392     'description' => 'Print command for paper invoices, for example `lpr -h\'',
393     'type'        => 'text',
394   },
395
396   {
397     'key'         => 'maildisablecatchall',
398     'section'     => 'depreciated',
399     '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.',
400     'type'        => 'checkbox',
401   },
402
403   {
404     'key'         => 'money_char',
405     'section'     => '',
406     'description' => 'Currency symbol - defaults to `$\'',
407     'type'        => 'text',
408   },
409
410   {
411     'key'         => 'mxmachines',
412     'section'     => 'BIND',
413     'description' => 'MX entries for new domains, weight and machine, one per line, with trailing `.\'',
414     'type'        => 'textarea',
415   },
416
417   {
418     'key'         => 'nsmachines',
419     'section'     => 'BIND',
420     'description' => 'NS nameservers for new domains, one per line, with trailing `.\'',
421     'type'        => 'textarea',
422   },
423
424   {
425     'key'         => 'nismachines',
426     'section'     => 'shell',
427     'description' => 'Your NIS master (not slave master) machines, one per line.  This enables export of `/etc/global/passwd\' and `/etc/global/shadow\'.',
428     'type'        => 'textarea',
429   },
430
431   {
432     'key'         => 'passwordmin',
433     'section'     => 'password',
434     'description' => 'Minimum password length (default 6)',
435     'type'        => 'text',
436   },
437
438   {
439     'key'         => 'passwordmax',
440     'section'     => 'password',
441     'description' => 'Maximum password length (default 8) (don\'t set this over 12 if you need to import or export crypt() passwords)',
442     'type'        => 'text',
443   },
444
445   {
446     'key'         => 'qmailmachines',
447     'section'     => 'mail',
448     '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.',
449     'type'        => [qw( checkbox textarea )],
450   },
451
452   {
453     'key'         => 'radiusmachines',
454     'section'     => 'radius',
455     'description' => 'Your RADIUS authentication machines, one per line.  This enables export of `/etc/raddb/users\'.',
456     'type'        => 'textarea',
457   },
458
459   {
460     'key'         => 'referraldefault',
461     'section'     => 'UI',
462     'description' => 'Default referral, specified by refnum',
463     'type'        => 'text',
464   },
465
466 #  {
467 #    'key'         => 'registries',
468 #    'section'     => 'required',
469 #    'description' => 'Directory which contains domain registry information.  Each registry is a directory.',
470 #  },
471
472   {
473     'key'         => 'maxsearchrecordsperpage',
474     'section'     => 'UI',
475     'description' => 'If set, number of search records to return per page.',
476     'type'        => 'text',
477   },
478
479   {
480     'key'         => 'sendmailconfigpath',
481     'section'     => 'mail',
482     'description' => 'Sendmail configuration file path.  Defaults to `/etc\'.  Many newer distributions use `/etc/mail\'.',
483     'type'        => 'text',
484   },
485
486   {
487     'key'         => 'sendmailmachines',
488     'section'     => 'mail',
489     'description' => 'Your sendmail machines, one per line.  This enables export of `/etc/virtusertable\' and `/etc/sendmail.cw\'.',
490     'type'        => 'textarea',
491   },
492
493   {
494     'key'         => 'sendmailrestart',
495     'section'     => 'mail',
496     'description' => 'If defined, the command which is run on sendmail machines after files are copied.',
497     'type'        => 'text',
498   },
499
500   {
501     'key'         => 'session-start',
502     'section'     => 'session',
503     '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.',
504     'type'        => 'text',
505   },
506
507   {
508     'key'         => 'session-stop',
509     'section'     => 'session',
510     '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.',
511     'type'        => 'text',
512   },
513
514   {
515     'key'         => 'shellmachine',
516     'section'     => 'shell',
517     '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.',
518     'type'        => 'text',
519   },
520
521   {
522     'key'         => 'shellmachine-useradd',
523     'section'     => 'shell',
524     '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>.',
525     'type'        => [qw( checkbox text )],
526   },
527
528   {
529     'key'         => 'shellmachine-userdel',
530     'section'     => 'shell',
531     '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>.',
532     'type'        => [qw( checkbox text )],
533   },
534
535   {
536     'key'         => 'shellmachine-usermod',
537     'section'     => 'shell',
538     '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>.',
539     #'type'        => [qw( checkbox text )],
540     'type'        => 'text',
541   },
542
543   {
544     'key'         => 'shellmachines',
545     'section'     => 'shell',
546     'description' => 'Your Linux and System V flavored shell (and mail) machines, one per line.  This enables export of `/etc/passwd\' and `/etc/shadow\' files.',
547      'type'        => 'textarea',
548  },
549
550   {
551     'key'         => 'shells',
552     'section'     => 'required',
553     '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.',
554     'type'        => 'textarea',
555   },
556
557   {
558     'key'         => 'showpasswords',
559     'section'     => 'UI',
560     'description' => 'Display unencrypted user passwords in the web interface',
561     'type'        => 'checkbox',
562   },
563
564   {
565     'key'         => 'signupurl',
566     'section'     => 'UI',
567     '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',
568     'type'        => 'text',
569   },
570
571   {
572     'key'         => 'smtpmachine',
573     'section'     => 'required',
574     'description' => 'SMTP relay for Freeside\'s outgoing mail',
575     'type'        => 'text',
576   },
577
578   {
579     'key'         => 'soadefaultttl',
580     'section'     => 'BIND',
581     'description' => 'SOA default TTL for new domains.',
582     'type'        => 'text',
583   },
584
585   {
586     'key'         => 'soaemail',
587     'section'     => 'BIND',
588     'description' => 'SOA email for new domains, in BIND form (`.\' instead of `@\'), with trailing `.\'',
589     'type'        => 'text',
590   },
591
592   {
593     'key'         => 'soaexpire',
594     'section'     => 'BIND',
595     'description' => 'SOA expire for new domains',
596     'type'        => 'text',
597   },
598
599   {
600     'key'         => 'soamachine',
601     'section'     => 'BIND',
602     'description' => 'SOA machine for new domains, with trailing `.\'',
603     'type'        => 'text',
604   },
605
606   {
607     'key'         => 'soarefresh',
608     'section'     => 'BIND',
609     'description' => 'SOA refresh for new domains',
610     'type'        => 'text',
611   },
612
613   {
614     'key'         => 'soaretry',
615     'section'     => 'BIND',
616     'description' => 'SOA retry for new domains',
617     'type'        => 'text',
618   },
619
620   {
621     'key'         => 'statedefault',
622     'section'     => 'UI',
623     'description' => 'Default state or province (if not supplied, the default is `CA\')',
624     'type'        => 'text',
625   },
626
627   {
628     'key'         => 'radiusprepend',
629     'section'     => 'radius',
630     'description' => 'The contents will be prepended to the top of the RADIUS users file (text exports only).',
631     'type'        => 'textarea',
632   },
633
634   {
635     'key'         => 'textradiusprepend',
636     'section'     => 'depreciated',
637     '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.',
638     'type'        => 'text',
639   },
640
641   {
642     'key'         => 'unsuspendauto',
643     'section'     => 'billing',
644     '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',
645     'type'        => 'checkbox',
646   },
647
648   {
649     'key'         => 'usernamemin',
650     'section'     => 'username',
651     'description' => 'Minimum username length (default 2)',
652     'type'        => 'text',
653   },
654
655   {
656     'key'         => 'usernamemax',
657     'section'     => 'username',
658     'description' => 'Maximum username length',
659     'type'        => 'text',
660   },
661
662   {
663     'key'         => 'username-ampersand',
664     'section'     => 'username',
665     '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.',
666     'type'        => 'checkbox',
667   },
668
669   {
670     'key'         => 'username-letter',
671     'section'     => 'username',
672     'description' => 'Usernames must contain at least one letter',
673     'type'        => 'checkbox',
674   },
675
676   {
677     'key'         => 'username-letterfirst',
678     'section'     => 'username',
679     'description' => 'Usernames must start with a letter',
680     'type'        => 'checkbox',
681   },
682
683   {
684     'key'         => 'username-noperiod',
685     'section'     => 'username',
686     'description' => 'Disallow periods in usernames',
687     'type'        => 'checkbox',
688   },
689
690   {
691     'key'         => 'username-uppercase',
692     'section'     => 'username',
693     'description' => 'Allow uppercase characters in usernames',
694     'type'        => 'checkbox',
695   },
696
697   {
698     'key'         => 'username_policy',
699     'section'     => '',
700     '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\'',
701 #    'type'        => 'select',
702     'type'        => 'text',
703   },
704
705   {
706     'key'         => 'vpopmailmachines',
707     'section'     => 'mail',
708     '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',
709     'type'        => 'textarea',
710   },
711
712 );
713
714 1;
715