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 Jay Kraly <ja...@perspectivesoftware.com> on 2003/07/22 01:11:16 UTC

processor question

I'm using James to serve a couple lists using a slightly modified 
version of the listserv provided in the James source.  Everything works 
fine if somebody emails "list-xxxxxx@mailhost.perspectivesoftware.com".  
I have a matcher in the root processor that catches "list-xxxxxxx" and 
sends it to the listserv mailet.  However, if somebody sends to 
"list-xxxxxxx@mailhost.perspectivesoftware.com,list-yyyyyyy@mailhost.perspectivesoftware.com" 
the mailet only picks up the first list and discards the second address.

Is there a better processor for me to put the matcher where it would 
catch the two distinct lists after they are split by James?  Or do I 
have to rewrite the listserv to be more intelligent about recognizing 
that more than one list is involved?

Thanks

-J










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


Re: listserv problem (was RE: processor question)

Posted by Jay Kraly <ja...@perspectivesoftware.com>.
So then the set of non-matching recipients picks up at the next mailet?

That may explain my problem.  I wrote a matcher called "RecipientIsLike" 
which matches any recipient like "list" and sends it to my custom 
listserv.  The listserv then looks at the original recipient and queries 
the database for the list of users.  Which means that I only have one 
mailet that will match the "list" so that I don't have to modify the 
config.xml file everytime my users add a list to the database.  
Technically both recipients in the example "list1@perspectivehost.com, 
list2@perspectivehost.com" should match.  Then the listserv only 
processes the first in the list so it never sees the second listserv 
address. In your example it would work because you have separate and 
distinct mailet/matches for each list. 

So my backup plan of looping through all recipients in my listserv 
mailet is actually a good solution since it will process all matches, 
and any non-matches will continue on through the processor pipe.  
Right?  I was worried about losing the non-matches but it sounds like 
that won't be a problem.

In any case, it doesn't sound like there are any bugs here, just a 
misunderstanding of how things work.

-J


Noel J. Bergman wrote:

>Wait a minute ... Jay, I was wrong ... distracted making dinner ... hold on.
>
>The matcher does it.  The way a matcher works is that it selects the
>recipients that will be processed by the mailet.  Matchers like HostIs are
>just all or nothing, but otherwise, the matcher says which subset of
>recipients will be processed.
>
>So if I have multiple recipients, and use RecipientIs, then only that
>recipient should be passed along to the mailet for processing.
>
>So if I have e-mail sent to "list1@perspectivehost.com,
>list2@perspectivehost.com", what should happen is that the RecipientIs
>matchers should peel off a single recipient for the listserv mailet.  The
>recipient set will get split into two sets: matching and notMatching.  As
>long as neither one is empty, it continues.  So the matching set, containing
>just the current list, should be processed by the listserv.  The message is
>then ghosted.  But the other set still continues with its duplicate of the
>message.
>
>So now that I've had my dinner, if you are not seeing the above behavior,
>then we need to find out why.
>
>Ignore my earlier message.
>
>	--- Noel
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>For additional commands, e-mail: server-user-help@james.apache.org
>
>
>  
>


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


RE: listserv problem (was RE: processor question)

Posted by "Noel J. Bergman" <no...@devtech.com>.
Wait a minute ... Jay, I was wrong ... distracted making dinner ... hold on.

The matcher does it.  The way a matcher works is that it selects the
recipients that will be processed by the mailet.  Matchers like HostIs are
just all or nothing, but otherwise, the matcher says which subset of
recipients will be processed.

So if I have multiple recipients, and use RecipientIs, then only that
recipient should be passed along to the mailet for processing.

So if I have e-mail sent to "list1@perspectivehost.com,
list2@perspectivehost.com", what should happen is that the RecipientIs
matchers should peel off a single recipient for the listserv mailet.  The
recipient set will get split into two sets: matching and notMatching.  As
long as neither one is empty, it continues.  So the matching set, containing
just the current list, should be processed by the listserv.  The message is
then ghosted.  But the other set still continues with its duplicate of the
message.

So now that I've had my dinner, if you are not seeing the above behavior,
then we need to find out why.

Ignore my earlier message.

	--- Noel


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


Re: listserv problem (was RE: processor question)

Posted by Jay Kraly <ja...@perspectivesoftware.com>.
OK, I'll add it.

For future reference what is the mechanism in James that would split the 
two if the first wasn't a "list-" match?  I noticed that if I send to 
"somebody@someexternalhost.com,list-xxxxx@mailhost.perspectivesoftware.com" 
something causes the second email address for the listserv to be put 
back through the processors so that it works as expected.  It seems like 
if I could put the listserv mailet at a different point in the processor 
piping the two addresses would be split into independent messages before 
it ever got to the mailet and matcher.

In the meantime I'll probably modify my listserv mailet to loop through 
all the recipients and send to them rather than just the first in the list.

