In the unabridged edition of the novel "The Count of Monte Cristo" by Alexandre Dumas, reference is made to Captain Leclere in the first chapter after Edmond Dantes, first mate of the Pharaon, arrives as Monsieur Morrel inquires of him, and as Danglars informs M. Morrel that Dante has put into port at Porto-Ferrajo and delivered a letter. Then, in Chapter Seven, "The Examination," Dantes is interrogated by the Deputy Prosecutor, Monsieur de Villefort, who asks the prisoner what involvement he has with the letter that he has delivered at Elba. Of course, the ingenuous Edmond Dantes merely has followed the dying captain's orders; he knows nothing.
In his responses to M. de Villefort, Dantes mentions nothing that the captain warned him of; nor, does he mention any warnings by the captain to M. Morrel when he converses about the captain in Chapter One.
So, possibly the film had something in it? Could it be that the captain warned Dantes to deliver the letter to no one but the marechal and to not repeat the name on the envelop? Sorry, but such orders are in neither the unabridged or the abridged edition.