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 Martin Woolley <ma...@woolleynet.com> on 2003/08/14 15:23:15 UTC

Duplicate message handling?

Hi

I'm a little confused by the behaviour on one of my matchers or perhaps more
accurately, the behaviour of my james system as a whole!

Some messages seem to be being processed twice by the spoolmanager though
I'm not exactly sure. Here's the background, followed by the symptom:

Background:
I have set up the system with the intention that it behave as follows:

fetchpop:
 fetchpop downloads email from an external POP3 account periodically.

root processor:
1.  if message addressed to blocked@localhost then hand on to the transport
processor for delivery
2.  if message contains unwanted content, forward it to blocked@localhost
3.  apply standard anti-spam checks
4.  Hand on to the transport processor

transport processor:
1. if message was fetched from my pop3 account hand on to processor
"multidrop"

multidrop processor:
1. if message addressed to certain recipients, do LocalDelivery
2. if message addressed to other, specified recipients, hand on to the
whitelist processor

whitelist processor:
1. if sender is allowed then do LocalDelivery
2. else forward to blocked@localhost

Root processor step 2 is the key bit. I wrote my own matcher called
IsSuspectMail. It uses an object of class MessageEvaluator. Various checks
get applied to the content of a message, and if the message matches the
checks I write (append) a record to an external log file called
blocked.audit.

The Symptom:
In my blocked.audit log file, I can see that messages are being processed
twice by two different instances of MessageEvaluator, at slightly different
times. This is illustrated below. Only one copy of the message gets
forwarded to blocked@localhost (which is the desired result). So the only
real problem is duplicate messages in my log file. I'd just like to
understand what's going on here as I suspect I will learn something
valuable.

blocked.audit log file extract:

Thu Aug 14 13:59:16 GMT 2003 Src:1 From:Martin Woolley
<ma...@woolleynet.com>;: To:Martin Woolley <ma...@woolleynet.com>;**empty
CC**;**empty BCC**;: Subject:Fw: RE:cost Geoge Bush xexqd: Reason: Contains
dictionary phrase: meds247,com.woolleynet.james.MessageEvaluator@859a68
State=root
Thu Aug 14 13:59:17 GMT 2003 Src:1 From:Martin Woolley
<ma...@woolleynet.com>;: To:Martin Woolley <ma...@woolleynet.com>;**empty
CC**;**empty BCC**;: Subject:Fw: RE:cost Geoge Bush xexqd: Reason: Contains
dictionary phrase: meds247,com.woolleynet.james.MessageEvaluator@17ec9f7
State=root

Not easy to read when pasted into an email, but this shows the same message
(same sender, recipient, subject etc plus I sent the message so I *know*
it;s the same!) being logged twice, but by different instances of the object
responsible. This suggests the corresponding matcher is being involked twice
on the message in close succession. Notice that the state is root in both
cases.

Hope I have made sense and I look forward to having the error of my ways
explained to me.

Thanks in anticipation

Martin
---------------------------------------------------------------------------T
his email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
Copying this email or in any way disseminating its content to any other
person is strictly prohibited. If you have received this email in error
please notify postmaster@eigroup.com
--------------------------------------------------------------------------
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
Copying this email or in any way disseminating its content to any other
person is strictly prohibited. If you have received this email in error
please notify postmaster@eigroup.com

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


RE: Duplicate message handling?

Posted by "Noel J. Bergman" <no...@devtech.com>.
> This suggests the corresponding matcher is being invoked twice
> on the message in close succession.

If you turn on DEBUG for the spool manager, you'll see which matchers are
being called, and when.

	--- Noel


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