1. Preheat the oven to 180C/350F/Gas 4. Grease a 450g/1 lb loaf tin, line the base with greaseproof paper and grease the paper.
2. Cream the butter and sugar together in a bowl until pale and fluffy. Beat in the eggs one at a time, beating the mixture well between each one and adding a tablespoon of the flour with the last egg to prevent the mixture curdling.
3. Sift over the flour and gently fold it in, with enough milk to give a mixture that falls reluctantly from the spoon. Fold in the lemon zest.
4. Spoon the mixture into the prepared tin, level the top and bake for 30-45 minutes until a skewer inserted in the centre comes out clean.
5. Cool in the tin for ten minutes then turn out on to a wire rack and leave to cool completely. The cake can be made up to four days in advance and kept tightly wrapped in clingfilm.
6. For the custard, bring the milk and 300ml/10fl oz of the cream to the boil in a non-stick pan. Beat the egg yolks, cornflour and sugar together in a bowl, then gradually whisk in the hot milk and cream.
7. Return the mixture to the pan and cook over a low heat, stirring constantly, for about ten minutes, until the mixture has thickened enough to coat the back of a spoon. Take care not to let it boil as it will curdle.
8. Transfer the custard to a bowl and leave to cool.
9. Cut the madeira cake into slices one centimetre (half an inch) thick and arrange a single layer over the base of the bowl. Spread the layer with two tablespoons of raspberry jam and lay another layer of cake on top (you might not need to use all the cake).
10. Spread the second layer with another two tablespoons of raspberry jam and sprinkle over the sherry.
11. Pour the custard over the cake, cover with clingfilm and chill for at least three hours.
12. Whip the remaining cream into soft peaks. Uncover the trifle, spoon over the cream and return it to the fridge until you are ready to serve.