Email (record): Exact and heuristic algorithms for Space Information Flow