3 # postfix-module by Guillaume Cottenceau <gc@mandrakesoft.com>,
4 # for webmin by Jamie Cameron
6 # A form for SMTP server parameters.
7 # modified by Roberto Tecchio, 2005 (www.tecchio.net)
9 # << Here are all options seen in Postfix sample-smtpd.cf >>
11 require './postfix-lib.pl';
13 $access{'smtpd'} || &error($text{'smtpd_ecannot'});
14 &ui_print_header(undef, $text{'smtpd_title'}, "");
16 $default = $text{'opts_default'};
17 $none = $text{'opts_none'};
18 $no_ = $text{'opts_no'};
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);
25 &option_radios_freefield("smtpd_banner", 65, $default);
27 &option_freefield("smtpd_recipient_limit", 15);
28 &option_yesno("disable_vrfy_command", 'help');
30 &option_freefield("smtpd_timeout", 15);
31 &option_freefield("smtpd_error_sleep_time", 15);
33 &option_freefield("smtpd_soft_error_limit", 15);
34 &option_freefield("smtpd_hard_error_limit", 15);
36 &option_yesno("smtpd_helo_required", 'help');
37 &option_yesno("allow_untrusted_routing", 'help');
39 &option_radios_freefield("smtpd_etrn_restrictions", 65, $default);
41 &option_radios_freefield("smtpd_helo_restrictions", 65, $default);
43 &option_radios_freefield("smtpd_sender_restrictions", 65, $default);
45 &option_radios_freefield("smtpd_recipient_restrictions", 65, $default);
47 &option_radios_freefield("relay_domains", 65, $default);
49 &option_mapfield("relay_recipient_maps", 60);
51 &option_freefield("access_map_reject_code", 15, $default);
52 &option_freefield("invalid_hostname_reject_code", 15, $default);
54 &option_freefield("maps_rbl_reject_code", 15, $default);
55 &option_freefield("reject_code", 15, $default);
57 &option_freefield("relay_domains_reject_code", 15, $default);
58 &option_freefield("unknown_address_reject_code", 15, $default);
60 &option_freefield("unknown_client_reject_code", 15, $default);
61 &option_freefield("unknown_hostname_reject_code", 15, $default);
63 print &ui_table_end();
64 print &ui_form_end([ [ undef, $text{'opts_save'} ] ]);
66 # Current relay map contents
68 if (&get_real_value("relay_recipient_maps") eq "")
70 print ($text{'smtpd_nomap'}."<br><br>");
74 &generate_map_edit("relay_recipient_maps", $text{'map_click'}." ".
75 &hlink($text{'help_map_format'}, "relay_recipient_maps"));
78 &ui_print_footer("", $text{'index_return'});