Thank you so much for your reply.
Today I tested you implementation but it didn't work. I tested booth, 1st and 2nd cases and the duplicated emails just keep coming.
I edited the .mailfilter of my test accounts and added you modifications to the cc line. Maybe I missunderstand something, but just that didn't made any difference other than a message Id been added to the .duplicate.cache for each incoming email.
If you have any other ideas I can gladly try.