1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
|
require 'postfix-lib.pl';
# Print the form for security options of postfix module
sub acl_security_form
{
print "<tr>\n<td><b>$text{'acl_resource'}</b></td> <td>\n";
printf "<input type=radio name=resource value=1 %s> $text{'yes'}\n",
$_[0]->{'resource'} ? "checked" : "";
printf "<input type=radio name=resource value=0 %s> $text{'no'}</td>\n",
$_[0]->{'resource'} ? "" : "checked";
print "</tr>\n";
print "<tr>\n<td><b>$text{'acl_address_rewriting'}</b></td> <td>\n";
printf "<input type=radio name=address_rewriting value=1 %s> $text{'yes'}\n",
$_[0]->{'address_rewriting'} ? "checked" : "";
printf "<input type=radio name=address_rewriting value=0 %s> $text{'no'}</td>\n",
$_[0]->{'address_rewriting'} ? "" : "checked";
print "</tr>\n";
print "<tr>\n<td><b>$text{'acl_aliases'}</b></td> <td>\n";
printf "<input type=radio name=aliases value=1 %s> $text{'yes'}\n",
$_[0]->{'aliases'} ? "checked" : "";
printf "<input type=radio name=aliases value=0 %s> $text{'no'}</td>\n",
$_[0]->{'aliases'} ? "" : "checked";
print "</tr>\n";
print "<tr>\n<td><b>$text{'acl_general'}</b></td> <td>\n";
printf "<input type=radio name=general value=1 %s> $text{'yes'}\n",
$_[0]->{'general'} ? "checked" : "";
printf "<input type=radio name=general value=0 %s> $text{'no'}</td>\n",
$_[0]->{'general'} ? "" : "checked";
print "</tr>\n";
print "<tr>\n<td><b>$text{'acl_canonical'}</b></td> <td>\n";
printf "<input type=radio name=canonical value=1 %s> $text{'yes'}\n",
$_[0]->{'canonical'} ? "checked" : "";
printf "<input type=radio name=canonical value=0 %s> $text{'no'}</td>\n",
$_[0]->{'canonical'} ? "" : "checked";
print "</tr>\n";
print "<tr>\n<td><b>$text{'acl_virtual'}</b></td> <td>\n";
printf "<input type=radio name=virtual value=1 %s> $text{'yes'}\n",
$_[0]->{'virtual'} ? "checked" : "";
printf "<input type=radio name=virtual value=0 %s> $text{'no'}</td>\n",
$_[0]->{'virtual'} ? "" : "checked";
print "</tr>\n";
print "<tr>\n<td><b>$text{'acl_transport'}</b></td> <td>\n";
printf "<input type=radio name=transport value=1 %s> $text{'yes'}\n",
$_[0]->{'transport'} ? "checked" : "";
printf "<input type=radio name=transport value=0 %s> $text{'no'}</td>\n",
$_[0]->{'transport'} ? "" : "checked";
print "</tr>\n";
print "<tr>\n<td><b>$text{'acl_relocated'}</b></td> <td>\n";
printf "<input type=radio name=relocated value=1 %s> $text{'yes'}\n",
$_[0]->{'relocated'} ? "checked" : "";
printf "<input type=radio name=relocated value=0 %s> $text{'no'}</td>\n",
$_[0]->{'relocated'} ? "" : "checked";
print "</tr>\n";
print "<tr>\n<td><b>$text{'acl_local_delivery'}</b></td> <td>\n";
printf "<input type=radio name=local_delivery value=1 %s> $text{'yes'}\n",
$_[0]->{'local_delivery'} ? "checked" : "";
printf "<input type=radio name=local_delivery value=0 %s> $text{'no'}</td>\n",
$_[0]->{'local_delivery'} ? "" : "checked";
print "</tr>\n";
print "<tr>\n<td><b>$text{'acl_smtpd'}</b></td> <td>\n";
printf "<input type=radio name=smtpd value=1 %s> $text{'yes'}\n",
$_[0]->{'smtpd'} ? "checked" : "";
printf "<input type=radio name=smtpd value=0 %s> $text{'no'}</td>\n",
$_[0]->{'smtpd'} ? "" : "checked";
print "</tr>\n";
print "<tr>\n<td><b>$text{'acl_smtp'}</b></td> <td>\n";
printf "<input type=radio name=smtp value=1 %s> $text{'yes'}\n",
$_[0]->{'smtp'} ? "checked" : "";
printf "<input type=radio name=smtp value=0 %s> $text{'no'}</td>\n",
$_[0]->{'smtp'} ? "" : "checked";
print "</tr>\n";
print "<tr>\n<td><b>$text{'acl_rate'}</b></td> <td>\n";
printf "<input type=radio name=rate value=1 %s> $text{'yes'}\n",
$_[0]->{'rate'} ? "checked" : "";
printf "<input type=radio name=rate value=0 %s> $text{'no'}</td>\n",
$_[0]->{'rate'} ? "" : "checked";
print "</tr>\n";
print "<tr>\n<td><b>$text{'acl_debug'}</b></td> <td>\n";
printf "<input type=radio name=debug value=1 %s> $text{'yes'}\n",
$_[0]->{'debug'} ? "checked" : "";
printf "<input type=radio name=debug value=0 %s> $text{'no'}</td>\n",
$_[0]->{'debug'} ? "" : "checked";
print "</tr>\n";
print "<tr>\n<td><b>$text{'acl_ldap'}</b></td> <td>\n";
printf "<input type=radio name=ldap value=1 %s> $text{'yes'}\n",
$_[0]->{'ldap'} ? "checked" : "";
printf "<input type=radio name=ldap value=0 %s> $text{'no'}</td>\n",
$_[0]->{'ldap'} ? "" : "checked";
print "</tr>\n";
print "<tr>\n<td><b>$text{'acl_startstop'}</b></td> <td>\n";
printf "<input type=radio name=startstop value=1 %s> $text{'yes'}\n",
$_[0]->{'startstop'} ? "checked" : "";
printf "<input type=radio name=startstop value=0 %s> $text{'no'}</td>\n",
$_[0]->{'startstop'} ? "" : "checked";
print "</tr>\n";
print "<tr>\n<td><b>$text{'acl_mailq'}</b></td> <td>\n";
printf "<input type=radio name=mailq value=1 %s> $text{'yes'}\n",
$_[0]->{'mailq'} ? "checked" : "";
printf "<input type=radio name=mailq value=0 %s> $text{'no'}</td>\n",
$_[0]->{'mailq'} ? "" : "checked";
print "</tr>\n";
print "<tr>\n<td><b>$text{'acl_postfinger'}</b></td> <td>\n";
printf "<input type=radio name=postfinger value=1 %s> $text{'yes'}\n",
$_[0]->{'postfinger'} ? "checked" : "";
printf "<input type=radio name=postfinger value=0 %s> $text{'no'}</td>\n",
$_[0]->{'postfinger'} ? "" : "checked";
print "</tr>\n";
}
# acl_security_save(&options)
# Parse the form for security options for the postfix module
sub acl_security_save
{
$_[0]->{'aliases'} = $in{'aliases'};
$_[0]->{'general'} = $in{'general'};
$_[0]->{'address_rewriting'} = $in{'address_rewriting'};
$_[0]->{'canonical'} = $in{'canonical'};
$_[0]->{'virtual'} = $in{'virtual'};
$_[0]->{'transport'} = $in{'transport'};
$_[0]->{'relocated'} = $in{'relocated'};
$_[0]->{'local_delivery'} = $in{'local_delivery'};
$_[0]->{'resource'} = $in{'resource'};
$_[0]->{'smtpd'} = $in{'smtpd'};
$_[0]->{'smtp'} = $in{'smtp'};
$_[0]->{'rate'} = $in{'rate'};
$_[0]->{'debug'} = $in{'debug'};
$_[0]->{'ldap'} = $in{'ldap'};
$_[0]->{'startstop'} = $in{'startstop'};
$_[0]->{'mailq'} = $in{'mailq'};
$_[0]->{'postfinger'} = $in{'postfinger'};
}
|