Cook the spaghetti al dente in plenty of salted water.
Peel the onion and finely chop. Heat the oil in a saucepan and fry the onion while stirring. Add the tomatoes, dissolve the vegetable stock in it and cook for 10 minutes over low heat. Add the herbs and cook for another 5 minutes.
Season the sauce with paprika, pepper and sugar and serve with the well-drained spaghetti.