You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by sundeep Gelli <su...@picmond.com> on 2006/02/01 02:25:00 UTC

Matcher priority

Thanx ,
My config.xml ......Here i need to execute IsFakeSender first and if not true then mailrecipient. i included some debug statements in null class to make sure that it is being called.but when i am trying to do so,the MailMailet is executing first and then the null class is called.Why is this happening?

Regards
Sundeep

<?xml version="1.0"?>
<!DOCTYPE config [
<!ENTITY listserverConfig SYSTEM "../conf/james-listmanager.xml">
<!ENTITY listserverStores SYSTEM "../conf/james-liststores.xml">
<!ENTITY fetchmailConfig SYSTEM "../conf/james-fetchmail.xml">
]>

<!--  Configuration file for the ASF James server -->

<!--  This file contains important settings that control the behaviour -->
<!--  of all of the services and repositories. -->

<!--                               README!                            -->

<!-- This configuration file is designed to run without alteration for simple tests. -->
<!-- It assumes you have a DNS server on localhost and assigns a root password of root. -->

<!-- In case the defaults do not suit you, the items you are most likely to need to change -->
<!-- are preceded by a CHECKME! or CONFIRM? comment in the left margin. -->

<!-- For production use you will probably need to make more extensive changes, see -->
<!-- http://james.apache.org/documentation_2_1.html -->

<!-- $Revision: 1.3 $ Committed on $Date: 2006/01/17 01:24:42 $ by: $Author: kiru $ -->

<config>
   <James>

<!-- CHECKME! -->
      <!-- This is the postmaster email address for this mail server. -->
      <!-- Set this to the appropriate email address for error reports -->
      <!-- If this is set to a non-local email address, the mail server -->
      <!-- will still function, but will generate a warning on startup. -->
      <postmaster>Postmaster@localhost</postmaster>

      <!-- servernames identifies the DNS namespace served by this instance of James. -->
      <!-- These servernames are used for both matcher/mailet processing and SMTP auth -->
      <!-- to determine when a mail is intended for local delivery. -->
      <!-- -->
      <!-- If autodetect is TRUE, James wil attempt to discover its own host name AND -->
      <!-- use any explicitly specified servernames. -->
      <!-- If autodetect is FALSE, James will use only the specified servernames. -->
      <!-- -->
      <!-- If autodetectIP is not FALSE, James will also allow add the IP address for each servername. -->
      <!-- The automatic IP detection is to support RFC 2821, Sec 4.1.3, address literals. -->
      <!-- -->
      <!-- To override autodetected server names simply add explicit servername elements. -->
      <!-- In most cases this will be necessary. -->
      <!-- By default, the servername 'localhost' is specified. This can be removed, if required. -->
      <!-- -->
      <!-- Warning: If you are using fetchpop it is important to include the -->
      <!-- fetched domains in the server name list to prevent looping.       -->
      <servernames autodetect="true" autodetectIP="true">
