Norman Maurer wrote:
Ah ok so if i want to scan emails per domain and add flags for the
things i found i should use the message.addHeader and not
mail.addAttribute right ? mail.addAttribute will add it to all emails
and mail.addHeader only to the one that get proceed via the mailet...
Why do you need to flag mails for domain?
Please explain what behaviour you need and we'll tell you the best way.
"Header" is a message property and is contained in the message that will
be delivered, "Attribute" is just an attribute specific to james that
you can use in your spooling logic or in your mailet logic.
Both Header and Attribute are common to the WHOLE mail, you have to
split the mail if you need to set different header/attributes per
recipients!
<mailet match="HostIs=domain1.com" class="SetMailAttribute">
<attr1>y</attr1>
<attr2>a</attr2>
</mailet>
<mailet match="HostIs=domain2.com" class="SetMailAttribute">
<attr1>y</attr1>
<attr2>a</attr2>
</mailet>
<mailet match="HostIs=domain3.com" class="SetMailAttribute">
<attr1>x</attr1>
<attr2>a</attr2>
</mailet>
<mailet match="HostIs=domain4.com" class="SetMailAttribute">
<attr1>x</attr1>
<attr2>b</attr2>
</mailet>
<mailet match="HasMailAttributeWithValue=attr2,a" class="DoSomething">
.....
</mailet>
<mailet match="HasMailAttributeWithValue=attr1,x" class="DoSomethingElse">
.....
</mailet>
Stefano
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]