I think you're going to be best off doing some sort of pre-processing on the incoming e-mail. You might be able to do this in rt-mailgate but I don't know how myself. I don't think you'll have any luck in a scrip because by that point it's in its own ticket.