Heat the olive oil in a flameproof casserole dish over a medium-high heat. Cook the fennel seeds, onion, fennel, chilli and preserved lemon with a pinch of salt for 5 mins until softened and fragrant, then add the garlic and cook for 1 min more.
Add the chopped tomatoes and cook down for a few mins, then turn down the heat and add the squid. Cook gently for 3 mins, then add the wine and reduce by half. Add the stock and herbs, bring to a simmer, cover loosely with baking parchment and cook for 1½ hrs, until the squid is tender and meaty.
To make the mayo, whisk the yolks, garlic, lemon juice and a pinch of salt until combined, then add the squid ink and whisk again. Slowly whisk in the oil until you have a thick, silky mayo. Serve the squid with rice and a spoon of mayo, with fronds of dill scattered over. Keep leftover mayo in the fridge (to use within one day).