<!--%%INCLUDE "i_defaulthead.incl"-->
   <title>PolluStop Whitelists and Blacklists</title>
</head>
<body>
   <h1>PolluStop Whitelists and Blacklists<br />
   <span class="h2">%%domainname%%</span></h1>
   <!--%%INCLUDE "i_statuscodes.incl"-->

   <form action="whiteblacklists" method="post" onsubmit="UpdateLists()">

   <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;"><td></td><td>Whitelist</td><td>Blacklist</td></tr>
         <tr>
            <th>Return-Path :</td>
            <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 :</td>
            <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 :</td>
            <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 :</td>
            <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="error">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>Whitelisted addresses and domains</legend>
      <div id="obj_whitelistholder" style="display:none">
         <p class="explain">Existing whitelist entries. Click to delete/undelete.</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="list" id="obj_whitelist"></div>
      <p class="link" onclick="MoveExisting(1); this.style.display='none'">Move all existing entries to the New entries box</p>
      </div>
      <p style="margin-top:10px" class="explain">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" rows="15" cols="70">%%whitelist%%</textarea>
      <p class="error">Local addresses will not be saved</p>
   </fieldset>
   <fieldset><legend>Blacklisted addresses and domains</legend>
      <div id="obj_blacklistholder" style="display:none">
         <p class="explain">Existing blacklist entries. Click to delete/undelete.</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="list" id="obj_blacklist"></div>
         <p class="link" onclick="MoveExisting(0); this.style.display='none'">Move all existing entries to the New entries box</p>
      </div>
      <p style="margin-top:10px" class="explain">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" rows="15" cols="70">%%blacklist%%</textarea>
      <p class="error">Local addresses will not be saved</p>
   </fieldset>
   </fieldset>
   <p><input type="submit" class="btn" name="apply_senders" value="Save Senders List" /><input type="reset" class="btn" value="Reset" /></p>
   </form>

   <form action="whiteblacklists" method="post">
   <fieldset><legend>Test Senders lists</legend>
      <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, or in any per-user list. This tool will also report if the address is local.</p>
      <p class="errors">Since all per-user whitelist and blacklist will have to be read, this test can take a few seconds. It will take a lot less time to do one test with several address than several tests with one address.</p>
      <p>Address or domain to test (one per line):</p>
      <p><textarea id="test_address" name="test_address" cols="30" rows="5"></textarea></p>
      <p><textarea style="display:none" readonly="readonly" id="test_result" cols="30" rows="5">%%test_result%%</textarea></p>
      <p><input type="submit" class="btn" name="test_senders" value="Test" onclick="return TestLists()" /></p>
   </fieldset>

   </form>

   <form action="whiteblacklists" method="post">
   <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>
      <p class="explain">Enter one word per line. 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>
      <table><tr>
      <td><strong>Case-sensitive</strong><br />
         <textarea style="width:250px;" name="tokenwhitelist" rows="10" cols="30">%%tokenwhitelist%%</textarea>
      </td>
      <td><strong>Case-insensitive</strong><br />
         <textarea style="width:250px;" name="itokenwhitelist" rows="10" cols="30">%%itokenwhitelist%%</textarea>
      </td></tr></table>
   </fieldset>

   <p><input type="submit" class="btn" name="apply_tokens" value="Save Whitelisted words" /><input type="reset" class="btn" value="Reset" /></p>
   </form>

   <input style="display:none; position:absolute;" type="text" id="obj_editbox" value="">


<!--%%INCLUDE "i_defaultfoot.incl"-->
<script type="text/javascript">
<!--%%IF NOT(adminmode) & settings.view_canchangewblist-->
   var l_Select = document.forms[0].m_usewhiteandblacklist; replaceBySpan(l_Select, l_Select.options[l_Select.selectedIndex].innerHTML);
   l_Select = document.forms[0].m_autowhitelist; replaceBySpan(l_Select, l_Select.options[l_Select.selectedIndex].innerHTML);
   l_Select = document.forms[0].m_usetokenwhiteandblacklist; replaceBySpan(l_Select, l_Select.options[l_Select.selectedIndex].innerHTML);
   l_Select = document.forms[0].m_tokenwhitematch; replaceBySpan(l_Select, l_Select.options[l_Select.selectedIndex].innerHTML);
<!--%%ENDIF-->
   PrepareLists();
</script>
