All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
It was not clear to us what is meant by outlining or shaping the moustache, but if the way of outlining or shaping it about which you are asking involves imitating the disbelievers or dissolute people, then it is not permissible.
Shaykh Ibn ‘Uthaymeen said in a Fatwa during the monthly meeting he used to hold: “But, if cutting the hair is done in such a way as to imitate the French or other disbelievers, it is prohibited because the Prophet said: ‘He who imitates any people is considered to be one of them.’” [End of Quote]
As for the ruling on cutting the mustache and the limit in this regard, An-Nawawi said in Al-Majmoo’: “As for trimming the mustache, it is an act of Sunnah by agreement [of scholars]. The limit of trimming the mustache is to cut it until the edge of the lip is visible, and it should not be shaved at the roots. This is our adopted view. Imam Ahmad said: ‘If one shaves it, there is nothing wrong with that, and if one trims it, there is [also] nothing wrong with that.’” [End of Quote]
Allah knows best.