Question on mail routing

Hello, I have a basic question on mail routing on domino and hoping to find a simple solution.

Background:

We have a customized mail-in db which receives mails from 3 separate mail IDs (user1@acme.com/user2@acme.com/user3@acme.com)

There are 3 separate folders for each user, and a before-mail agent to move the incoming mail to the relevant folder by scanning the sendTo/copyTo/blindcopyto fields.

Issue:

Often we get mails addressed to multiple users at the same time (e.g., Sendto: user1, user2). In this case, the server generates 2 emails and both of them would be deposited in user1’s folder, when ideally there should be one in each folder.

Is there anyway to determine who exactly is the recipient of the current message, there must be some logic in the router to keep track of this.

Due to some constraints, we cannot create aliases or separate mailboxes. All mails would be be from the same domain.

Any bright ideas?

Thanks

Rakesh

Subject: create a copy, delete the original

What about writing your script such that it creates a copy and puts it in the folder, and deletes the original? Then the logic could be:If (to/cc/bcc contains user1) then

create a copy, set whatever fields,

and put copy in folder1

end if

if (to/cc/bcc contains user2) then

create a copy, set whatever fields,

and put copy in folder2

end if

if (to/cc/bcc contains user3) then

create a copy, set whatever fields,

and put copy in folder3

end if

delete original

Subject: Thanks

Yeah, that seems to be only solution.Thanks.

Subject: Re: Question on mail routing

You may create Rules if you inherit the design on the standard mail db. Just create seven Rules like the sample below.

WHEN Sender contains Username1

AND Sender contains Username2

AND Sender contains Username3

THEN  copy to Folder Folder3

AND copy to Folder Folder2

AND move to folder Folder1

WHEN Sender contains Username1

AND Sender contains Username2

AND Sender does not contain Username3

THEN  copy to Folder Folder2

AND move to folder Folder1

WHEN Sender contains Username1

AND Sender does not contain Username2

AND Sender contains Username3

THEN  copy to Folder Folder3

AND move to folder Folder1

WHEN Sender does not contain Username1

AND Sender contains Username2

AND Sender contains Username3

THEN  copy to Folder Folder3

AND move to folder folder2

WHEN Sender contains Username1

AND Sender does not contain Username2

AND Sender does not contain Username3

THEN  move to folder Folder1	



WHEN Sender does not contain Username1

AND Sender contains Username2

AND Sender does not contain Username3

THEN  move to folder Folder2	



WHEN Sender does not contain Username1

AND Sender does not contain Username2

AND Sender contains Username3

THEN  move to folder Folder3

Subject: Not using a rule

Thanks for your quick response.I am not using a rule to do the sorting, but a before-new mail agent (as there are few other fields being set).

Unfortunately, Before-new mail agents are not allow to Put a mail in multiple folders at the same time.