<!--%%IF listownerdomain-->
<!--%%INCLUDE "i_defaulthead.incl" ("PolluStop - Per-domain configuration for domain", listowner)-->
<!--%%ELSE-->
<!--%%INCLUDE "i_defaulthead.incl" ("PolluStop - User Configuration for", listowner)-->
<!--%%ENDIF-->
   <form action="" method="post">

   <!--%%IF listownerdomain-->
      <fieldset><legend>Per-domain settings</legend>
         <p class="explain">This page contains the default settings and per-domain whitelist for the whole <span class="tt">%%listowner%%</span> domain.
     </fieldset>
   <!--%%ELSE-->
      <!--%%IF settings.w_allowoverride-->
      <fieldset><legend>Spam filter</legend>
         <p>I <select onchange="document.getElementById('spam_options').style.display=this.selectedIndex?'none':''" style="width:auto;" class="ed" name="ruledisabled"><option <!--%%IF NOT(user.ruledisabled)--> selected="selected"<!--%%ENDIF--> value="0">%%DICTIONARY("wantdontwant")."YES"%%</option><option<!--%%IF user.ruledisabled--> selected="selected"<!--%%ENDIF--> value="1">%%DICTIONARY("wantdontwant")."NO"%%</option>
            </select> the messages I receive to be filtered for spam</p>
      </fieldset>
      <!--%%ENDIF-->
   <!--%%ENDIF-->

   <div id="spam_options" <!--%%IF NOT(listownerdomain) & settings.w_allowoverride & user.ruledisabled-->style="display:none"<!--%%ENDIF-->>
   <fieldset><legend>Automated listing <!--%%IF listownerdomain-->defaults<!--%%ENDIF--></legend>
      <p>When I send a message, I <select style="width:auto;" class="ed" name="whitelistsent"><!--%%BOOLMENU user.whitelistsent DISPLAY wantdontwant--></select> the recipient to be automatically whitelisted</p>
      <p>When I drop a message in my "good" drop-box, I <select style="width:auto;" class="ed" name="whitelistdrop"><!--%%BOOLMENU user.whitelistdrop DISPLAY wantdontwant--></select> the sender to be automatically whitelisted</p>
      <p>When I drop a message in my "spam" drop-box, I <select style="width:auto;" class="ed" name="blacklistdrop"><!--%%BOOLMENU user.blacklistdrop DISPLAY wantdontwant--></select> the sender to be automatically blacklisted</p>
      <p class="explain">You can also forward the message as attachement to <i>%%SETTINGS("learn_prefix")%%@%%domainname%%</i>.</p>

      <!--%%IF listownerdomain-->
         These default will apply only to new users and to users who did not manually saved their preferences.</p>
         <p>You can reset all user settings to the default value on this domain. This will not reset the whitelist, blacklist, or the "filter enabled" setting for any user</p>
         <p><input disabled="disabled" type="submit" name="resetdefaults" value="Reset default settings for all users" />
            <label><input onclick="IAmSure(this, 'resetdefaults')" type="checkbox" name="resetdefaultssure" value="1" /> I am sure</label></p>
      <!--%%ENDIF-->
   </fieldset>

   <fieldset><legend><!--%%IF listownerdomain-->Domain<!--%%ENDIF--> Lists</legend>
      <!--%%IF listownerdomain--><p class="explain">All whitelist entries take precedence over any blacklist entry. If an user whitelists an address, it will be whitelisted even if it's blacklisted here, and vice-versa.</p><!--%%ENDIF-->
      <ul id="listtabs">
         <li class="active" onclick="OpenTab(this, 1)">Senders whitelist</li>
         <li onclick="OpenTab(this, 2)">Senders blacklist</li>
      </ul>
      <div class="listholder" id="obj_tab1">
         <!--%%IF not(embed)--><p class="explain">Existing whitelist entries. Any incoming mail for which the sender matches an entry below will never be considered as spam.</p><!--%%ENDIF-->
         <p class="explain">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>
         <!--%%IF EXISTS(whitelist_count)-->
         <div class="errors" style="font-size:120%">
            <p>WARNING: You have %%whitelist_count%% whitelist entries. Only the first 5000 are shown.</p>
            <p>This may indicate your email account has been compromised or used to send spam.</p>
            <p>First, you should probably change the password of your email account and keep it secure. </p>
            <p>Then, you should clear your whitelist using the "Clear whitelist" button below, and start over.</p>
            <p>Please contact your service provider if you have questions about your email account.</p>
         </div><!--%%ENDIF-->
         <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">New email addresses or domains to be whitelisted:</p>
         <textarea name="whitelist_add" rows="5" cols="70" style="height:54px"></textarea>
         <p class="explain">Always enter full email addresses (<span class="tt">user@example.com</span>) or full domains (<span class="tt">example.com</span>).</p>
         <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">
         <!--%%IF not(embed)--><p class="explain">Existing blacklist entries. Any incoming mail for which the sender matches an entry below (and does not match a whitelist entry) will always be considered as spam.</p><!--%%ENDIF-->
         <p class="explain">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>
         <!--%%IF EXISTS(blacklist_count)-->
         <div class="errors" style="font-size:120%">
            <p>You have %%blacklist_count%% blacklist entries. Only the first 5000 are shown.</p>
            <p>You can clear your blacklist using the "Clear blacklist" button below, and start over.</p>
         </div><!--%%ENDIF-->
         <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">New email addresses or domains to be blacklisted:</p>
         <textarea name="blacklist_add" rows="5" cols="70" style="height:54px"></textarea>
         <p class="explain">Always enter full email addresses (<span class="tt">user@example.com</span>) or full domains (<span class="tt">example.com</span>).</p>
         <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>
   </fieldset>
   </div>

<!--%%IF EQUALS(embed AND "4")-->
   <input type="hidden" name="Apply" value="" />
   <script type="text/javascript"> function SaveValues() { document.forms[0].submit(); } </script>
<!--%%ELSE-->
   <p><input type="submit" name="Apply" value="Save settings" /> <!--%%IF embed--><input type="button" value="Close" onclick="top.close_inline_window()" /><!--%%ELIF NOT(webuserimport) & NOT(domainadminlevel)--><input type="button" value="Logout" onclick="window.location='logout'" /><!--%%ENDIF--></p>
<!--%%ENDIF-->
   </form>

   <script type="text/javascript">window.m_Lists = ["%%javascript:whitelist%%","%%javascript:blacklist%%"];</script>

<!--%%INCLUDE "i_defaultfoot.incl"-->