Hi there,

sorry you need to use the HostIs matcher an not SenderHostIs and use passThrough= false. I guess I need more sleep ;)

So this should work:

<mailet notmatch="HostIs=Florida-HIE.net" class="Bounce">
    <message>You can not send email to other domains other than 
Florida-HIE.net</message>
    <attachment>NONE</attachment>
    <passThrough>false</passThrough>
 </mailet>

The passThrough = false takes care that the mail will "stop" after the Bounce 
Mailet was called..

Bye,
Norman




Am 27.07.2011 22:09, schrieb Saibabu Vallurupalli:
I am pasting my mailetcontainer.xml below:

<?xml version="1.0"?>
<!--
   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.
  -->
<!-- See http://james.apache.org/server/3/config.html for usage -->
<mailetcontainer enableJmx="true">
   <context>
     <postmaster>Postmaster@localhost</postmaster>
   </context>

   <spooler>
     <threads>  20</threads>
   </spooler>

   <processors>
     <processor state="root" enableJmx="true">
       <mailet match="All" class="PostmasterAlias"/>
       <mailet match="RelayLimit=30" class="Null"/>
       <mailet match="SMTPAuthSuccessful" class="ToProcessor">
         <processor>transport</processor>
       </mailet>
       <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 notmatch="SenderHostIs=Florida-HIE.net" class="Bounce">
    <message>You can not send email to other domains other than
Florida-HIE.net</message>
    <attachment>NONE</attachment>
     </mailet>
        <mailet match="All" class="ToProcessor">
         <processor>transport</processor>
        </mailet>
      </processor>
     <processor state="transport" enableJmx="true">
       <mailet match="SMTPAuthSuccessful" class="SetMimeHeader">
         <name>X-UserIsAuth</name>
         <value>true</value>
       </mailet>

       <mailet match="All" class="RecipientRewriteTable">

<recipientrewritetable>DefaultRecipientRewriteTable</recipientrewritetable>
       </mailet>
       <!-- Disable this if you want to have case-sensitive local-parts of
the recipients -->
       <mailet match="RecipientIsLocal" class="RecipientToLowerCase"/>

       <mailet match="RecipientIsLocal" class="LocalDelivery"/>
       <mailet match="HostIsLocal" class="ToProcessor">
         <processor>local-address-error</processor>
         <notice>550 - Requested action not taken: no such user here</notice>
       </mailet>
       <mailet match="All" class="RemoteDelivery">
         <outgoingQueue>outgoing</outgoingQueue>
         <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>
         <maxDnsProblemRetries>0</maxDnsProblemRetries>
         <deliveryThreads>10</deliveryThreads>
         <sendpartial>true</sendpartial>
         <bounceProcessor>bounces</bounceProcessor>
       </mailet>
     </processor>
     <processor state="error" enableJmx="true">
       <mailet match="All" class="ToRepository">
         <!--<repositoryPath>file://var/mail/error/</repositoryPath>-->
   <repositoryPath>db:///jamesdb/error</repositoryPath>
       </mailet>
     </processor>
     <processor state="spam" enableJmx="true">
       <mailet match="All" class="ToRepository">
         <repositoryPath>file://var/mail/spam/</repositoryPath>
       </mailet>
     </processor>
     <processor state="local-address-error" enableJmx="true">
   <mailet match="All" class="Bounce">
             <attachment>none</attachment>
          </mailet>
<!--<mailet match="All" class="ToRepository">
         <repositoryPath>file://var/mail/address-error/</repositoryPath>
       </mailet>-->
     </processor>
     <processor state="relay-denied" enableJmx="true">
       <mailet match="All" class="ToRepository">
         <repositoryPath>file://var/mail/relay-denied/</repositoryPath>
       </mailet>
     </processor>
     <processor state="bounces" enableJmx="true">
       <mailet match="All" class="DSNBounce">
         <passThrough>false</passThrough>
       </mailet>
     </processor>
   </processors>
</mailetcontainer>


On Wed, Jul 27, 2011 at 4:00 PM, Norman Maurer<norman.mau...@googlemail.com
wrote:
please show me your mailetcontainer.xml

Thanks,
  Norman


2011/7/27 Saibabu Vallurupalli<saibabu.vallurupa...@gmail.com>:
No Bounce at all. Email sent successfully :-(

s...@mydomain.net to s...@yahoo.com

Worked. And I don't want this to work.

Thanks, Sai

On Wed, Jul 27, 2011 at 3:44 PM, Norman Maurer<
norman.mau...@googlemail.com
wrote:
So is the bounce send and the original email too ? Or no bounce at all ?

Bye,
Norman


2011/7/27 Saibabu Vallurupalli<saibabu.vallurupa...@gmail.com>:
  >  I have configure my mailetcontainer.xml file to restrict the domain
and
I am
still able to send emails to any email Id other than mydomain.netwhich
I
have set to use. Below are my settings:
<mailet notmatch="SenderHostIs=mydomain.net" class="Bounce">
   <message>You can not send email to other domains other than
Florida-HIE.net</message>
   <attachment>NONE</attachment>
</mailet>

Please let me know if there is any other setting I am missing.


Thank you, Sai.

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org

Reply via email to