Handle hostnames with upper-case letters
[webmin.git] / postfix / virtual.cgi
1 #!/usr/local/bin/perl
2 #
3 # postfix-module by Guillaume Cottenceau <gc@mandrakesoft.com>,
4 # for webmin by Jamie Cameron
5
6 # Manages virtuals for Postfix
7 #
8 # << Here are all options seen in Postfix sample-virtual.cf >>
9
10
11 require './postfix-lib.pl';
12
13 $access{'virtual'} || &error($text{'virtual_ecannot'});
14 &ui_print_header(undef, $text{'virtual_title'}, "", "virtual");
15
16
17 # alias general options
18 print &ui_form_start("save_opts_virtual.cgi");
19 print &ui_table_start($text{'virtual_title'}, "width=100%", 2);
20
21 &option_mapfield($virtual_maps, 60);
22
23 if ($postfix_version >= 2) {
24         &option_radios_freefield("virtual_alias_domains", 40,
25                                  $text{'virtual_same'});
26         }
27
28 print &ui_table_end();
29 print &ui_form_end([ [ undef, $text{'opts_save'} ] ]);
30
31 # Current map contents
32 print &ui_hr();
33 if (&get_real_value($virtual_maps) eq "")
34 {
35     print ($text{'no_map'}."<br><br>");
36 }
37 else
38 {
39     &generate_map_edit($virtual_maps, $text{'map_click'}." ".
40                        &hlink($text{'help_map_format'}, "virtual"));
41 }
42
43 &ui_print_footer("", $text{'index_return'});