The concept of overtaking a car in an outer lane (undertaking) has regulation that varies greatly between jurisdictions. What is consistent though it that undertaking is generally considered unsafe as drivers do not expect to find cars passing along their outside.
Countries like Germany, France, and Finland specifically prohibit undertaking outside built up areas while in the US, Canada, and the UK the action is discouraged but not specifically prohibited.
Whether it is illegal or merely discouraged to undertake a car there will, unfortunately, still be cars driving in such a way that it is necessary to undertake to get past. What many people fail to consider in this discussion is who should be at fault in jurisdictions where undertaking is illigal. Currently the driver doing the undertaking is the one facing reprimand, but there is also a case for holding the driver being undertaken responsible.
The most practical solution is to only enforce any policy on undertaking outside of built-up areas where frequent lane changes and turns are common (like Germany, France, and Finland currently do).
whether the drivers who are being undertaken should be the ones either punished or frowned upon for failing to conform to the traffic conditions on the road at that time which can be . Slower drivers would be to required to move over to the outside lane such that they are unable to be undertaken. This policy could be enforced by incentivising drivers who are able to undertake slower drivers to report them for the infraction.
The way this system would work would be like a sort of game of tag where (provided the traffic is moving and frequent lane changes aren’t expected) drivers who are able to undertake slower cars could then report the undertaken car should the action be illegal. This would keep drivers vigilant about their presence on the road and how it is impacting the flow of other cars on the road.
All drivers are responsible for the safe flow of traffic. As such, slower drivers should be just as vigilant of their place on the road, and effect they are having on other road users as cars that are looking to overtake.