Thanks.

-J

Noel J. Bergman wrote:

>>if somebody sent to "list-xxxxx@mailhost.perspectivehost.com,
>>list-yyyyy@mailhost.perspectivehost.com" wouldn't the first
>>matcher catch the email and then ghost it when done so the
>>second match on "list-yyyyyy" would never happen?
>>    
>>
>
>Please put that in bugzilla.  There isn't a quick fix because the mailet
>doesn't know the address that caused it to be invoked.
>
>JDBCListserv supports a <list_address> element, which tells it the address
>it supports.  That should probably be added to AvalonListserv.
>
>Mark's new list serve has the same bug.
>
>	--- Noel
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>For additional commands, e-mail: server-user-help@james.apache.org
>
>
>  
>

listserv problem (was RE: processor question)

Posted by "Noel J. Bergman" <no...@devtech.com>.
> if somebody sent to "list-xxxxx@mailhost.perspectivehost.com,
> list-yyyyy@mailhost.perspectivehost.com" wouldn't the first
> matcher catch the email and then ghost it when done so the
> second match on "list-yyyyyy" would never happen?

Please put that in bugzilla.  There isn't a quick fix because the mailet
doesn't know the address that caused it to be invoked.

JDBCListserv supports a <list_address> element, which tells it the address
it supports.  That should probably be added to AvalonListserv.

Mark's new list serve has the same bug.

	--- Noel


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


Re: processor question

Posted by Jay Kraly <ja...@perspectivesoftware.com>.
Its a listserv based on the old listserv, I think I modified the 
JDBCListServ.  I have the mailet in the root processor, matching on 
"RecipientIsLike=list-".

The problem is that if somebody sends a comma separated list of 
recipients my matcher picks it up as one address and the second address 
just gets dropped.  I'm guessing that somewhere along the way the comma 
separated list should have already been broken up into two "rcpt to:' 
entries, but that is out of my control.

In your example below, if somebody sent to 
"list-xxxxx@mailhost.perspectivehost.com,list-yyyyy@mailhost.perspectivehost.com" 
wouldn't the first matcher catch the email and then ghost it when done 
so the second match on "list-yyyyyy" would never happen?

-J

Noel Bergman wrote:

>>if somebody sends to "list-xxxxxxx@mailhost.perspectivesoftware.com,
>>list-yyyyyyy@mailhost.perspectivesoftware.com" the mailet only picks
>>up the first list and discards the second address.
>>    
>>
>
>How are you matching?  Which mailet?  I would have something like:
>
>  <mailet match="CommandForListserv=list-xxxxx@mailhost.perspectivehost.com"
>          class="AvalonListservManager">
>    <repositoryName>list-xxxxx</repositoryName>
>  </mailet>
>
>  <mailet match="CommandForListserv=list-yyyyy@mailhost.perspectivehost.com"
>          class="AvalonListservManager">
>    <repositoryName>list-yyyyy</repositoryName>
>  </mailet>
>
>  <mailet match="RecipientIs=list-xxxxx@mailhost.perspectivehost.com"
>          class="AvalonListserv">
>    <repositoryName>list-xxxxx</repositoryName>
>  </mailet>
>
>  <mailet match="RecipientIs=list-yyyyy@mailhost.perspectivehost.com"
>          class="AvalonListserv">
>    <repositoryName>list-yyyyy</repositoryName>
>  </mailet>
>
>That's using the old listserv (current listserv).  I haven't switched over
>to using Mark's new one, yet.
>
>	--- Noel
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>For additional commands, e-mail: server-user-help@james.apache.org
>
>
>  
>

RE: processor question

Posted by "Noel J. Bergman" <no...@devtech.com>.
> if somebody sends to "list-xxxxxxx@mailhost.perspectivesoftware.com,
> list-yyyyyyy@mailhost.perspectivesoftware.com" the mailet only picks
> up the first list and discards the second address.

How are you matching?  Which mailet?  I would have something like:

  <mailet match="CommandForListserv=list-xxxxx@mailhost.perspectivehost.com"
          class="AvalonListservManager">
    <repositoryName>list-xxxxx</repositoryName>
  </mailet>

  <mailet match="CommandForListserv=list-yyyyy@mailhost.perspectivehost.com"
          class="AvalonListservManager">
    <repositoryName>list-yyyyy</repositoryName>
  </mailet>

  <mailet match="RecipientIs=list-xxxxx@mailhost.perspectivehost.com"
          class="AvalonListserv">
    <repositoryName>list-xxxxx</repositoryName>
  </mailet>

  <mailet match="RecipientIs=list-yyyyy@mailhost.perspectivehost.com"
          class="AvalonListserv">
    <repositoryName>list-yyyyy</repositoryName>
  </mailet>

That's using the old listserv (current listserv).  I haven't switched over
to using Mark's new one, yet.

	--- Noel


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