<!--%%INCLUDE "i_defaulthead.incl" ("PolluStop Whitelists and Blacklists")-->
   <form action="" method="post">

   <fieldset><legend><select class="ed" name="m_usewhiteandblacklist"><!--%%BOOLMENU settings.m_usewhiteandblacklist DEFAULT defaultsettings.m_usewhiteandblacklist DISPLAY enabledisable--></select> Senders lists</legend>
      <p class="explain">For each message passing through PolluStop, the sender address will be taken. The domain part will be matched against the Whitelist, then the full address. If a match is found the message will be given a final low score of 0.00. The same process will be used for the  Blacklist, with a final high score of 1.00.</p>
      <p class="explain">The Whitelist has priority over the Blacklist. Local addresses will not be considered.</p>
      <p class="errors">The data on which these list rely to perform a match is easily forged.</p>

      <fieldset><legend>Fields to use in the senders list</legend>
         <p class="explain">If the content of any of the selected fields match one entry of the whitelist, the message is whitelisted.</p>
         <table><col><col><col>
            <tr style="font-weight:bold;"><th></th><th>Whitelist</th><th>Blacklist</th></tr>
            <tr>
               <th>Return-Path :</th>
               <td><select class="ud" name="m_whitelist_retp"><!--%%BOOLMENU settings.m_whitelist_retp DEFAULT defaultsettings.m_whitelist_retp DISPLAY usenouse--></select></td>
               <td><select class="ud" name="m_blacklist_retp"><!--%%BOOLMENU settings.m_blacklist_retp DEFAULT defaultsettings.m_blacklist_retp DISPLAY usenouse--></select></td>
            </tr><tr>
               <th>"From" address :</th>
               <td><select class="ud" name="m_whitelist_from"><!--%%BOOLMENU settings.m_whitelist_from DEFAULT defaultsettings.m_whitelist_from DISPLAY usenouse--></select></td>
               <td><select class="ud" name="m_blacklist_from"><!--%%BOOLMENU settings.m_blacklist_from DEFAULT defaultsettings.m_blacklist_from DISPLAY usenouse--></select></td>
            </tr><tr>
               <th>"Sender" address :</th>
               <td><select class="ud" name="m_whitelist_send"><!--%%BOOLMENU settings.m_whitelist_send DEFAULT defaultsettings.m_whitelist_send DISPLAY usenouse--></select></td>
               <td><select class="ud" name="m_blacklist_send"><!--%%BOOLMENU settings.m_blacklist_send DEFAULT defaultsettings.m_blacklist_send DISPLAY usenouse--></select></td>
            </tr><tr>
               <th>List-ID :</th>
               <td><select class="ud" name="m_whitelist_list"><!--%%BOOLMENU settings.m_whitelist_list DEFAULT defaultsettings.m_whitelist_list DISPLAY usenouse--></select></td>
               <td><select class="ud" name="m_blacklist_list"><!--%%BOOLMENU settings.m_blacklist_list DEFAULT defaultsettings.m_blacklist_list DISPLAY usenouse--></select></td>
            </tr></table>

         <p class="explain">For the &quot;From&quot; and the &quot;Sender&quot; checks, only the address part is checked, not the name.</p>
         <p class="explain">For the &quot;List-ID&quot; check, enter the text between the &lt; and &gt; characters if any.</p>
      </fieldset>

      <fieldset><legend><select class="ed" name="m_autowhitelist"><!--%%BOOLMENU settings.m_autowhitelist DEFAULT defaultsettings.m_autowhitelist DISPLAY enabledisable--></select> Automated listing</legend>
         <p class="explain">PolluStop can automatically whitelist the sender of messages put into the drop mailboxes and messages sent as an attachment to <i>learnprefix</i>@yourdomain. PolluStop will extract the required information from these messages (based on the fields selected above) and will add it to the whitelist (if the message is to be trained as good)</p>
         <p class="explain">It is not possible to do automatic listing from messages sent to <i>learnprefix</i>-good@yourdomain and <i>learnprefix</i>-spam@yourdomain since these messages usually don't contain the original headers.</p>
         <p class="errors">When per-user settings are enabled, only the user whitelist is populated with these entries by default. To change this behavior, modify the <a href="learn">learn rights</a>.</p>
      </fieldset>

      <fieldset><legend><select class="ed" name="m_globalwhite"><!--%%BOOLMENU settings.m_globalwhite DEFAULT defaultsettings.m_globalwhite DISPLAY enabledisable--></select> Per-user whitelists applying to everyone</legend>
         <p class="explain">In corporate environments, it may be useful for the whitelists of everyone to apply to everyone else.</p>
         <p class="explain">If you enable this feature, PolluStop will consider all whitelists for all incoming messages. If just one user whitelisted the sender, the message will get in for everybody.</p>
         <p class="explain">This feature will NOT merge whitelists - each user can still administrate their own. So this feature can easily be disabled if the result is not satisfying.</p>
      </fieldset>

      <fieldset><legend><select class="ed" name="m_globalblack"><!--%%BOOLMENU settings.m_globalblack DEFAULT defaultsettings.m_globalblack DISPLAY enabledisable--></select> Per-user blacklists applying to everyone</legend>
         <p class="explain">In some rare environments, it may be useful for the blacklists of everyone to apply to everyone else.</p>
         <p class="explain">If you enable this feature, PolluStop will consider all blacklists for all incoming messages. If just one user blacklisted the sender, the message will be considered spam for everybody.</p>
         <p class="explain">This feature can easily be disabled if the result is not satisfying.</p>
         <p class="errors">Enabling this feature is not recommended in most cases as it can require a high level of trust and cooperation between users, as well as a well-understood policy about what is spam and what isn't.</p>
      </fieldset>

      <fieldset><legend><select class="ed" name="m_implysubdomains"><!--%%BOOLMENU settings.m_implysubdomains DEFAULT defaultsettings.m_implysubdomains DISPLAY enabledisable--></select> Imply sub-domains</legend>
         <p class="explain">When a domain entry (<i>example.com</i>) is listed, PolluStop can consider this entry implies subdomains (<i>abc.de.example.com</i>)</p>
         <p class="explain">This setting is recommended. It is however set to Disable by default as previous versions of PolluStop didn't have this feature at all.</p>
         <p class="errors">This setting applies to all whitelists and blacklists. This setting only applies to domain entries.</p>
         <p class="errors">If you just changed this setting, it may not apply immediately to the Test senders list feature below. Navigate to another page and come back, or wait for at least one message to be scanned by PolluStop.</p>
      </fieldset>
      <fieldset><legend>Prioritize <select class="ed" name="m_prioritizeuserlist"><!--%%BOOLMENU settings.m_prioritizeuserlist DEFAULT defaultsettings.m_prioritizeuserlist DISPLAY userwhite--></select></legend>
         <p class="explain">Normal behavior of PolluStop is that (any) whitelist takes priority over (any) blacklist. Simple.</p>
         <p class="explain">However, it may be desirable in some environments, mostly non-corporate, for end-user blacklists to apply even if the domain is whitelisted at server level.</p>
         <p>Normal behavior (prioritize whitelists):<br>
            &bull; <span style="color:blue">whitelisted</span> = <span style="color:blue">user</span> OR <span style="color:blue">domain</span> OR <span style="color:blue">system</span><br>
            &bull; <span style="color:red">blacklisted</span> = NOT <span style="color:blue">whitelisted</span> AND (<span style="color:red">user</span> OR <span style="color:red">domain</span> OR <span style="color:red">system</span>)
         </p>
         <p>Alternate behavior (prioritize user lists):<br>
            &bull; <span style="color:blue">whitelisted</span> = <span style="color:blue">user</span> OR (NOT <span style="color:red">user</span> AND <span style="color:blue">domain</span>) OR (NOT <span style="color:red">user</span> AND NOT <span style="color:red">domain</span> AND <span style="color:blue">system</span>)<br>
            &bull; <span style="color:red">blacklisted</span> = NOT <span style="color:blue">whitelisted</span> AND (<span style="color:red">user</span> OR <span style="color:red">domain</span> OR <span style="color:red">system</span>)
         </p>
      </fieldset>
   </fieldset>

   <fieldset><legend><select class="ed" name="m_usetokenwhiteandblacklist"><!--%%BOOLMENU settings.m_usetokenwhiteandblacklist DEFAULT defaultsettings.m_usetokenwhiteandblacklist DISPLAY enabledisable--></select> Whitelisted words</legend>
   <p class="explain">PolluStop can automatically whitelist messages containing certain words; as soon as one of these words is encountered, the message will be given a score of 0.00.</p>
   <p class="explain">Whole words are matched<!--%%IF settings.m_contextualtokentagsenabled-->
      <select name="m_tokenwhitematch" style="width:auto;">
         <option value="0" <!--%%IF EQUALS(settings.m_tokenwhitematch AND "0")-->selected<!--%%ENDIF-->>in the body of the message and in the Subject, To, Cc and From headers<!--%%if EQUALS(defaultsettings.m_tokenwhitematch AND "0")--> *<!--%%ENDIF--></option>
         <option value="1" <!--%%IF EQUALS(settings.m_tokenwhitematch AND "1")-->selected<!--%%ENDIF-->>in the body of the message only<!--%%if EQUALS(defaultsettings.m_tokenwhitematch AND "1")--> *<!--%%ENDIF--></option>
         <option value="2" <!--%%IF EQUALS(settings.m_tokenwhitematch AND "2")-->selected<!--%%ENDIF-->>in the subject of the message only<!--%%if EQUALS(defaultsettings.m_tokenwhitematch AND "2")--> *<!--%%ENDIF--></option>
         <option value="3" <!--%%IF EQUALS(settings.m_tokenwhitematch AND "3")-->selected<!--%%ENDIF-->>in the body and the subject of the message<!--%%if EQUALS(defaultsettings.m_tokenwhitematch AND "3")--> *<!--%%ENDIF--></option>
      </select><!--%%ELSE-->in the body of the message and in the Subject, To, Cc and From headers<!--%%ENDIF-->.</p>
   </fieldset>

   <fieldset><legend>Sender and word lists</legend>
      <ul id="listtabs">
         <li class="active" onclick="OpenTab(this, 1)">Senders whitelist</li>
         <li onclick="OpenTab(this, 2)">Senders blacklist</li>
         <li onclick="OpenTab(this, 3)">Whitelisted words</li>
         <li onclick="OpenTab(this, 4)" style="float:right; margin:0">Test senders lists</li>
      </ul>
      <div class="listholder" id="obj_tab1">
         <p class="explain">Existing whitelist entries. Click to delete/undelete. Right-click to copy entry in the box below.</p>
         <div class="list" style="overflow:hidden; height:auto; font-weight:bold;"><table cellspacing="0"><col width="220"><col width="220"><col width="210"><tbody><tr>
            <td class="link" style="font-size:small;" onclick="FillList(0, SortByAccount)">Address</td>
            <td class="link" style="font-size:small;" onclick="FillList(0, SortByDomain)">Domain</td>
            <td>Type/Comment</td>
         </tr></tbody></table></div>
         <div class="listscroller">
            <div class="list" id="obj_whitelist"></div>
            <div class="list_scroll" id="obj_whitelist_scroll"><div>&nbsp;</div></div>
         </div>
         <div><input type="text" id="obj_whitelist_filter" class="filterlist"><input type="button" value="Apply"><input type="button" value="Clear"></div>
         <p style="margin-top:10px" class="explain">New whitelist entries. Enter one full email address, one full List-ID or one full domain name per line. No wildcard (all characters are taken literally).</p>
         <p class="explain">Format: "[address@]domain [ ; comment]"</p>
         <textarea name="whitelist_add" rows="5" cols="70"></textarea>
         <p style="border-top:1px solid black; padding-top:6px; margin-top:6px"><input disabled="disabled" type="submit" name="clearwhitelist" value="Clear whitelist" />
            <label><input onclick="IAmSure(this, 'clearwhitelist')" type="checkbox" name="clearwhitelistsure" value="1" /> I am sure</label></p>
      </div>
      <div class="listholder" style="display:none" id="obj_tab2">
         <p class="explain">Existing blacklist entries. Click to delete/undelete. Right-click to copy entry in the box below.</p>
         <div class="list" style="overflow:hidden; height:auto; font-weight:bold;"><table cellspacing="0"><col width="220"><col width="220"><col width="210"><tbody><tr>
            <td class="link" style="font-size:small;" onclick="FillList(1, SortByAccount)">Address</td>
            <td class="link" style="font-size:small;" onclick="FillList(1, SortByDomain)">Domain</td>
            <td>Type/Comment</td>
         </tr></tbody></table></div>
         <div class="listscroller">
            <div class="list" id="obj_blacklist"></div>
            <div class="list_scroll" id="obj_blacklist_scroll"><div>&nbsp;</div></div>
         </div>
         <div><input type="text" id="obj_blacklist_filter" class="filterlist"><input type="button" value="Apply"><input type="button" value="Clear"></div>
         <p style="margin-top:10px" class="explain">New blacklist entries. Enter one full email address, one full List-ID or one full domain name per line. No wildcard (all characters are taken literally).</p>
         <p class="explain">Format: "[address@]domain [ ; comment]"</p>
         <textarea name="blacklist_add" rows="5" cols="70"></textarea>
         <p style="border-top:1px solid black; padding-top:6px; margin-top:6px"><input disabled="disabled" type="submit" name="clearblacklist" value="Clear blacklist" />
            <label><input onclick="IAmSure(this, 'clearblacklist')" type="checkbox" name="clearblacklistsure" value="1" /> I am sure</label></p>
      </div>
      <div class="listholder" style="display:none" id="obj_tab3">
         <p class="explain">Enter one word per line.<br />You can add a comment for each word preceded by a semicolon (e.g. word ; comment).</p>
         <p class="errors">Be careful with what you include here as you could be allowing many spam messages to pass through undetected.</p>

         <div style="float:left;"><strong>Case-sensitive</strong><br />
            <textarea style="width:337px; height:334px; margin: 5px 0 0" id="tokenwhitelist" rows="10" cols="30"></textarea>
         </div>
         <div style="float:right;"><strong>Case-insensitive</strong><br />
            <textarea style="width:337px; height:334px; margin: 5px 0 0" id="itokenwhitelist" rows="10" cols="30"></textarea>
         </div>
         <div style="clear:both"></div>
      </div>
      <div class="listholder" style="display:none" id="obj_tab4">
         <p class="explain">You can test for an address or domain name to find out where it is listed: in the global whitelist, the global blacklist, domain or in any per-user list. This tool will also report if the address is local.</p>
         <p>Address or domain to test (one per line):</p>
         <p><textarea id="test_address" cols="30" rows="5" style="height:200px"></textarea></p>
         <p><textarea readonly="readonly" style="height:95px" id="test_result" cols="30" rows="5"></textarea></p>
         <p><input type="button" name="test_senders" value="Test" onclick="return TestLists()" /></p>
      </div>

   </fieldset>
   <p><input type="submit" name="apply" value="Save"/></p>
   </form>

   <script type="text/javascript">window.m_Lists = ["%%javascript:whitelist%%", "%%javascript:blacklist%%", "%%javascript:tokenwhitelist%%", "%%javascript:itokenwhitelist%%"];</script>
<!--%%INCLUDE "i_defaultfoot.incl"-->
