Originally Posted by
BobH
There are a few exceptions -- for example, at YVR you clear customs while you're in Canada.
That is true -- DUB also I believe -- in those cases the departure zone in the foreign airport counts as your first US landfall.
It's all to keep customs / immigration activity confined to "international airports" even though US-bound international pax travel to many, many US destinations.