The Swiss have long been proud of their railways but a new, strict ticketing policy is turning the love affair sour.

As I write this, I am travelling home watching the sun set over the mountains which flank Lake Geneva.

It is bitterly cold, there has been a good deal of snow, but the train is right on time. It is warm and I have a seat.

I feel pleasantly smug as I look out at the rush hour traffic on the motorway.

I feel smugger still as the aroma of fresh coffee heralds the arrival of the drinks service. Swiss friends often tell me, proudly, that their rail service is the best in the world, but recently, the Swiss love affair with their railway has turned a little sour.

It all began with the decision to abolish ticket sales on trains, though ticket collectors stay. In theory, this should work - you can buy tickets from a machine on the platform, online, or by smartphone.

In practice, it has become a rancorous public relations disaster, and all because of a Byzantine logic over what constitutes a valid ticket, and a policy of issuing huge fines to passengers who do not have one.

From Our Own Correspondent Insight and analysis from BBC correspondents, journalists and writers from around the world

Broadcast on Radio 4 and BBC World Service Listen to the programme Download the programme

Take, for example, the young man with a ticket which must be date-stamped by a machine on the platform. The machine is out of order, so he carefully writes in the date by hand, gets on board, and is fined by the conductor for not having a valid ticket.

There is the pensioner, out for a day with his grandson, who kindly bought both their tickets on his mobile phone, but it turns out you are only allowed one e-ticket per person, so poor old granddad is fined.

And then, there is me. One frosty morning I arrived at my local station to find that the ticket machine was broken. No matter, I thought, I have got a smartphone, and I hurriedly set about buying my ticket that way.

This was not as easy as I had hoped, fiddling between credit card and phone with freezing cold fingers, but, by the time I got on the intercity to Geneva I had an e-ticket and I proudly showed it to the conductor.

Unfortunately she was less than impressed and told me in no uncertain terms that my ticket was not valid. Why, only became clear several weeks later when a letter arrived from Swiss railways euphemistically named "revenue protection service".

The good people there tell me the formal payment for my ticket from my credit card company arrived four minutes after my train left the station. That means, they say, that I bought my ticket on the train - and that is not allowed.

Together with the letter was a fine for 190 francs (£133, $210). In vain do I protest that the policy of abolishing ticket sales on trains surely cannot be taken that far? In vain do I point to the broken ticket machine and my paid-for ticket, valid only on that day, for that journey?

Image caption A window seat view

And in vain are the protests of the 750 other passengers across Switzerland receiving similar fines every single day.

Swiss railways say their policy is designed to protect honest fare-paying passengers, but a quick look at their balance sheet suggests something else. The company is making an estimated $2 million (£1.26 million) a month from fines.

It is a nice little earner, but it has left a nasty feeling with passengers who believe they are being punished as fare dodgers when in fact they have done their best to buy a ticket.

Some are even taking their cases to court. That should be interesting. Swiss railways versus the people.

In the meantime, although train travel is still popular, those seats do not feel as comfy, the coffee does not smell quite so good - because Swiss railways have lost, for now anyway, something far more precious than $2 million a month: good relations with their customers.

How to listen to From Our Own Correspondent:

BBC Radio 4: Saturdays at 11:30 and some Thursdays at 11:00.

Listen online or download the podcast.

BBC World Service: Short editions Monday-Friday - see World Service programme schedule.

You can follow the Magazine on Twitter and on Facebook