Channel Filter Problem

I create this filter:

require "fileinto";

require "notify";

require "variables";

if allof(

header :contains ["To","Cc","Bcc","Resent-to","Resent-cc","Resent-bcc"] "edp@test.com",

not header :contains ["From","Sender","Resent-from","Resent-sender","Return-path"] "test.com"

)

{

keep;

redirect "group@test.com";

#redirect "user@test.com";

keep;

}

group@test.com is a mailing list.

user@test.com is a single user.

If I redirect email to user@test.com work without problem.

If I redirect to gorup@test.com the users on gorup@test.com receive 10 email all equal.

Any Ideas ?

Bye Giovanni

[715 byte] By [giovanni.romaneghia] at [2007-11-27 4:17:05]
# 1
I use :Sun Java(tm) System Messaging Server 6.2-8.04 (built Feb 28 2007)libimta.so 6.2-8.04 (built 19:20:35, Feb 28 2007)SunOS sunmail 5.10 Generic_125101-01 i86pc i386 i86pc
giovanni.romaneghia at 2007-7-12 9:23:40 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 2

Hi,

I don't see how this differs from your other sieve filter question...

The reason you are seeing duplicates for multiple channel based redirects is that a redirect changes the envelope rcpt address and there is no mechanism in your script to stop looping.

As channel based redirects requeues, you keep having the requeued email match again and again (since it is a channel based rule) and swap recipients back and forth between group@test.com and user@test.com, a copy of the email being kept for the recipient each time. After 10 or so goes, the maximum received header check kicks in and holds the message from further processing.

As a user-level sieve (added to the account associated with edp@test.com) you won't hit the same problem because once the envelope recipient changes the sieve-rule is no longer associated with the end-user and thus doesn't get triggered, hence no looping.

Regards,

Shane.

shane_hjortha at 2007-7-12 9:23:40 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 3

I have add the attribute: mailsiverulesource

which this value:

#RULE: $Name="servizio-edp"$Order=1$Type="ALL_INCOMING_MESG" require "fileinto"; require "notify";require "variables"; #BEGINFILTER if allof(header :contains ["To","Cc","Bcc","Resent-to","Resent-cc","Resent-bcc"] "servizio-edp@metaltex.com",not header :contains ["From","Sender","Resent-from","Resent-sender","Return-path"] "metaltex.com"){ keep; redirect "gruppo1@metaltex.com"; } #ENDFILTER

but the problem is the same when redirect to single user forward only 1 email when I redirect to group receive 10 emails.

Other Idea ?

Thank's

Giovanni

giovanni.romaneghia at 2007-7-12 9:23:41 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 4

Excuse me.

When apply this filter to user with attribute mailsievesourcefilter in this mode:

#RULE: $Name="edp"$Order=1$Type="ALL_INCOMING_MESG" require "fileinto"; require "notify";require "variables"; #BEGINFILTER if allof(header :contains ["To","Cc","Bcc","Resent-to","Resent-cc","Resent-bcc"] "edp@test.com",not header :contains ["From","Sender","Resent-from","Resent-sender","Return-path"] "test.com"){ keep; redirect "group@test.com"; } #ENDFILTER

Bye Giovanni

giovanni.romaneghia at 2007-7-12 9:23:41 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 5
Hi,I don't suppose one of the members of "group@test.com" is the user for whom you are adding the mailsieverulesource?Regards,Shane.
shane_hjortha at 2007-7-12 9:23:41 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 6
The user is not a member of group@test.com. Now with filter to user with attribute mailsieverulesource the user receive email but don't forward email to group. Giovanni
giovanni.romaneghia at 2007-7-12 9:23:41 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...