Can a Directional Light be masked with a 'sky portal'

There is a feature in some engines including Source (and the Mental Ray render) called a ‘Sky Portal’ which masks the directional light to a rect (or polygon). Is there an easy way to do this in Unity?

I’m building old BSP style maps using ProBuilder, for efficiency and ease of editing, I am using only using one-sided geometry; however I want to have a shadow-casting directional light visible only through windows and an ‘exterior’ courtyard’s open sky. Currently this causes wrong lighting because back faces do not cast shadows.

I had an idea about how this might work, but I don’t know enough about shaders or how rendering works to implement it. Basically I need to flip the shadow map so that by default the entire directional light is occluded. The sky portal would then have a special shader? which caused it to cast an ‘anti-shadow’ then the normal objects in the scene can shadow the light as usual.