It's become conventional wisdom that, when addressing the Queen after introduction, one must be sure to address her as "ma'am" as if it were to rhyme with "ham". Only "ma'am" and "ham" don't rhyme. Or they haven't done, not traditionally. Well, save for in America, but one hardly imagines the Queen (or anyone else of the Estate really) wishes to be addressed as that travesty of elocution. In fact, women in America are said to disfavor being addressed as such, perhaps pigs too if not for being dead, smoked, and biting an apple on their dining tables, but I digress. Nevertheless of Americans, Britons certainly haven't traditionally rhymed these words, not even in RP. Yet, here we are. Because of some "movie" apparently.
In any instance, the question is this: Does "ma'am" as in "ham" apply generally speaking or only in reference to the Queen? Has anyone stopped to consider that the pronunciation of "ma'am" remains as it always has been, with a rather tall "a" that slightly lingers sans glottal constriction into a rounded "um"? That this "mam like ham" policy only applies, if it applies, when saying "ma'am" in reference to the Queen to the Queen* directly?
It is the Queen's English after all. More especially, it is Her Majesty's pronoun to receive. Presumably, One can have it pronounced at court as One wishes. It's entirely her prerogative to ask to be called as she prefers, which is no different to anyone else really. Frankly, she could very well order her staff to instruct her audience pronounce it "codfish". Only, unlike with individuals of the general public making such a request, the Queen would likely be obliged, at least somewhat. If it were indeed the case, it would perhaps be easier and less confusing addressing her as "codfish" than some permutation of the existing word "ma'am" which the people thusly presume applies generally and possibly shouldn't do.
Then again, perhaps it's the Queen's intent to "leave her mark", as it were: to prescribe a new pronunciation to this word most personal for her that will remain in indelible writ as legacy imparting. Then again again, perhaps it's not the Queen at all, rather some uppity menial who enjoys messing visitors and dignitaries about as they are on their way to meet the Queen. Personally, I blame the butler, but who knows?
No, really, who knows? For I would like to. With every basis for this pronunciation beating a path that leads straight back to Buckingham Palace and seemingly Queen Elizabeth II, it begs a question.