#!/usr/bin/perl # Show a form for selecting the source for a map require './postfix-lib.pl'; &ReadParse(); &popup_header($text{'chooser_title'}); # Parse into files @maps = &get_maps_types_files($in{'map'}); push(@maps, [ ]); @sources = &list_mysql_sources(); print &ui_form_start("map_chooser_save.cgi", "post"); print &ui_hidden("map", $in{'map'}); print &ui_hidden("mapname", $in{'mapname'}); $i = 0; foreach $tv (@maps) { print &ui_hidden_table_start(&text('chooser_header', $i+1), "width=100%", 2, "section$i", $tv->[0] || $i == 0, [ "width=30%" ]); # Work out type $t = $tv->[0] eq "" ? "" : $tv->[0] eq "hash" ? "hash" : $tv->[0] eq "regexp" ? "regexp" : $tv->[0] eq "pcre" && &supports_map_type("pcre") ? "pcre" : $tv->[0] eq "mysql" && &supports_map_type("mysql") && $tv->[1] =~ /^[\/\.]/ ? "mysql" : $tv->[0] eq "mysql" && &supports_map_type("mysql") && $tv->[1] !~ /^[\/\.]/ ? "mysqlsrc" : $tv->[0] eq "ldap" && &supports_map_type("ldap") ? "ldap" : "other"; # For MySQL, read config file and generate inputs $myconf = { }; if ($t eq "mysql") { $myconf = &get_backend_config($tv->[1]); } $mtable = &ui_table_start(undef, "width=100%", 2, [ "nowrap", "nowrap" ]); $mtable .= &ui_table_row($text{'chooser_mhosts'}, &ui_opt_textbox("mhosts_$i", $myconf->{'hosts'}, 30, "<tt>localhost</tt>")); $mtable .= &ui_table_row($text{'chooser_muser'}, &ui_textbox("muser_$i", $myconf->{'user'}, 30)); $mtable .= &ui_table_row($text{'chooser_mpassword'}, &ui_textbox("mpassword_$i", $myconf->{'password'}, 30)); $mtable .= &ui_table_row($text{'chooser_mdbname'}, &ui_textbox("mdbname_$i", $myconf->{'dbname'}, 30)); if (&compare_version_numbers($postfix_version, 2.2) >= 0) { # Can use custom query $mtable .= &ui_table_row($text{'chooser_mquery'}, &ui_opt_textbox("mquery_$i", $myconf->{'query'}, 40, $text{'chooser_none'})); } $mtable .= &ui_table_row($text{'chooser_mtable'}, &ui_textbox("mtable_$i", $myconf->{'table'}, 30)); $mtable .= &ui_table_row($text{'chooser_mwhere_field'}, &ui_textbox("mwhere_field_$i", $myconf->{'where_field'}, 30)); $mtable .= &ui_table_row($text{'chooser_mselect_field'}, &ui_textbox("mselect_field_$i", $myconf->{'select_field'}, 30)); $mtable .= &ui_table_row($text{'chooser_madditional_conditions'}, &ui_opt_textbox("madditional_conditions_$i", $myconf->{'additional_conditions'}, 30, $text{'chooser_none'})); $mtable .= &ui_table_end(); # For LDAP, read config and generate inputs too $lconf = { }; if ($t eq "ldap") { $lconf = &get_backend_config($tv->[1]); } $ltable = &ui_table_start(undef, "width=100%", 2, [ "nowrap", "nowrap" ]); $ltable .= &ui_table_row($text{'chooser_lserver_host'}, &ui_opt_textbox("lserver_host_$i", $lconf->{'server_host'}, 30, "<tt>localhost</tt>")); $ltable .= &ui_table_row($text{'chooser_lserver_port'}, &ui_opt_textbox("lserver_port_$i", $lconf->{'server_port'}, 5, "$text{'default'} (389)")); $ltable .= &ui_table_row($text{'chooser_lstart_tls'}, &ui_radio("lstart_tls_$i", $lconf->{'start_tls'} || 'no', [ [ 'yes', $text{'yes'} ], [ 'no', $text{'no'} ] ])); $ltable .= &ui_table_row($text{'chooser_lsearch_base'}, &ui_textbox("lsearch_base_$i", $lconf->{'search_base'}, 50)); $ltable .= &ui_table_row($text{'chooser_lquery_filter'}, &ui_opt_textbox("lquery_filter_$i", $lconf->{'query_filter'},50, "$text{'default'} (<tt>mailacceptinggeneralid=%s</tt>)<br>", $text{'chooser_lfilter'})); $ltable .= &ui_table_row($text{'chooser_lresult_attribute'}, &ui_opt_textbox("lresult_attribute_$i", $lconf->{'result_attribute'}, 20, "$text{'default'} (<tt>maildrop</tt>)<br>", $text{'chooser_lattribute'})); $ltable .= &ui_table_row($text{'chooser_lscope'}, &ui_select("lscope_$i", $lconf->{'scope'}, [ [ "", "$text{'default'} ($text{'chooser_lsub'})" ], map { [ $_, $text{'chooser_l'.$_} ] } ('sub', 'base', 'one') ])); $ltable .= &ui_table_row($text{'chooser_lbind'}, &ui_radio("lbind_$i", $lconf->{'bind'} || 'yes', [ [ 'yes', $text{'yes'} ], [ 'no', $text{'no'} ] ])); $ltable .= &ui_table_row($text{'chooser_lbind_dn'}, &ui_opt_textbox("lbind_dn_$i", $lconf->{'bind_dn'}, 40, $text{'chooser_none'})); $ltable .= &ui_table_row($text{'chooser_lbind_pw'}, &ui_opt_textbox("lbind_pw_$i", $lconf->{'bind_pw'}, 20, $text{'chooser_none'})); $ltable .= &ui_table_end(); # Generate possible modes @opts = ( ); push(@opts, [ "", $text{'chooser_none'} ]); push(@opts, [ "hash", $text{'chooser_hash'}, &ui_textbox("hash_$i", $t eq "hash" ? $tv->[1] : undef, 50) ]); push(@opts, [ "regexp", $text{'chooser_regexp'}, &ui_textbox("regexp_$i", $t eq "regexp" ? $tv->[1] : undef, 50) ]); if (&supports_map_type("pcre")) { push(@opts, [ "pcre", $text{'chooser_pcre'}, &ui_textbox("pcre_$i", $t eq "pcre" ? $tv->[1] : undef, 50) ]); } if (&supports_map_type("mysql")) { push(@opts, [ "mysql", $text{'chooser_mysql'}, $mtable ]); if (@sources || $t eq "mysqlsrc") { push(@opts, [ "mysqlsrc", $text{'chooser_mysqlsrc'}, &ui_select("mysqlsrc_$i", $t eq "mysqlsrc" ? $tv->[1] : undef, \@sources) ]); } } if (&supports_map_type("ldap")) { push(@opts, [ "ldap", $text{'chooser_ldap'}, $ltable ]); } push(@opts, [ "other", $text{'chooser_other'}, &ui_textbox("other_$i", $t eq "other" ? $tv->[1] : undef, 60) ]); # Display mode selector print &ui_table_row(undef, &ui_radio_table("type_$i", $t, \@opts), 2); print &ui_hidden_table_end(); $i++; } print &ui_form_end([ [ undef, $text{'save'} ] ]); &popup_footer();
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
help | Folder | 0755 |
|
|
images | Folder | 0755 |
|
|
lang | Folder | 0755 |
|
|
CHANGELOG | File | 6.56 KB | 0644 |
|
acl_security.pl | File | 863 B | 0755 |
|
address_rewriting.cgi | File | 1.15 KB | 0755 |
|
aliases-lib.pl | File | 7.93 KB | 0755 |
|
aliases.cgi | File | 2.97 KB | 0755 |
|
autoreply.pl | File | 12.19 KB | 0755 |
|
backup_config.pl | File | 730 B | 0755 |
|
bcc.cgi | File | 1.41 KB | 0755 |
|
body.cgi | File | 951 B | 0755 |
|
boxes-lib.pl | File | 80.37 KB | 0755 |
|
canonical.cgi | File | 1.12 KB | 0755 |
|
canonical_edit.cgi | File | 734 B | 0755 |
|
client.cgi | File | 2.22 KB | 0755 |
|
config | File | 702 B | 0644 |
|
config-AlmaLinux-8.0-ALL | File | 804 B | 0644 |
|
config-CentOS-Linux-7.0-ALL | File | 804 B | 0644 |
|
config-CentOS-Stream-Linux-8.0-ALL | File | 804 B | 0644 |
|
config-CloudLinux-8.0-ALL | File | 804 B | 0644 |
|
config-Oracle-Linux-8.0-ALL | File | 804 B | 0644 |
|
config-Rocky-Linux-8.0-ALL | File | 804 B | 0644 |
|
config-debian-linux-10.0-ALL | File | 804 B | 0644 |
|
config-freebsd | File | 783 B | 0644 |
|
config-freebsd-8-ALL | File | 886 B | 0644 |
|
config-mandrake-linux | File | 721 B | 0644 |
|
config-msc-linux | File | 721 B | 0644 |
|
config-netbsd | File | 721 B | 0644 |
|
config-openSUSE-Linux-15.0-ALL | File | 804 B | 0644 |
|
config-pardus-linux | File | 783 B | 0644 |
|
config-redhat-linux-24.0-ALL | File | 804 B | 0644 |
|
config-syno-linux | File | 998 B | 0644 |
|
config.info | File | 2.54 KB | 0644 |
|
config.info.bg | File | 4.54 KB | 0644 |
|
config.info.ca | File | 2.95 KB | 0644 |
|
config.info.cs | File | 664 B | 0644 |
|
config.info.de | File | 2.77 KB | 0644 |
|
config.info.es | File | 444 B | 0644 |
|
config.info.fr | File | 597 B | 0644 |
|
config.info.hu | File | 0 B | 0644 |
|
config.info.ja | File | 2.92 KB | 0644 |
|
config.info.nl | File | 2.71 KB | 0644 |
|
config.info.no | File | 2.67 KB | 0644 |
|
config.info.pl | File | 554 B | 0644 |
|
config.info.ru | File | 880 B | 0644 |
|
config.info.sv | File | 547 B | 0644 |
|
config.info.tr | File | 437 B | 0644 |
|
config.info.uk | File | 909 B | 0644 |
|
config.info.zh | File | 405 B | 0644 |
|
config.info.zh_TW | File | 453 B | 0644 |
|
debug.cgi | File | 815 B | 0755 |
|
defaultacl | File | 332 B | 0644 |
|
delete_aliases.cgi | File | 820 B | 0755 |
|
delete_mappings.cgi | File | 596 B | 0755 |
|
delete_queues.cgi | File | 1.95 KB | 0755 |
|
dependent.cgi | File | 988 B | 0755 |
|
detach_queue.cgi | File | 651 B | 0755 |
|
edit_access.cgi | File | 676 B | 0755 |
|
edit_afile.cgi | File | 1.08 KB | 0755 |
|
edit_alias.cgi | File | 438 B | 0755 |
|
edit_canonical_mappings.cgi | File | 1.29 KB | 0755 |
|
edit_ffile.cgi | File | 2.05 KB | 0755 |
|
edit_manual.cgi | File | 1.08 KB | 0755 |
|
edit_mapping.cgi | File | 2.75 KB | 0755 |
|
edit_master.cgi | File | 3.15 KB | 0755 |
|
edit_rfile.cgi | File | 3.05 KB | 0755 |
|
filter.pl | File | 1.99 KB | 0755 |
|
flushq.cgi | File | 513 B | 0755 |
|
general.cgi | File | 4.08 KB | 0755 |
|
header.cgi | File | 986 B | 0755 |
|
index.cgi | File | 4.21 KB | 0755 |
|
install_check.pl | File | 384 B | 0755 |
|
ldap.cgi | File | 1.19 KB | 0755 |
|
local_delivery.cgi | File | 1.84 KB | 0755 |
|
log_parser.pl | File | 795 B | 0755 |
|
mailq.cgi | File | 2.44 KB | 0755 |
|
mailq_search.cgi | File | 979 B | 0755 |
|
manual.cgi | File | 996 B | 0755 |
|
manual_update.cgi | File | 610 B | 0755 |
|
map_chooser.cgi | File | 5.58 KB | 0755 |
|
map_chooser_save.cgi | File | 6.54 KB | 0755 |
|
master.cgi | File | 1.26 KB | 0755 |
|
module.info | File | 158 B | 0644 |
|
module.info.af | File | 0 B | 0644 |
|
module.info.af.auto | File | 89 B | 0644 |
|
module.info.ar | File | 0 B | 0644 |
|
module.info.ar.auto | File | 116 B | 0644 |
|
module.info.be | File | 0 B | 0644 |
|
module.info.be.auto | File | 137 B | 0644 |
|
module.info.bg | File | 0 B | 0644 |
|
module.info.bg.auto | File | 126 B | 0644 |
|
module.info.ca | File | 88 B | 0644 |
|
module.info.ca.auto | File | 16 B | 0644 |
|
module.info.cs | File | 29 B | 0644 |
|
module.info.cs.auto | File | 70 B | 0644 |
|
module.info.da | File | 0 B | 0644 |
|
module.info.da.auto | File | 88 B | 0644 |
|
module.info.de | File | 78 B | 0644 |
|
module.info.de.auto | File | 16 B | 0644 |
|
module.info.el | File | 0 B | 0644 |
|
module.info.el.auto | File | 141 B | 0644 |
|
module.info.es | File | 34 B | 0644 |
|
module.info.es.auto | File | 68 B | 0644 |
|
module.info.eu | File | 0 B | 0644 |
|
module.info.eu.auto | File | 95 B | 0644 |
|
module.info.fa | File | 0 B | 0644 |
|
module.info.fa.auto | File | 117 B | 0644 |
|
module.info.fi | File | 0 B | 0644 |
|
module.info.fi.auto | File | 92 B | 0644 |
|
module.info.fr | File | 33 B | 0644 |
|
module.info.fr.auto | File | 73 B | 0644 |
|
module.info.he | File | 0 B | 0644 |
|
module.info.he.auto | File | 117 B | 0644 |
|
module.info.hr | File | 0 B | 0644 |
|
module.info.hr.auto | File | 114 B | 0644 |
|
module.info.hu | File | 30 B | 0644 |
|
module.info.hu.auto | File | 69 B | 0644 |
|
module.info.it | File | 0 B | 0644 |
|
module.info.it.auto | File | 96 B | 0644 |
|
module.info.ja | File | 26 B | 0644 |
|
module.info.ja.auto | File | 77 B | 0644 |
|
module.info.ko | File | 23 B | 0644 |
|
module.info.ko.auto | File | 75 B | 0644 |
|
module.info.lt | File | 0 B | 0644 |
|
module.info.lt.auto | File | 121 B | 0644 |
|
module.info.lv | File | 0 B | 0644 |
|
module.info.lv.auto | File | 103 B | 0644 |
|
module.info.ms | File | 78 B | 0644 |
|
module.info.ms.auto | File | 16 B | 0644 |
|
module.info.mt | File | 0 B | 0644 |
|
module.info.mt.auto | File | 97 B | 0644 |
|
module.info.nl | File | 28 B | 0644 |
|
module.info.nl.auto | File | 63 B | 0644 |
|
module.info.no | File | 30 B | 0644 |
|
module.info.no.auto | File | 61 B | 0644 |
|
module.info.pl | File | 35 B | 0644 |
|
module.info.pl.auto | File | 68 B | 0644 |
|
module.info.pt | File | 0 B | 0644 |
|
module.info.pt.auto | File | 105 B | 0644 |
|
module.info.pt_BR | File | 0 B | 0644 |
|
module.info.pt_BR.auto | File | 114 B | 0644 |
|
module.info.ro | File | 0 B | 0644 |
|
module.info.ro.auto | File | 103 B | 0644 |
|
module.info.ru | File | 35 B | 0644 |
|
module.info.ru.auto | File | 95 B | 0644 |
|
module.info.sk | File | 0 B | 0644 |
|
module.info.sk.auto | File | 102 B | 0644 |
|
module.info.sl | File | 0 B | 0644 |
|
module.info.sl.auto | File | 104 B | 0644 |
|
module.info.sv | File | 30 B | 0644 |
|
module.info.sv.auto | File | 61 B | 0644 |
|
module.info.th | File | 0 B | 0644 |
|
module.info.th.auto | File | 174 B | 0644 |
|
module.info.tr | File | 34 B | 0644 |
|
module.info.tr.auto | File | 70 B | 0644 |
|
module.info.uk | File | 0 B | 0644 |
|
module.info.uk.auto | File | 143 B | 0644 |
|
module.info.ur | File | 0 B | 0644 |
|
module.info.ur.auto | File | 128 B | 0644 |
|
module.info.vi | File | 0 B | 0644 |
|
module.info.vi.auto | File | 100 B | 0644 |
|
module.info.zh | File | 23 B | 0644 |
|
module.info.zh.auto | File | 59 B | 0644 |
|
module.info.zh_TW | File | 26 B | 0644 |
|
module.info.zh_TW.auto | File | 65 B | 0644 |
|
postfinger.cgi | File | 13.89 KB | 0755 |
|
postfix-lib.pl | File | 63.46 KB | 0755 |
|
prefs.info | File | 86 B | 0644 |
|
rate.cgi | File | 1.1 KB | 0755 |
|
reload.cgi | File | 265 B | 0755 |
|
relocated.cgi | File | 954 B | 0755 |
|
resource.cgi | File | 1.49 KB | 0755 |
|
sasl.cgi | File | 3.08 KB | 0755 |
|
save_afile.cgi | File | 580 B | 0755 |
|
save_alias.cgi | File | 2.7 KB | 0755 |
|
save_client.cgi | File | 1.67 KB | 0755 |
|
save_ffile.cgi | File | 860 B | 0755 |
|
save_manual.cgi | File | 665 B | 0755 |
|
save_map.cgi | File | 2.59 KB | 0755 |
|
save_master.cgi | File | 2.33 KB | 0755 |
|
save_opts.cgi | File | 638 B | 0755 |
|
save_opts_aliases.cgi | File | 582 B | 0755 |
|
save_opts_bcc.cgi | File | 464 B | 0755 |
|
save_opts_body.cgi | File | 636 B | 0755 |
|
save_opts_canonical.cgi | File | 716 B | 0755 |
|
save_opts_dependent.cgi | File | 609 B | 0755 |
|
save_opts_header.cgi | File | 650 B | 0755 |
|
save_opts_misc.cgi | File | 629 B | 0755 |
|
save_opts_relocated.cgi | File | 637 B | 0755 |
|
save_opts_sni.cgi | File | 553 B | 0755 |
|
save_opts_transport.cgi | File | 636 B | 0755 |
|
save_opts_virtual.cgi | File | 624 B | 0755 |
|
save_rfile.cgi | File | 1.25 KB | 0755 |
|
save_sasl.cgi | File | 2.95 KB | 0755 |
|
smtp.cgi | File | 2.39 KB | 0755 |
|
smtpd.cgi | File | 2.7 KB | 0755 |
|
sni.cgi | File | 960 B | 0755 |
|
start.cgi | File | 341 B | 0755 |
|
stop.cgi | File | 337 B | 0755 |
|
transport.cgi | File | 955 B | 0755 |
|
view_mailq.cgi | File | 3.49 KB | 0755 |
|
virtual.cgi | File | 1.05 KB | 0755 |
|