Handle hostnames with upper-case letters
[webmin.git] / postfix / smtpd.cgi
1 #!/usr/local/bin/perl
2 #
3 # postfix-module by Guillaume Cottenceau <gc@mandrakesoft.com>,
4 # for webmin by Jamie Cameron
5 #
6 # A form for SMTP server parameters.
7 # modified by Roberto Tecchio, 2005 (www.tecchio.net)
8 #
9 # << Here are all options seen in Postfix sample-smtpd.cf >>
10
11 require './postfix-lib.pl';
12
13 $access{'smtpd'} || &error($text{'smtpd_ecannot'});
14 &ui_print_header(undef, $text{'smtpd_title'}, "");
15
16 $default = $text{'opts_default'};
17 $none = $text{'opts_none'};
18 $no_ = $text{'opts_no'};
19
20 # Form start
21 print &ui_form_start("save_opts.cgi");
22 print &ui_hidden("_log_form", "smtpd");
23 print &ui_table_start($text{'smtpd_title'}, "width=100%", 4);
24
25 &option_radios_freefield("smtpd_banner", 65, $default);
26
27 &option_freefield("smtpd_recipient_limit", 15);
28 &option_yesno("disable_vrfy_command", 'help');
29
30 &option_freefield("smtpd_timeout", 15);
31 &option_freefield("smtpd_error_sleep_time", 15);
32
33 &option_freefield("smtpd_soft_error_limit", 15);
34 &option_freefield("smtpd_hard_error_limit", 15);
35
36 &option_yesno("smtpd_helo_required", 'help');
37 &option_yesno("allow_untrusted_routing", 'help');
38
39 &option_radios_freefield("smtpd_etrn_restrictions", 65, $default);
40
41 &option_radios_freefield("smtpd_helo_restrictions", 65, $default);
42
43 &option_radios_freefield("smtpd_sender_restrictions", 65, $default);
44
45 &option_radios_freefield("smtpd_recipient_restrictions", 65, $default);
46
47 &option_radios_freefield("relay_domains", 65, $default);
48
49 &option_mapfield("relay_recipient_maps", 60);
50
51 &option_freefield("access_map_reject_code", 15, $default);
52 &option_freefield("invalid_hostname_reject_code", 15, $default);
53
54 &option_freefield("maps_rbl_reject_code", 15, $default);
55 &option_freefield("reject_code", 15, $default);
56
57 &option_freefield("relay_domains_reject_code", 15, $default);
58 &option_freefield("unknown_address_reject_code", 15, $default);
59
60 &option_freefield("unknown_client_reject_code", 15, $default);
61 &option_freefield("unknown_hostname_reject_code", 15, $default);
62
63 print &ui_table_end();
64 print &ui_form_end([ [ undef, $text{'opts_save'} ] ]);
65
66 # Current relay map contents
67 print &ui_hr();
68 if (&get_real_value("relay_recipient_maps") eq "")
69 {
70     print ($text{'smtpd_nomap'}."<br><br>");
71 }
72 else
73 {
74     &generate_map_edit("relay_recipient_maps", $text{'map_click'}." ".
75                &hlink($text{'help_map_format'}, "relay_recipient_maps"));
76 }
77
78 &ui_print_footer("", $text{'index_return'});
79