james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajender Vallapureddy <rajen...@hnexus.com>
Subject Re: bounce mail messages
Date Mon, 07 Jan 2013 08:45:48 GMT
Hi Eric,

Thank you for your response. Below is my mailetcontainer.conf file.


<?xml version="1.0"?>
<mailetcontainer enableJmx="true">

	<context>
	    <postmaster>postmaster@mydomain.com</postmaster>
	</context>

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

   <mailetpackages>
      <mailetpackage>org.apache.james.transport.mailets</mailetpackage>
      <mailetpackage>org.apache.james.transport.mailets.smime</mailetpackage>
   </mailetpackages>
   <matcherpackages>
      <matcherpackage>org.apache.james.transport.matchers</matcherpackage>
      <matcherpackage>org.apache.james.transport.matchers.smime</matcherpackage>
   </matcherpackages>
  <processors>

    <processor state="root" enableJmx="true">
       <mailet match="All" class="PostmasterAlias"/>
       <mailet match="RelayLimit=30" class="Null"/>
       <mailet match="HasMailAttributeWithValue=org.apache.james.infected,
true" class="ToProcessor">
          <processor>virus</processor>
       </mailet>
       <mailet match="HasMailAttribute=spamChecked" class="ToProcessor">
          <processor>transport</processor>
       </mailet>
       <mailet match="All" class="SetMailAttribute">
          <spamChecked>true</spamChecked>
       </mailet>
       <mailet match="SMTPAuthSuccessful" class="ToProcessor">
          <processor>transport</processor>
       </mailet>
       <mailet match="InSpammerBlacklist=query.bondedsender.org."
                 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 match="All" class="ToProcessor">
          <processor>transport</processor>
       </mailet>
    </processor>

    <processor state="error" enableJmx="true">
       <mailet match="All" class="ToRepository">
          <repositoryPath>file://var/mail/error/</repositoryPath>
       </mailet>
    </processor>

    <processor state="transport" enableJmx="true">
       <mailet match="SMTPAuthSuccessful" class="SetMimeHeader">
          <name>X-UserIsAuth</name>
          <value>true</value>
       </mailet>

       <mailet match="HasMailAttribute=org.apache.james.SMIMECheckSignature"
class="SetMimeHeader">
          <name>X-WasSigned</name>
          <value>true</value>
       </mailet>

         <mailet
match="com.custom.james.matcher.RecipientIsXdAndNotSMIME=http://localhost:8081/config-service/ConfigurationService"
class="com.custom.james.mailet.DirectXdMailet">
            <ConfigURL>http://localhost:8081/config-service/ConfigurationService</ConfigURL>
            <EndpointURL>http://localhost:8081/xd/services/DocumentRepository_Service</EndpointURL>
         </mailet>

        // this is where my custom mail for the bounce is
        <mailet
match="com.permitnonwebmail.matcher.PermitNonWebMailMatcher"
class="com.permitnonwebmail.mailet.PermitNonWebMailMailet">
        </mailet>
         // end custom bounce

         <mailet
match="com.domainmatcher.matcher.CustomRecipAndSenderIsNotLocal=mydomain.com"
class="com.customirect.gateway.smtp.james.mailet.NHINDSecurityAndTrustMailet">
            <ConfigURL>http://localhost:8081/config-service/ConfigurationService</ConfigURL>
            <MessageMonitoringServiceURL>http://localhost:8081/msg-monitor</MessageMonitoringServiceURL>
            <AutoDSNFailueCreation>General,ReliableAndTimely</AutoDSNFailueCreation>
         </mailet>

        <mailet match="com.mdn.matcher.MDNTrackerMatcher"
class="com.mdn.mailet.MDNTrackerMailet">
          <ConsumeMDNProcessed>true</ConsumeMDNProcessed>
        </mailet>

         <mailet
match="com.customirect.gateway.smtp.james.matcher.IsNotification"
class="com.customirect.gateway.smtp.james.mailet.SuppressAndTrackAggregate">
            <MessageMonitoringServiceURL>http://localhost:8081/msg-monitor</MessageMonitoringServiceURL>
            <ConsumeMDNProcessed>false</ConsumeMDNProcessed>
         </mailet>

        <mailet
match="com.custom.james.matcher.RecipientIsXdAndNotSMIME=http://localhost:8081/config-service/ConfigurationService"
class="com.custom.james.mailet.DirectXdMailet">
            <ConfigURL>http://localhost:8081/config-service/ConfigurationService</ConfigURL>
            <EndpointURL>http://localhost:8081/xd/services/DocumentRepository_Service</EndpointURL>
         </mailet>

         <mailet match="RecipientIsLocal"
class="com.customirect.gateway.smtp.james.mailet.TimelyAndReliableLocalDelivery"/>

       <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="spam" enableJmx="true">
       <mailet match="All" class="ToRepository">
          <repositoryPath>file://var/mail/spam/</repositoryPath>
       </mailet>
    </processor>

    <processor state="virus" enableJmx="true">
       <mailet match="All" class="SetMailAttribute">
          <org.apache.james.infected>true, bouncing</org.apache.james.infected>
       </mailet>

       <mailet match="SMTPAuthSuccessful" class="Bounce">
          <inline>heads</inline>
          <attachment>none</attachment>
          <notice>Warning: We were unable to deliver the message below
because it was found infected by virus(es).</notice>
       </mailet>

       <mailet match="All" class="Null" />
    </processor>

    <processor state="local-address-error" enableJmx="true">
	   <mailet match="All"
class="com.customirect.gateway.smtp.james.mailet.DirectBounce"/>
    </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>

Appreciate you help.

Thank you,
Regards,
Rajender

On Mon, Jan 7, 2013 at 12:49 PM, Eric Charles <eric@apache.org> wrote:
> Hi,
>
> If you are receiving the bounce and the original message, the issue should
> be more on the way you configured the processors in mailetcontainer.conf.
>
> Probably the LocalDelivery is before your CustomMailMailet.
>
> Can you paste here your mailetcontainer.conf?
>
> Thx, Eric
>
>
> On 06/01/2013 13:10, Rajender Vallapureddy wrote:
>>
>> Hi Eric,
>>
>> I have no problem in receiving the bounce and I won't be need the
>> original message in it.
>>
>> The problem is the original mail is getting to the recipient and the
>> bounce mail is being sent to the sender.
>>
>> Here is my scenario:
>>
>> When I am sending a self mail, I am receiving the bounce mail as well
>> as the original mail both of them being delivered when it should have
>> been only the bounce mail that I should be receiving.
>>
>> Following is my skeleton code of my mailet.
>>
>> public class CustomMailMailet extends AbstractNotify {
>>          @Override
>>          public void service(Mail mail) throws MessagingException {
>>
>>             if(condition fails) {
>>                super.service(mail);
>>             }
>>         }
>> }
>>
>> Following is the my configuration in the mailetcontainer.conf
>>
>>          <mailet match="com.webmail.matcher.CustomMailMatcher"
>> class="com.webmail.mailet.CustomMailMailet">
>>            <attachError>true</attachError>
>>            <message>mail from non webmail client denied</message>
>>            <prefix>bounce</prefix>
>>            <attachment>none</attachment>
>>            <passThrough>true</passThrough>
>>            <debug>true</debug>
>>          </mailet>
>>
>> Appreciate your help on it.
>>
>> Thank you,
>> Regards,
>> Rajender
>>
>>
>> On Sat, Jan 5, 2013 at 11:38 PM, Eric Charles <eric@apache.org> wrote:
>>>
>>> AbstractRedirect
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-dev-help@james.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>

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


Mime
View raw message