Not only is direct benefit from yayin nesach prohibited, but even some kind of ancillary benefit is prohibited as well. The Mishnah says that if an idol worshiper hires a Jewish worker to move barrels of yayin nesach for him—for example, to pour the wine into barrels or to move barrels of yayin nesach from place to place—it is prohibited to benefit from the wages, the money being paid. You’re not allowed to benefit at all from the money being paid for work on yayin nesach. It’s a rabbinic law that hachamim (the rabbis) put into place in order to keep us very far away from idol worship. We’re talking about wine that was actually used as libation wine. You have to stay very, very far away from it. The prohibition is so strict that you’re not allowed to have anything to do with yayin nesach, and the rabbis extended this as well to stam yeinam (ordinary non-Jewish wine).
But if the idol worshiper hired the Jewish worker to do other work for him, let’s say to move regular barrels that do not contain any yayin nesach, af al pi she'amar lo ha'aver li chavit shel yayin nesach mimakom lemakom, secharo mutar, even though the worker was eventually told, “Do me a favor: move this barrel of yayin nesach from this place to that place,” and followed what he was told, the wage—the payment for the other work he did—is permitted to benefit from. So let’s say he was being paid per barrel that he moved. He can’t benefit from the payment for moving the yayin nesach barrel, but the payment for all the other barrels he moved would be permissible.
Another case: Ha-socher et ha-chamor lehavi aleha yayin nesach, if an idol worshiper rented a donkey from a Jew in order to transport yayin nesach on it, secharah asur, the rental fee for the donkey is prohibited to benefit from. Secharah leshev aleha: if the idol worshiper, though, rented the donkey in order to sit on it, to ride on it, af al pi shehiniach ha'oved kochavim legino aleha secharah mutar, even if the idol worshiper put a jug of yayin nesach onto it, the fee he’s paying—the rental fee—is permitted for the Jewish owner of the donkey to benefit from, because he’s being paid here for the ride, the transportation for the person, not for the yayin nesach. When he happened to put the jug on, it wasn’t part of the deal; therefore, the owner is still allowed to benefit from the payment for the transportation.

