Given a cost function and two probability measures, the optimal transport problem is that of finding a transport map (or a plan) which minimises total cost. The case of finite-valued costs is well-understood and, under mild assumptions, the optimal plan has a special geometric structure. In particular, there exists a function, which we call a potential, whose c-subgradient contains the support of the optimal transport plan (for the quadratic cost $|x-y|^2$ the gradient of the potential is famously known as the Brenier map). However, if a cost function attains infinite values, which corresponds to prohibiting certain pairs of points to be mapped to one another, only special families of costs were studied. We present a unified approach to transportation with respect to infinite-valued costs: we discuss compatibility of measures involved, give a sufficient condition for the existence of a Brenier-type map, and explain how this condition gives rise to abstract dualities on sets. The talk is based on joint work with S. Artstein-Avidan and S. Sadovsky.