Hi All,

I'm new to James and having trouble with what is probably a really basic concept

Here's my problem - I want to listen for incoming SMTP traffic and on the basis 
of the X-Headers of each message I want to do some processing  and then, again 
based on the X-Headers, deliver to a specific remote server

The essence of what I'm trying to achieve is shown by the config snippet below

The problem is of course is that the remote RemoteDelivery mailets, once 
triggered by an incoming message, do the correct thing for that message then 
listen for **any** further messages regardless of whether they match the 
matcher criteria or not!

So the question is what basic structure to I need to achieve my goal? The 
detail seems to wok fine: custom mailets, custom matchers, etc. It's the bigger 
picture I'm missing. I tried looking at the source and on the Internet but 
found nothing that looks relevant

Phil 

                        <matcher name="Case1" match="And">
                                <matcher match="HasHeader=X-..."/>
                                ..
                        </matcher>

                        <matcher name="Case2" match="And">
                                <matcher match="HasHeader=X-..."/>
                                ..
                        </matcher>
                        ...
                        <matcher name="CaseN" match="And">
                                <matcher match="HasHeader=X-..."/>
                                ..
                        </matcher>


                        <mailet match="Case1" class="Case1Mailet">
                                ...
                        </mailet>
                        <mailet match="Case1" class="RemoteDelivery">
                                <outgoingQueue>outgoing</outgoingQueue>
                                <delayTime>...</delayTime>
                                <maxRetries>25</maxRetries>
                                <maxDnsProblemRetries>0</maxDnsProblemRetries>
                                <deliveryThreads>10</deliveryThreads>
                                <sendpartial>true</sendpartial>
                                <bounceProcessor>bounces</bounceProcessor>

                                <gateway>Case1Server:port</gateway>
                                <debug>true</debug>
                        </mailet>
                        ...
                        <mailet match="CaseN" class="CaseNMailet">
                                ...
                        </mailet>
                        <mailet match="CaseN" class="RemoteDelivery">
                                <outgoingQueue>outgoing</outgoingQueue>
                                <delayTime>...</delayTime>
                                <maxDnsProblemRetries>0</maxDnsProblemRetries>
                                <deliveryThreads>10</deliveryThreads>
                                <sendpartial>true</sendpartial>
                                <bounceProcessor>bounces</bounceProcessor>

                                <gateway>CaseNServer:port</gateway>
                                <debug>true</debug>
                        </mailet>

Reply via email to