Handle hostnames with upper-case letters
[webmin.git] / sendmail / list_masq.cgi
1 #!/usr/local/bin/perl
2 # list_masq.cgi
3 # List domains for which masquerading is done
4
5 require './sendmail-lib.pl';
6 $access{'masq'} || &error($text{'masq_ecannot'});
7 &ui_print_header(undef, $text{'masq_title'}, "");
8 $conf = &get_sendmailcf();
9
10 # Get the domain we masquerade as
11 foreach $d (&find_type("D", $conf)) {
12         if ($d->{'value'} =~ /^M\s*(\S*)/) { $masq = $1; }
13         }
14
15 # Get masquerading domains
16 @mlist = &get_file_or_config($conf, "M");
17
18 # Get non-masqueraded domains
19 @nlist = &get_file_or_config($conf, "N");
20
21 # Introduction text
22 print &text('masq_desc1', 'list_generics.cgi'),"<p>\n";
23 print $text{'masq_desc2'},"<p>\n";
24
25
26 print &ui_form_start("save_masq.cgi", "form-data");
27 print &ui_table_start(undef, undef, 2);
28
29 # Masquerade as domain
30 print &ui_table_row($text{'masq_domain'},
31         &ui_textbox("masq", $masq, 60));
32
33 # Domains to masquerade
34 print &ui_table_row($text{'masq_domains'},
35         &ui_textarea("mlist", join("\n", @mlist), 8, 60));
36
37 # Domains to not masquerade
38 print &ui_table_row($text{'masq_ndomains'},
39         &ui_textarea("nlist", join("\n", @nlist), 8, 60));
40
41 print &ui_table_end();
42 print &ui_form_end([ [ undef, $text{'save'} ] ]);
43
44 &ui_print_footer("", $text{'index_return'});
45