Cook macaroni in salted boiling water according to package directions. Drain and rinse with cold water. Pour into a 2-quart baking dish.
In a saucepan, melt butter and stir in flour. Cook and stir for one minute. Gradually stir in milk. Add sour cream, Parmesan cheese, salt, pepper and mustard. Cook over medium-low heat, stirring constantly, until sauce bubbles and thickens. Stir in half of the Cheddar cheese until melted.
Toss macaroni with remaining Cheddar cheese, the mozzarella cheese, ricotta cheese, tomatoes, and ham. Pour sauce over this macaroni mixture and mix thoroughly.
Bake, uncovered, for about 1 hour, or until bubbly and brown.