In heatproof bowl set over saucepan (filled with enough water to come 1 inch up side) simmering over medium-low heat, combine evaporated milk, coconut milk, sweetened condensed milk, egg yolks, ground cinnamon, ginger, cloves, nutmeg and cayenne pepper.
Cook, stirring constantly, for 20 to 25 minutes or until thickened enough to coat back of spoon.
Remove from heat; strain through fine-mesh sieve into pitcher. Let cool completely.
Stir in rum and lime juice. Cover and refrigerate for at least 6 hours (can be refrigerated for up to 5 days).
For rimming glasses (optional): Place coconut and agave in two small separate dishes. Wet rims of 6 glasses with agave mixture, then dip into coconut. Let stand for 10 minutes.