Bring a large pot of lightly salted water to boil. Add the macaroni and cook until tender, about 8 minutes. Rinse under cold water until chilled and drain.
In a large bowl, whisk together the mayonnaise, vinegar, sugar, mustard, salt and pepper until the sugar and salt have both dissolved. Stir in the onion, celery, green pepper, pimentos. Gently fold in chilled macaroni.