This word has been described in a previous entry on the site as 'exaggerated shows of politeness, eg when greeting or welcoming someone at a formal event. The word has a negative connotation, being used to stress how time-consuming, hypocritical or meaningless they can be.' I noticed that the phrase is somewhat similar to the popular Arabic greeting 'As-salaam 'alaykum.' Is this anything to do with the actual origins of the word? And does this mean that the origins of this word disparaging in nature? Am not a French student, merely interested in language!
The word salamalec is borrowed from the Arabic as-salām 'alayk "peace (salām) on you", the plural of which salām 'aleykum can be heard as salām alek to a French ear.
The word was first used in 1559 by Guillaume Postel in La république des Turcs to refer to a Turkish-style greeting. A century later it started being used in an ironic way to refer to an oriental greeting, first by Paul Scarron in his Virgile travesti (1648) :
Après avoir, comme très sage,
Avec grande crainte et respect
Dit par trois fois salamalec.
and then by Molière in Le Médecin volant.
Nowadays the word is derogatory and used to mean an excessive and hypocritical show of politeness.