Preheat an outdoor grill over charcoal or an oven to 180°C.
Mix mayonnaise, lime juice, salt, and pepper and rub into the snapper for 20 minutes.
Soak chillies in hot water for 10 minutes, then blend with tomatoes, garlic, vinegar, spices, onion, herbs, and 250ml water.
Boil the purée with butter and oil, then simmer for 20 minutes until thickened and cool to room temperature.
Grill the fish skin-side down for 20 minutes while basting with sauce, then flip and grill for 15 minutes with butter.
Alternatively, bake the fish for 30 minutes, basting frequently with sauce and then melted butter.
Griddle the sliced pineapple for 2 minutes per side, dice it, and toss with the remaining salsa ingredients.
Serve the cooked fish with the pineapple salsa and lime wedges.