BUG?: Blocked domains and senders fail to be moved to the Junk Mail folder

It seems that when the sender’s email address contains a phrase (eg “Email Name” emailaddress@testing.com) the blocked senders/domain rules don’t work. I think I’ve tracked down why. Is there anyone who can confirm this or shoot down my thinking?

The From field for an incoming email contains: “Email Name” emailaddress@testing.com

The blocked addresses/domains filter field in the Calendar Profile (in my case: $FilterFormula_4) contains the following formula:

JunkList := “emailaddress@testing.com\xdd@testing.com”;

FromList:=@LowerCase(@Name([Abbreviate];@If(Principal!=“”; Principal; SMTPOriginator!=“”; SMTPOriginator; From) ));

@If( @IsMember(FromList; @Transform(@Explode(JunkList;“\xdd”); “t2”; @If(@Left(t2;1)!=“@”; t2 ;“”))) |

@IsMember(@Transform(fromlist; “t3”; “@”+@Right(t3; “@”)); @Explode(JunkList;“\xdd”)) ;

@Do(@MailFilterAddToFolder(“AF10093768DDE30285256D0A006EEF2C”;@True); @SetField(“$Block”;“1”));

“”)

This email is supposed to be caught by both the first and the second conditions in the @if.

However in the first condition the sender’s address (FromList) is “Email Name” emailaddress@testing.com rather than emailaddress@testing.com and therefore it doesn’t match.

In the second condition the transform function (@Transform(fromlist; “t3”; “@”+@Right(t3; “@”))) returns testing.com> (note the ending “>”) rather than testing.com and therefore it doesn’t match.

The way I’m thinking the FromList formula should use @name([ADDRESS821]; name) rather than @name([ABBREVIATE]; name). To fix this I think I would need to change the line of code in the script library:

Script Library: BlockUserRule

Class: JunkRules

Function: BuildFormula

line: strFormulaField = |FromList:=@LowerCase(@Name([Abbreviate];@If(Principal!=“”; Principal; SMTPOriginator!=“”; SMTPOriginator; From) ));|

Now the question is would changing this line break anything else in the mail template? I have tested it in both Notes 7 mail files and Notes 8 mail files and I haven’t found any problems.