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
# 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.
# 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
# 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