<!-- 
 Licensed to the Apache Software Foundation (ASF) under one   
 or more contributor license agreements.  See the NOTICE file 
 distributed with this work for additional information        
 regarding copyright ownership.  The ASF licenses this file   
 to you under the Apache License, Version 2.0 (the            
 "License"); you may not use this file except in compliance   
 with the License.  You may obtain a copy of the License at   
                                                               
   http://www.apache.org/licenses/LICENSE-2.0                 
                                                               
  Unless required by applicable law or agreed to in writing,   
 software distributed under the License is distributed on an  
 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       
 KIND, either express or implied.  See the License for the    
 specific language governing permissions and limitations      
 under the License.  
-->
<!-- The configuration handler chain -->
<!-- Please note that this is EXPERIMENTAL and will be changed in future -->
<!-- releases -->
<handlerchain>
   
   <!-- The connect handler configuration -->

   <!-- STOP - before you uncomment out the DNS RBL handler,
        please take a moment to review each block list.  We
        have included some that various JAMES committers use,
        but you must decide which, if any, are appropriate
        for your environment.  The mail servers hosting
        @apache.org mailing lists, for example, use a
        slightly different list than we have included below.
        And it is likely that most JAMES committes also have
        slightly different sets of lists.  The SpamAssassin
        user's list would be one good place to discuss the
        measured quality of various block lists.

        NOTA BENE: the domain names, below, are terminated
        with '.' to ensure that they are absolute names in
        DNS lookups.  Under some circumstances, names that
        are not explicitly absolute could be treated as
        relative names, leading to incorrect results.  This
        has been observed on *nix and MS-Windows platforms
        by users of multiple mail servers, and is not JAMES
        specific.  If you are unsure what this means for you,
        please speak with your local system/network admins.
   -->
   <!--            
   <handler class="org.apache.james.smtpserver.DNSRBLHandler">
      <rblservers>
         <whitelist> query.bondedsender.org. </whitelist>

         <blacklist> sbl-xbl.spamhaus.org. </blacklist>
         <blacklist> dul.dnsbl.sorbs.net. </blacklist>
         <blacklist> list.dsbl.org. </blacklist>
      </rblservers>
   </handler>            
   -->            
   
   <!-- The command handler configuration -->
   <handler command="HELO" class="org.apache.james.smtpserver.HeloCmdHandler">
       <!-- If is set to true helo is only accepted if it can be resolved -->
       <!-- WARNING: This check will reject on invalid HELO even if the user is authenticated-->
       <!--
       <checkResolvableHelo> false </checkResolvableHelo>
       -->
       
       <!-- If is set to true sender domain will be checked also for clients that -->
       <!-- are allowed to relay. Default is false. -->
       <!--
       <checkAuthNetworks> false </checkAuthNetworks>
       -->
   </handler>
   <handler command="EHLO" class="org.apache.james.smtpserver.EhloCmdHandler">
       <!-- If is set to true EHLO is only accepted if it can be resolved -->
       <!-- WARNING: This check will reject on invalid EHLO even if the user is authenticated-->
       <!--
       <checkResolvableEhlo> false </checkResolvableEhlo>
       -->
       
       <!-- If is set to true sender domain will be checked also for clients that -->
       <!-- are allowed to relay. Default is false. -->
       <!--
       <checkAuthNetworks> false </checkAuthNetworks>
       -->
   </handler>
   <handler command="AUTH" class="org.apache.james.smtpserver.AuthCmdHandler"></handler>
   <handler command="VRFY" class="org.apache.james.smtpserver.VrfyCmdHandler"></handler>
   <handler command="EXPN" class="org.apache.james.smtpserver.ExpnCmdHandler"></handler>
   <handler command="MAIL" class="org.apache.james.smtpserver.MailCmdHandler">
       <!-- If is set to true mail is only accepted if the sender contains -->
       <!-- a resolvable domain having a valid MX Record or A Record associated! -->
       <!--
       <checkValidSenderDomain> false </checkValidSenderDomain>
       -->
       <!-- If is set to true sender domain from clients that are allowed to -->
       <!-- relay will be checked, too. Default is false. -->
       <!-- 
       <checkAuthClients> false </checkAuthClients>
       -->
   </handler>
   <handler command="RCPT" class="org.apache.james.smtpserver.RcptCmdHandler">
       <!-- If is set to a bigger value as 0 you can limit the maximal recipients -->
       <!-- per email. Default is set to 0. -->
       <!-- 
       <maxRcpt> 0 </maxRcpt>
       -->
       
       <!-- If is set to a bigger value as 0 you can set the recipients after which -->
       <!-- tarpitting get activated. -->
       <!-- Tarpitting is a method to insert a small sleep after each rcpt. For more -->
       <!-- infos read this: http://www.palomine.net/qmail/tarpit.html . -->
       <!-- Default is set to 0 (disabled). -->
       <!--
       <tarpitRcptCount> 0 </tarpitRcptCount>
       -->
       <!-- See timeout in milliseconds to insert after the rcpt. Only is used if -->
       <!-- tarpitting is activated. -->
       <!--
       <tarpitSleepTime> 5000 </tarpitSleepTime>
       -->
   </handler>
   <handler command="DATA" class="org.apache.james.smtpserver.DataCmdHandler"></handler>
   <handler command="RSET" class="org.apache.james.smtpserver.RsetCmdHandler"></handler>
   <handler command="HELP" class="org.apache.james.smtpserver.HelpCmdHandler"></handler>
   <handler command="QUIT" class="org.apache.james.smtpserver.QuitCmdHandler"></handler>

   <!-- The message handler configuration -->
   <!-- 
   <handler class="org.apache.james.smtpserver.SetMimeHeaderHandler">
       <headername>SPF-test</headername>
       <headervalue>passed</headervalue>
   </handler>
   -->
   
   <!--  The default message receiving handler -->
   <!--  The default behaviour is to put the message in the root processor of -->
   <!--  the spooler -->
   <handler class="org.apache.james.smtpserver.SendMailHandler">
   </handler>
</handlerchain>
