This paper addresses the operation problem of the cross docking system in a mail distribution center. Trucks from various regions arrive at the receiving door and unload palettes that are full of postal parcels of various destinations. Each palette is identifiable by its destination tag. Each shipping door in the center is designated by a destination name and certain destination needs more than one shipping door. To enhance the operating efficiency of the center, destinations are clustered into six groups currently. The arriving palettes of the same group are lined up in queue at the receiving door area to be whisked away to the shipping area by electric tractor which carries approximately seven palettes at a time. At the shipping area the palettes are sorted and then loaded into the waiting outgoing trucks. The assignment of each destination to shipping door, the clustering of destinations to form groups as well as the deciding the number of groups are important managerial decisions for the manager. For the problems, a nonlinear programming model is developed with the objective of minimizing the travel distance of the palettes. Heuristic method and genetic algorithm are presented and tested on the real world data. The results show a substantial improvement compared with the current operating system.