Chop the tomatoes, put into a pan with half the vinegar and simmer until soft. Sieve. Peel, core and chop the apples, peel and chop the onions and chop raisins. Return purée to the pan with the apples, onions, raisins, sugar, salt, cayenne pepper and remaining vinegar. Tie the ginger and mustard seed in a muslin bag and add to the pan. Simmer until the chutney is thick, about 1 hour. Remove the spice bag, pour into hot sterilized jars and seal.