<!-- CONFIRM? -->
         <servername>unialert.baiduri.com.bn</servername>
      </servernames>

      <!-- Set whether user names are case sensitive or case insensitive -->
      <!-- Set whether to enable local aliases -->
      <!-- Set whether to enable forwarding -->
      <usernames ignoreCase="true" enableAliases="true" enableForwarding="true"/>

      <!-- The inbox repository is the location for users inboxes -->
      <!-- Default setting: file based repository - enter path ( use  "file:///" for absolute) -->
      <inboxRepository>
         <repository destinationURL="file://var/mail/inboxes/" type="MAIL"/>
      </inboxRepository>

      <!-- Alternative inbox repository definition for DB use. -->
      <!-- The format for the destinationURL is "db://<data-source>/<table>" -->
      <!-- <data-source> is the datasource name set up in the database-connections block, below -->
      <!-- <table> is the name of the table to store user inboxes in -->
      <!-- The user name is used as <repositoryName> for this repository config. -->
      <!--
      <inboxRepository>
         <repository destinationURL="db://maildb/inbox/" type="MAIL"/>
      </inboxRepository>
      -->

      <!-- Alternative inbox repository definition for DB use. -->
      <!-- Stores message body in file system, rest in database -->
      <!--
      <inboxRepository>
         <repository destinationURL="dbfile://maildb/inbox/" type="MAIL"/>
      </inboxRepository>
      -->

      <!-- Alternative inbox repository definition for mbox use. -->
      <!-- This method uses UNIX standard mbox files and is meant for people using mbox files -->
      <!-- with systems such as mail list archive displayers -->
      <!-- Note that dot-locking is not currently supported -->
      <!-- so network (write) accesses may cause mbox corruption -->
      <!-- the sample mbox URL is an absolute URL; mbox:///var/mail will put the users mbox files in /var/mail/-->
      <!--
      <inboxRepository>
         <repository destinationURL="mbox:///var/mail/" type="MAIL"/>
      </inboxRepository>
      -->
   </James>

   <!-- Fetch pop block, fetches mail from POP3 servers and inserts it into the incoming spool -->
   <!-- Warning: It is important to prevent mail from looping by setting the  -->
   <!-- fetched domains in the <servernames> section of the <James> block     -->
   <!-- above. This block is disabled by default.                             -->
   <!-- FetchPOP is being deprecated in favor of FetchMail                    -->
    <fetchpop enabled="false">
        <!-- You can have as many fetch tasks as you want, but each must have a -->
        <!-- unique name by which it identified -->
        <fetch name="mydomain.com">
            <!-- Host name or IP address -->
            <host>mail.mydomain.com</host>
            <!-- Account login username -->
            <user>username</user>
            <!-- Account login password -->
            <password>pass</password>
            <!-- How frequently this account is checked - in milliseconds. 600000 is every ten minutes -->
            <interval>600000</interval>
        </fetch>
    </fetchpop>

    <!-- This is an example configuration for FetchMail, a JavaMail based gateway  -->
    <!-- service that pulls messages from other sources, and inserts them into the -->
    <!-- spool.  They are then processed normally, although FetchMail generally    -->
    <!-- has to fabricate some of the envelope information.  FetchMail should be   -->
    <!-- considered a mail gateway, rather than a relay, in RFC terms.             -->
    <!-- Fetchmail is a functionally richer replacement for FetchPOP.              -->
    <!-- CHECKME: FetchMail is disabled by default, and must be configured to use. -->
    <!-- Edit the file referred to by fetchmailConfig to enable and configure.     -->
    &fetchmailConfig;

   <!-- The James Spool Manager block  -->
   <!-- -->
   <!-- This block is responsible for processing messages on the spool. -->
   <spoolmanager>
      <!-- Number of spool threads -->
      <threads> 10 </threads>

      <!-- Set the Java  from which to load mailets and matchers -->
      <mailetpackages>
         <mailetpackage>org.apache.james.transport.mailets</mailetpackage>
         <mailetpackage>com.picmond.mailets</mailetpackage>
      </mailetpackages>
      <matcherpackages>
         <matcherpackage>org.apache.james.transport.matchers</matcherpackage>
         <matcherpackage>com.picmond.matchers</matcherpackage> 
      </matcherpackages>

      <!-- The root processor is a required processor - James routes all mail on the spool -->
      <!-- through this processor first. -->
      <!-- -->
      <!-- This configuration is a sample configuration for the root processor. -->
      <processor name="root">

         <!-- Checks that the email Sender is associated with a valid domain. -->
         <!-- Useful for detecting and eliminating spam. -->
         <!-- For this block to function, the spam processor must be configured. -->
         <!--
         <mailet match="SenderInFakeDomain=64.55.105.9,64.94.110.11,194.205.62.122,194.205.62.62,195.7.77.20,206.253.214.102,212.181.91.6,219.88.106.80,194.205.62.42,216.35.187.246,203.119.4.6" class="ToProcessor">
            <processor> spam </processor>
         </mailet>
         -->

         <!-- Important check to avoid looping -->
         <mailet match="RelayLimit=30" class="Null"/>

         <!--
         <mailet match="All" class="XMLVirtualUserTable">
            <!- 1:1 mapping ->
            <mapping>morgoth@middle-earth=sauron@mordor</mapping>
            <!- 1:n mapping ->
            <mapping>istari@middle-earth=saruman@isengard;radigast;gandalf</mapping>
            <!- DSN mapping ->
            <mapping>boromir@osgilliath=error:550 Requested action not taken: no such user here</mapping>
            <!- regex based mapping ->
            <mapping>*@osgilliath=regex:(.*)@osgilliath:${1}@minas-tirith</mapping>
            <!- both standard and regex mapping ->
            <mapping>ring@*=onering@mordor;regex:ring@(.*):ring@${1}</mapping>
            <!- conditional regex mapping example ->
            <mapping>*@listserver=regex:(.*)-on@listserver:${1}-subscribe@listserver;
                                  regex:(.*)-off@listserver:${1}-unsubscribe@listserver
            </mapping>
         </mailet>
         -->

         <!-- White List:
              If you use block lists, you will probably want to check
              for known permitted senders.  This is particularly true
              if you use more aggressive block lists, such as SPEWS,
              that are prone to block entire subnets without regard
              for non-spamming senders.
          -->

         <!-- specific known senders -->
         <!--
         <mailet match="SenderIs=goodboy@goodhost"
                 class="ToProcessor">
            <processor> transport </processor>
         </mailet>
         -->

         <!-- People on this list agree to pay a penalty if they send spam -->
         <mailet match="InSpammerBlacklist=query.bondedsender.org"
                 class="ToProcessor">
           <processor> transport </processor>
         </mailet>

         <!-- E-mail legally required not to be spam (see: http://www.habeas.com) -->
         <!--
         <mailet match="HasHabeasWarrantMark" class="ToProcessor">
            <processor> transport </processor>
         </mailet>
         -->
         <!-- End of White List -->

         <!-- Check for delivery from a known spam server -->
         <!-- This set of matchers/mailets redirect all emails from known -->
         <!-- black holes, open relays, and spam servers to the spam processor -->
         <!-- For this set to function properly, the spam processor must be configured. -->
         <mailet match="InSpammerBlacklist=dnsbl.njabl.org"
                 class="ToProcessor">
           <processor> spam </processor>
           <notice>550 Requested action not taken: rejected - see http://njabl.org/ </notice>
         </mailet>

         <mailet match="InSpammerBlacklist=relays.ordb.org"
                 class="ToProcessor">
           <processor> spam </processor>
           <notice>550 Requested action not taken: rejected - see http://www.ordb.org/ </notice>
         </mailet>
         
         <mailet match="IsValidSender" class="Null"/>
       <mailet match="RecipientIsLocal" class="LocalDelivery"/>
         <mailet match="SmsRecipient" class="SmsMailet"/>
         <mailet match="MailRecipient" class="MailMailet"/> 
         <mailet match="BulkMailRecipient" class="BulkMailMailet"/>
         <mailet match="CustomMailRecipient" class="CustomMailMailet"/>
         <mailet match="CustomMessageRecipient" class="CustomSmsMessageMailet"/>

         <!-- Sample matching to kill a message (send to Null) -->
         <!--
         <mailet match="RecipientIs=badboy@badhost" class="Null"/>
         -->

         <!-- Send remaining mails to the transport processor for either local or remote delivery -->
         <mailet match="All" class="ToProcessor">
            <processor> transport </processor>
         </mailet>
      </processor>

      <!-- The error processor is required.  James may internally set emails to the -->
      <!-- error state.  The error processor is generally invoked when there is an -->
      <!-- unexpected error either in the mailet chain or internal to James. -->
      <!-- -->
      <!-- By default configuration all email that generates an error in placed in -->
      <!-- an error repository. -->
      <processor name="error">
         <!-- If you want to notify the sender their message generated an error, uncomment this       -->
         <!--
         <mailet match="All" class="Bounce"/>
         -->
         <!-- If you want to notify the postmaster that a message generated an error, uncomment this  -->
         <!--
         <mailet match="All" class="NotifyPostmaster"/>
         -->

         <!-- Logs any messages to the repository specified -->
         <mailet match="All" class="ToRepository">
            <repositoryPath> file://var/mail/error/</repositoryPath>
            <!-- An alternative database repository example follows. -->
            <!--
            <repositoryPath> db://maildb/deadletter/error </repositoryPath>
            -->
         </mailet>
      </processor>

      <!-- Processor CONFIGURATION SAMPLE: transport is a sample custom processor for local or -->
      <!-- remote delivery -->
      <processor name="transport">

        <!-- This is an example configuration including configuration for a list server. -->
        <!-- CHECKME: before uncommenting this, edit the configuration file's contents   -->
        <!--
          &listserverConfig;
        -->

         <!-- Is the recipient is for a local account, deliver it locally -->
         <mailet match="RecipientIsLocal" class="LocalDelivery"/>

         <!-- If the host is handled by this server and it did not get -->
         <!-- locally delivered, this is an invalid recipient -->
         <mailet match="HostIsLocal" class="ToProcessor">
            <processor> local-address-error </processor>
            <notice>550 - Requested action not taken: no such user here</notice>
         </mailet>

<!-- CHECKME! -->
         <!-- This is an anti-relay matcher/mailet combination -->
         <!-- -->
         <!-- Emails sent from servers not in the network list are  -->
         <!-- rejected as spam.  This is one method of preventing your -->
         <!-- server from being used as an open relay.  Make sure you understand -->
         <!-- how to prevent your server from becoming an open relay before -->
         <!-- changing this configuration. See also <authorizedAddresses> in SMTP Server -->
         <!-- -->
         <!-- This matcher/mailet combination must come after local delivery has -->
         <!-- been performed.  Otherwise local users will not be able to receive -->
         <!-- email from senders not in this remote address list. -->
         <!-- -->
         <!-- If you are using this matcher/mailet you will probably want to -->
         <!-- update the configuration to include your own network/addresses.  The -->
         <!-- matcher can be configured with a comma separated list of IP addresses  -->
         <!-- wildcarded IP subnets, and wildcarded hostname subnets. -->
         <!-- e.g. "RemoteAddrNotInNetwork=127.0.0.1, abc.de.*, 192.168.0.*" -->
         <!-- -->
         <!-- If you are using SMTP authentication then you can (and generally -->
         <!-- should) disable this matcher/mailet pair. -->
           <mailet match="RemoteAddrNotInNetwork=127.0.0.1,18.*" class="ToProcessor">
            <processor> relay-denied </processor>
            <notice>550 - Requested action not taken: relaying denied</notice>
         </mailet>
                  
         <!-- Attempt remote delivery using the specified repository for the spool, -->
         <!-- using delay time to retry delivery and the maximum number of retries -->
         <mailet match="All" class="RemoteDelivery">
            <outgoing> file://var/mail/outgoing/ </outgoing>
            <!-- alternative database repository example below -->
            <!--
            <outgoing> db://maildb/spool/outgoing </outgoing>
            -->

            <!-- Delivery Schedule based upon RFC 2821, 4.5.4.1 -->
            <!-- 5 day retry period, with 4 attempts in the first
                 hour, two more within the first 6 hours, and then
                 every 6 hours for the rest of the period. -->
            <delayTime>  5 minutes </delayTime>
            <delayTime> 10 minutes </delayTime>
            <delayTime> 45 minutes </delayTime>
            <delayTime>  2 hours </delayTime>
            <delayTime>  3 hours </delayTime>
            <delayTime>  6 hours </delayTime>
            <maxRetries> 25 </maxRetries>

            <!-- The number of threads that should be trying to deliver outgoing messages -->
            <deliveryThreads> 1 </deliveryThreads>

            <!-- If false the message will not be sent to given server if any recipients fail -->
            <sendpartial>false</sendpartial>

            <!-- A single mail server to deliver all outgoing messages. -->
            <!-- This is useful if this server is a backup or failover machine, -->
            <!-- or if you want all messages to be routed through a particular mail server, -->
            <!-- regardless of the email addresses specified in the message -->
            <!-- -->
            <!-- The gateway element specifies the gateway SMTP server name. -->
            <!-- If your gateway mail server is listening on a port other than 25, -->
            <!-- you can set James to connect to it on that port using the gatewayPort -->
            <!-- element. -->
            <!-- Although normally multiple addresses are implemented through proper -->
            <!-- DNS configuration, the RemoteDelivery mail does allow specifying -->
            <!-- multiple gateway elements, each of which may also have a port -->
            <!-- e.g., mygateway:2525 -->
            <!-- the gatewayPort element is used as a default -->
            <!--
            <gateway> otherserver.mydomain.com </gateway>
            <gatewayPort>25</gatewayPort>
            -->
         </mailet>

      </processor>

      <!-- Processor CONFIGURATION SAMPLE: spam is a sample custom processor for handling -->
      <!-- spam. -->
      <!-- You can either log these, bounce these, or just ignore them. -->
      <processor name="spam">
         <!-- To destroy all messages, uncomment this matcher/mailet configuration -->
         <!--
         <mailet match="All" class="Null"/>
         -->

         <!-- To notify the sender their message was marked as spam, uncomment this matcher/mailet configuration -->
         <!--
         <mailet match="All" class="Bounce"/>
         -->

         <!-- To notify the postmaster that a message was marked as spam, uncomment this matcher/mailet configuration -->
         <!--
         <mailet match="All" class="NotifyPostmaster"/>
         -->

         <!-- To log the message to a repository, this matcher/mailet configuration should be uncommented. -->
         <!-- This is the default configuration. -->
         <mailet match="All" class="ToRepository">
            <repositoryPath>file://var/mail/spam/</repositoryPath>

            <!-- Changing the repositoryPath, as in this commented out example, will -->
            <!-- cause the mails to be stored in a database repository.  -->
            <!-- Please note that only one repositoryPath element can be present for the mailet -->
            <!-- configuration. -->
            <!--
            <repositoryPath> db://maildb/deadletter/spam </repositoryPath>
            -->
         </mailet>
      </processor>

      <!-- This processor handles messages that are for local domains, where the user is unknown -->
      <processor name="local-address-error">
         <!-- To notify the sender the address was invalid, uncomment this matcher/mailet configuration -->
         <!-- The original message is not attached to keep the bounce processor from deliverying spam -->
         <!--
         <mailet match="All" class="Bounce">
            <attachment>none</attachment>
         </mailet>
         -->

         <!-- To notify the postmaster that a message had an invalid address, uncomment this matcher/mailet configuration -->
         <!--
         <mailet match="All" class="NotifyPostmaster"/>
         -->

         <mailet match="All" class="ToRepository">
            <repositoryPath> file://var/mail/address-error/</repositoryPath>
            <!-- An alternative database repository example follows. -->
            <!--
            <repositoryPath> db://maildb/deadletter/address-error </repositoryPath>
            -->
         </mailet>
      </processor>

      <!-- This processor handles messages that are for foreign domains, where relaying is denied -->
      <!-- As of James v2.2, this processor can be deprecated by using the <authorizedAddresses> tag
           in the SMTP Server, and rejecting the message in the protocol transaction.  -->
      <processor name="relay-denied">
         <!-- To notify the sender the address was invalid, uncomment this matcher/mailet configuration -->
         <!-- The original message is not attached to keep the bounce processor from deliverying spam -->
         <!--
         <mailet match="All" class="Bounce">
            <attachment>none</attachment>
         </mailet>
         -->

         <!-- To notify the postmaster that a relay request was denied, uncomment this matcher/mailet configuration -->
         <!--
         <mailet match="All" class="NotifyPostmaster"/>
         -->

         <mailet match="All" class="ToRepository">
            <repositoryPath>file://var/mail/relay-denied/</repositoryPath>
            <!-- An alternative database repository example follows. -->
            <!--
            <repositoryPath> db://maildb/deadletter/relay-denied </repositoryPath>
            -->
         </mailet>
      </processor>
   </spoolmanager>

   <!-- DNS Server Block -->
   <!-- -->
   <!-- Specifies DNS Server information for use by various components inside -->
   <!-- James. -->
   .........
.............
...............


I didnt make any changes in the remaining.So can u please tell me the mistake i did?

Regards
Sundeep

Re: Matcher priority

Posted by sundeep Gelli <su...@picmond.com>.
Sorry for that .I realised that it has something to do with my logic and
nothing with the matcher order.
Im sorry once again
Thanx and regards
Sundeep
----- Original Message ----- 
From: "sundeep Gelli" <su...@picmond.com>
To: "James User List" <se...@james.apache.org>
Sent: Wednesday, February 01, 2006 9:25 AM
Subject: Matcher priority


Thanx ,
My config.xml ......Here i need to execute IsFakeSender first and if not
true then mailrecipient. i included some debug statements in null class to
make sure that it is being called.but when i am trying to do so,the
MailMailet is executing first and then the null class is called.Why is this
happening?

Regards
Sundeep

<?xml version="1.0"?>
<!DOCTYPE config [
<!ENTITY listserverConfig SYSTEM "../conf/james-listmanager.xml">
<!ENTITY listserverStores SYSTEM "../conf/james-liststores.xml">
<!ENTITY fetchmailConfig SYSTEM "../conf/james-fetchmail.xml">
]>

<!--  Configuration file for the ASF James server -->

<!--  This file contains important settings that control the behaviour -->
<!--  of all of the services and repositories. -->

<!--                               README!                            -->

<!-- This configuration file is designed to run without alteration for
simple tests. -->
<!-- It assumes you have a DNS server on localhost and assigns a root
password of root. -->

<!-- In case the defaults do not suit you, the items you are most likely to
need to change -->
<!-- are preceded by a CHECKME! or CONFIRM? comment in the left margin. -->

<!-- For production use you will probably need to make more extensive
changes, see -->
<!-- http://james.apache.org/documentation_2_1.html -->

<!-- $Revision: 1.3 $ Committed on $Date: 2006/01/17 01:24:42 $ by: $Author:
kiru $ -->

<config>
   <James>

<!-- CHECKME! -->
      <!-- This is the postmaster email address for this mail server. -->
      <!-- Set this to the appropriate email address for error reports -->
      <!-- If this is set to a non-local email address, the mail server -->
      <!-- will still function, but will generate a warning on startup. -->
      <postmaster>Postmaster@localhost</postmaster>

      <!-- servernames identifies the DNS namespace served by this instance
of James. -->
      <!-- These servernames are used for both matcher/mailet processing and
SMTP auth -->
      <!-- to determine when a mail is intended for local delivery. -->
      <!-- -->
      <!-- If autodetect is TRUE, James wil attempt to discover its own host
name AND -->
      <!-- use any explicitly specified servernames. -->
      <!-- If autodetect is FALSE, James will use only the specified
servernames. -->
      <!-- -->
      <!-- If autodetectIP is not FALSE, James will also allow add the IP
address for each servername. -->
      <!-- The automatic IP detection is to support RFC 2821, Sec 4.1.3,
address literals. -->
      <!-- -->
      <!-- To override autodetected server names simply add explicit
servername elements. -->
      <!-- In most cases this will be necessary. -->
      <!-- By default, the servername 'localhost' is specified. This can be
removed, if required. -->
      <!-- -->
      <!-- Warning: If you are using fetchpop it is important to include
the -->
      <!-- fetched domains in the server name list to prevent
g.       -->
      <servernames autodetect="true" autodetectIP="true">
<!-- CONFIRM? -->
         <servername>unialert.baiduri.com.bn</servername>
      </servernames>

      <!-- Set whether user names are case sensitive or case insensitive -->
      <!-- Set whether to enable local aliases -->
      <!-- Set whether to enable forwarding -->
      <usernames ignoreCase="true" enableAliases="true"
enableForwarding="true"/>

      <!-- The inbox repository is the location for users inboxes -->
      <!-- Default setting: file based repository - enter path ( use
"file:///" for absolute) -->
      <inboxRepository>
         <repository destinationURL="file://var/mail/inboxes/" type="MAIL"/>
      </inboxRepository>

      <!-- Alternative inbox repository definition for DB use. -->
      <!-- The format for the destinationURL is
"db://<data-source>/<table>" -->
      <!-- <data-source> is the datasource name set up in the
database-connections block, below -->
      <!-- <table> is the name of the table to store user inboxes in -->
      <!-- The user name is used as <repositoryName> for this repository
config. -->
      <!--
      <inboxRepository>
         <repository destinationURL="db://maildb/inbox/" type="MAIL"/>
      </inboxRepository>
      -->

      <!-- Alternative inbox repository definition for DB use. -->
      <!-- Stores message body in file system, rest in database -->
      <!--
      <inboxRepository>
         <repository destinationURL="dbfile://maildb/inbox/" type="MAIL"/>
      </inboxRepository>
      -->

      <!-- Alternative inbox repository definition for mbox use. -->
      <!-- This method uses UNIX standard mbox files and is meant for people
using mbox files -->
      <!-- with systems such as mail list archive displayers -->
      <!-- Note that dot-locking is not currently supported -->
      <!-- so network (write) accesses may cause mbox corruption -->
      <!-- the sample mbox URL is an absolute URL; mbox:///var/mail will put
the users mbox files in /var/mail/-->
      <!--
      <inboxRepository>
         <repository destinationURL="mbox:///var/mail/" type="MAIL"/>
      </inboxRepository>
      -->
   </James>

   <!-- Fetch pop block, fetches mail from POP3 servers and inserts it into
the incoming spool -->
   <!-- Warning: It is important to prevent mail from looping by setting
he  -->
   <!-- fetched domains in the <servernames> section of the <James>
k     -->
   <!-- above. This block is disabled by
         -->
   <!-- FetchPOP is being deprecated in favor of
          -->
    <fetchpop enabled="false">
        <!-- You can have as many fetch tasks as you want, but each must
have a -->
        <!-- unique name by which it identified -->
        <fetch name="mydomain.com">
            <!-- Host name or IP address -->
            <host>mail.mydomain.com</host>
            <!-- Account login username -->
            <user>username</user>
            <!-- Account login password -->
            <password>pass</password>
            <!-- How frequently this account is checked - in milliseconds.
600000 is every ten minutes -->
            <interval>600000</interval>
        </fetch>
    </fetchpop>

    <!-- This is an example configuration for FetchMail, a JavaMail based
gateway  -->
    <!-- service that pulls messages from other sources, and inserts them
into the -->
    <!-- spool.  They are then processed normally, although FetchMail
generally    -->
    <!-- has to fabricate some of the envelope information.  FetchMail
should be   -->
    <!-- considered a mail gateway, rather than a relay, in RFC
       -->
    <!-- Fetchmail is a functionally richer replacement for
          -->
    <!-- CHECKME: FetchMail is disabled by default, and must be configured
to use. -->
    <!-- Edit the file referred to by fetchmailConfig to enable and
configure.     -->
    &fetchmailConfig;

   <!-- The James Spool Manager block  -->
   <!-- -->
   <!-- This block is responsible for processing messages on the spool. -->
   <spoolmanager>
      <!-- Number of spool threads -->
      <threads> 10 </threads>

      <!-- Set the Java  from which to load mailets and matchers -->
      <mailetpackages>
         <mailetpackage>org.apache.james.transport.mailets</mailetpackage>
         <mailetpackage>com.picmond.mailets</mailetpackage>
      </mailetpackages>
      <matcherpackages>

<matcherpackage>org.apache.james.transport.matchers</matcherpackage>
         <matcherpackage>com.picmond.matchers</matcherpackage>
      </matcherpackages>

      <!-- The root processor is a required processor - James routes all
mail on the spool -->
      <!-- through this processor first. -->
      <!-- -->
      <!-- This configuration is a sample configuration for the root
processor. -->
      <processor name="root">

         <!-- Checks that the email Sender is associated with a valid
domain. -->
         <!-- Useful for detecting and eliminating spam. -->
         <!-- For this block to function, the spam processor must be
configured. -->
         <!--
         <mailet
match="SenderInFakeDomain=64.55.105.9,64.94.110.11,194.205.62.122,194.205.62
.62,195.7.77.20,206.253.214.102,212.181.91.6,219.88.106.80,194.205.62.42,216
.35.187.246,203.119.4.6" class="ToProcessor">
            <processor> spam </processor>
         </mailet>
         -->

         <!-- Important check to avoid looping -->
         <mailet match="RelayLimit=30" class="Null"/>

         <!--
         <mailet match="All" class="XMLVirtualUserTable">
            <!- 1:1 mapping ->
            <mapping>morgoth@middle-earth=sauron@mordor</mapping>
            <!- 1:n mapping ->

<mapping>istari@middle-earth=saruman@isengard;radigast;gandalf</mapping>
            <!- DSN mapping ->
            <mapping>boromir@osgilliath=error:550 Requested action not
taken: no such user here</mapping>
            <!- regex based mapping ->

<mapping>*@osgilliath=regex:(.*)@osgilliath:${1}@minas-tirith</mapping>
            <!- both standard and regex mapping ->

<mapping>ring@*=onering@mordor;regex:ring@(.*):ring@${1}</mapping>
            <!- conditional regex mapping example ->

<mapping>*@listserver=regex:(.*)-on@listserver:${1}-subscribe@listserver;

regex:(.*)-off@listserver:${1}-unsubscribe@listserver
            </mapping>
         </mailet>
         -->

         <!-- White List:
              If you use block lists, you will probably want to check
              for known permitted senders.  This is particularly true
              if you use more aggressive block lists, such as SPEWS,
              that are prone to block entire subnets without regard
              for non-spamming senders.
          -->

         <!-- specific known senders -->
         <!--
         <mailet match="SenderIs=goodboy@goodhost"
                 class="ToProcessor">
            <processor> transport </processor>
         </mailet>
         -->

         <!-- People on this list agree to pay a penalty if they send
spam -->
         <mailet match="InSpammerBlacklist=query.bondedsender.org"
                 class="ToProcessor">
           <processor> transport </processor>
         </mailet>

         <!-- E-mail legally required not to be spam (see:
http://www.habeas.com) -->
         <!--
         <mailet match="HasHabeasWarrantMark" class="ToProcessor">
            <processor> transport </processor>
         </mailet>
         -->
         <!-- End of White List -->

         <!-- Check for delivery from a known spam server -->
         <!-- This set of matchers/mailets redirect all emails from
known -->
         <!-- black holes, open relays, and spam servers to the spam
processor -->
         <!-- For this set to function properly, the spam processor must be
configured. -->
         <mailet match="InSpammerBlacklist=dnsbl.njabl.org"
                 class="ToProcessor">
           <processor> spam </processor>
           <notice>550 Requested action not taken: rejected - see
http://njabl.org/ </notice>
         </mailet>

         <mailet match="InSpammerBlacklist=relays.ordb.org"
                 class="ToProcessor">
           <processor> spam </processor>
           <notice>550 Requested action not taken: rejected - see
http://www.ordb.org/ </notice>
         </mailet>

         <mailet match="IsValidSender" class="Null"/>
       <mailet match="RecipientIsLocal" class="LocalDelivery"/>
         <mailet match="SmsRecipient" class="SmsMailet"/>
         <mailet match="MailRecipient" class="MailMailet"/>
         <mailet match="BulkMailRecipient" class="BulkMailMailet"/>
         <mailet match="CustomMailRecipient" class="CustomMailMailet"/>
         <mailet match="CustomMessageRecipient"
class="CustomSmsMessageMailet"/>

         <!-- Sample matching to kill a message (send to Null) -->
         <!--
         <mailet match="RecipientIs=badboy@badhost" class="Null"/>
         -->

         <!-- Send remaining mails to the transport processor for either
local or remote delivery -->
         <mailet match="All" class="ToProcessor">
            <processor> transport </processor>
         </mailet>
      </processor>

      <!-- The error processor is required.  James may internally set emails
to the -->
      <!-- error state.  The error processor is generally invoked when there
is an -->
      <!-- unexpected error either in the mailet chain or internal to
James. -->
      <!-- -->
      <!-- By default configuration all email that generates an error in
placed in -->
      <!-- an error repository. -->
      <processor name="error">
         <!-- If you want to notify the sender their message generated an
error, uncomment this       -->
         <!--
         <mailet match="All" class="Bounce"/>
         -->
         <!-- If you want to notify the postmaster that a message generated
an error, uncomment this  -->
         <!--
         <mailet match="All" class="NotifyPostmaster"/>
         -->

         <!-- Logs any messages to the repository specified -->
         <mailet match="All" class="ToRepository">
            <repositoryPath> file://var/mail/error/</repositoryPath>
            <!-- An alternative database repository example follows. -->
            <!--
            <repositoryPath> db://maildb/deadletter/error </repositoryPath>
            -->
         </mailet>
      </processor>

      <!-- Processor CONFIGURATION SAMPLE: transport is a sample custom
processor for local or -->
      <!-- remote delivery -->
      <processor name="transport">

        <!-- This is an example configuration including configuration for a
list server. -->
        <!-- CHECKME: before uncommenting this, edit the configuration
file's contents   -->
        <!--
          &listserverConfig;
        -->

         <!-- Is the recipient is for a local account, deliver it
locally -->
         <mailet match="RecipientIsLocal" class="LocalDelivery"/>

         <!-- If the host is handled by this server and it did not get -->
         <!-- locally delivered, this is an invalid recipient -->
         <mailet match="HostIsLocal" class="ToProcessor">
            <processor> local-address-error </processor>
            <notice>550 - Requested action not taken: no such user
here</notice>
         </mailet>

<!-- CHECKME! -->
         <!-- This is an anti-relay matcher/mailet combination -->
         <!-- -->
         <!-- Emails sent from servers not in the network list are  -->
         <!-- rejected as spam.  This is one method of preventing your -->
         <!-- server from being used as an open relay.  Make sure you
understand -->
         <!-- how to prevent your server from becoming an open relay
before -->
         <!-- changing this configuration. See also <authorizedAddresses> in
SMTP Server -->
         <!-- -->
         <!-- This matcher/mailet combination must come after local delivery
has -->
         <!-- been performed.  Otherwise local users will not be able to
receive -->
         <!-- email from senders not in this remote address list. -->
         <!-- -->
         <!-- If you are using this matcher/mailet you will probably want
to -->
         <!-- update the configuration to include your own
network/addresses.  The -->
         <!-- matcher can be configured with a comma separated list of IP
addresses  -->
         <!-- wildcarded IP subnets, and wildcarded hostname subnets. -->
         <!-- e.g. "RemoteAddrNotInNetwork=127.0.0.1, abc.de.*,
192.168.0.*" -->
         <!-- -->
         <!-- If you are using SMTP authentication then you can (and
generally -->
         <!-- should) disable this matcher/mailet pair. -->
           <mailet match="RemoteAddrNotInNetwork=127.0.0.1,18.*"
class="ToProcessor">
            <processor> relay-denied </processor>
            <notice>550 - Requested action not taken: relaying
denied</notice>
         </mailet>

         <!-- Attempt remote delivery using the specified repository for the
spool, -->
         <!-- using delay time to retry delivery and the maximum number of
retries -->
         <mailet match="All" class="RemoteDelivery">
            <outgoing> file://var/mail/outgoing/ </outgoing>
            <!-- alternative database repository example below -->
            <!--
            <outgoing> db://maildb/spool/outgoing </outgoing>
            -->

            <!-- Delivery Schedule based upon RFC 2821, 4.5.4.1 -->
            <!-- 5 day retry period, with 4 attempts in the first
                 hour, two more within the first 6 hours, and then
                 every 6 hours for the rest of the period. -->
            <delayTime>  5 minutes </delayTime>
            <delayTime> 10 minutes </delayTime>
            <delayTime> 45 minutes </delayTime>
            <delayTime>  2 hours </delayTime>
            <delayTime>  3 hours </delayTime>
            <delayTime>  6 hours </delayTime>
            <maxRetries> 25 </maxRetries>

            <!-- The number of threads that should be trying to deliver
outgoing messages -->
            <deliveryThreads> 1 </deliveryThreads>

            <!-- If false the message will not be sent to given server if
any recipients fail -->
            <sendpartial>false</sendpartial>

            <!-- A single mail server to deliver all outgoing messages. -->
            <!-- This is useful if this server is a backup or failover
machine, -->
            <!-- or if you want all messages to be routed through a
particular mail server, -->
            <!-- regardless of the email addresses specified in the
message -->
            <!-- -->
            <!-- The gateway element specifies the gateway SMTP server
name. -->
            <!-- If your gateway mail server is listening on a port other
than 25, -->
            <!-- you can set James to connect to it on that port using the
gatewayPort -->
            <!-- element. -->
            <!-- Although normally multiple addresses are implemented
through proper -->
            <!-- DNS configuration, the RemoteDelivery mail does allow
specifying -->
            <!-- multiple gateway elements, each of which may also have a
port -->
            <!-- e.g., mygateway:2525 -->
            <!-- the gatewayPort element is used as a default -->
            <!--
            <gateway> otherserver.mydomain.com </gateway>
            <gatewayPort>25</gatewayPort>
            -->
         </mailet>

      </processor>

      <!-- Processor CONFIGURATION SAMPLE: spam is a sample custom processor
for handling -->
      <!-- spam. -->
      <!-- You can either log these, bounce these, or just ignore them. -->
      <processor name="spam">
         <!-- To destroy all messages, uncomment this matcher/mailet
configuration -->
         <!--
         <mailet match="All" class="Null"/>
         -->

         <!-- To notify the sender their message was marked as spam,
uncomment this matcher/mailet configuration -->
         <!--
         <mailet match="All" class="Bounce"/>
         -->

         <!-- To notify the postmaster that a message was marked as spam,
uncomment this matcher/mailet configuration -->
         <!--
         <mailet match="All" class="NotifyPostmaster"/>
         -->

         <!-- To log the message to a repository, this matcher/mailet
configuration should be uncommented. -->
         <!-- This is the default configuration. -->
         <mailet match="All" class="ToRepository">
            <repositoryPath>file://var/mail/spam/</repositoryPath>

            <!-- Changing the repositoryPath, as in this commented out
example, will -->
            <!-- cause the mails to be stored in a database repository.  -->
            <!-- Please note that only one repositoryPath element can be
present for the mailet -->
            <!-- configuration. -->
            <!--
            <repositoryPath> db://maildb/deadletter/spam </repositoryPath>
            -->
         </mailet>
      </processor>

      <!-- This processor handles messages that are for local domains, where
the user is unknown -->
      <processor name="local-address-error">
         <!-- To notify the sender the address was invalid, uncomment this
matcher/mailet configuration -->
         <!-- The original message is not attached to keep the bounce
processor from deliverying spam -->
         <!--
         <mailet match="All" class="Bounce">
            <attachment>none</attachment>
         </mailet>
         -->

         <!-- To notify the postmaster that a message had an invalid
address, uncomment this matcher/mailet configuration -->
         <!--
         <mailet match="All" class="NotifyPostmaster"/>
         -->

         <mailet match="All" class="ToRepository">
            <repositoryPath> file://var/mail/address-error/</repositoryPath>
            <!-- An alternative database repository example follows. -->
            <!--
            <repositoryPath> db://maildb/deadletter/address-error
</repositoryPath>
            -->
         </mailet>
      </processor>

      <!-- This processor handles messages that are for foreign domains,
where relaying is denied -->
      <!-- As of James v2.2, this processor can be deprecated by using the
<authorizedAddresses> tag
           in the SMTP Server, and rejecting the message in the protocol
transaction.  -->
      <processor name="relay-denied">
         <!-- To notify the sender the address was invalid, uncomment this
matcher/mailet configuration -->
         <!-- The original message is not attached to keep the bounce
processor from deliverying spam -->
         <!--
         <mailet match="All" class="Bounce">
            <attachment>none</attachment>
         </mailet>
         -->

         <!-- To notify the postmaster that a relay request was denied,
uncomment this matcher/mailet configuration -->
         <!--
         <mailet match="All" class="NotifyPostmaster"/>
         -->

         <mailet match="All" class="ToRepository">
            <repositoryPath>file://var/mail/relay-denied/</repositoryPath>
            <!-- An alternative database repository example follows. -->
            <!--
            <repositoryPath> db://maildb/deadletter/relay-denied
</repositoryPath>
            -->
         </mailet>
      </processor>
   </spoolmanager>

   <!-- DNS Server Block -->
   <!-- -->
   <!-- Specifies DNS Server information for use by various components
inside -->
   <!-- James. -->
   .........
.............
...............


I didnt make any changes in the remaining.So can u please tell me the
mistake i did?

Regards
Sundeep


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org