Future of Dundee post office secured