3 # postfix-module by Guillaume Cottenceau <gc@mandrakesoft.com>,
4 # for webmin by Jamie Cameron
6 # A form for controlling general parameters.
8 # << Here are all options seen in Postfix sample-misc.cf >>
10 require './postfix-lib.pl';
13 $access{'general'} || &error($text{'general_ecannot'});
14 &ui_print_header(undef, $text{'general_title'}, "", "general_opts");
16 $default = $text{'opts_default'};
17 $none = $text{'opts_none'};
18 $no_ = $text{'opts_no'};
21 print &ui_form_start("save_opts_misc.cgi", "post");
22 print &ui_table_start($text{'general_title_sensible'}, "width=100%", 4);
24 &option_radios_freefield("myorigin", 30, $text{'opts_myorigin_as_myhostname'},
25 '$mydomain', $text{'opts_myorigin_as_mydomain'});
27 &option_radios_freefield("mydestination", 60, $text{'opts_mydestination_default'},
28 '$myhostname, localhost.$mydomain, $mydomain', $text{'opts_mydestination_domainwide'});
30 $v = &if_default_value("notify_classes") ? "" :
31 &get_current_value("notify_classes");
32 @v = split(/[, ]+/, $v);
33 print &ui_table_row(&hlink($text{'opts_notify_classes'},
34 'opts_notify_classes'),
35 &ui_radio("notify_classes_def",
36 $v ? "__USE_FREE_FIELD__"
37 : "__DEFAULT_VALUE_IE_NOT_IN_CONFIG_FILE__",
38 [ [ "__DEFAULT_VALUE_IE_NOT_IN_CONFIG_FILE__",
40 [ "__USE_FREE_FIELD__",
41 $text{'opts_notify_classes_sel'} ] ]).
43 &ui_select("notify_classes", \@v,
44 [ [ "bounce", "bounce - Bounced mail" ],
45 [ "2bounce", "2bounce - Double-bounced mail" ],
46 [ "delay", "delay - Delayed mail" ],
47 [ "policy", "policy - Policy rejected clients" ],
48 [ "protocol", "protocol - Client protocol errors" ],
49 [ "resource", "resource - Resource problems" ],
50 [ "software", "software - Software problems" ] ],
53 print &ui_table_end();
54 print &ui_table_start($text{'general_title_others'}, "width=100%", 4);
56 &option_radios_freefield("relayhost", 45, $text{'opts_direct'});
58 &option_radios_freefield("always_bcc", 40, $text{'opts_always_bcc_none'});
60 &option_freefield("daemon_timeout", 15);
61 &option_freefield("default_database_type", 15);
63 &option_freefield("default_transport", 15);
64 &option_freefield("double_bounce_sender", 15);
66 &option_freefield("hash_queue_depth", 15);
67 &option_freefield("hash_queue_names", 15);
69 &option_freefield("hopcount_limit", 15);
70 &option_radios_freefield("delay_warning_time", 15, $text{'opts_delay_warning_time_default2'});
72 &option_radios_freefield("inet_interfaces", 40, $text{'opts_all_interfaces'});
74 &option_freefield("ipc_idle", 15);
75 &option_freefield("ipc_timeout", 15);
77 &option_freefield("mail_name", 15);
78 &option_freefield("mail_owner", 15);
80 &option_freefield("mail_version", 25);
82 &option_freefield("max_idle", 15);
83 &option_freefield("max_use", 15);
85 &option_radios_freefield("myhostname", 40, $text{'opts_myhostname_default'});
87 &option_radios_freefield("mydomain", 40, $text{'opts_mydomain_default'});
89 &option_radios_freefield("mynetworks", 60, $text{'opts_mynetworks_default'});
91 &option_select("mynetworks_style",
92 [ [ "", $text{'default'} ],
93 [ "subnet", $text{'opts_mynetworks_subnet'} ],
94 [ "class", $text{'opts_mynetworks_class'} ],
95 [ "host", $text{'opts_mynetworks_host'} ] ]);
97 &option_radios_freefield("bounce_notice_recipient", 15, $default);
98 &option_radios_freefield("2bounce_notice_recipient", 15, $default);
100 &option_radios_freefield("delay_notice_recipient", 15, $default);
101 &option_radios_freefield("error_notice_recipient", 15, $default);
103 &option_freefield("queue_directory", 45);
105 &option_freefield("process_id_directory", 20);
106 &option_freefield("recipient_delimiter", 20);
108 if ($postfix_version < 2.1) {
109 &option_freefield("program_directory", 45);
112 &option_radios_freefield("relocated_maps", 60, $text{'opts_relocated_maps_default'});
114 &option_yesno("sun_mailtool_compatibility", 'help');
115 &option_freefield("trigger_timeout", 15);
117 &option_radios_freefield("content_filter", 60, $text{'opts_content_filter_default'});
119 print &ui_table_end();
120 print &ui_form_end([ [ undef, $text{'opts_save'} ] ]);
122 &ui_print_footer("", $text{'index_return'});