The teaching is from the Milindapañha.
'Venerable Nāgasena, these givers when they bestow their offerings, devote them specifically to former (relatives) now departed, saying: "May this gift benefit such and such." Now do they (the dead) derive any benefit therefrom?'
'Some do, O king, and some do not.'
'Which then are they that do, and which do not?'
'Those who have been reborn in purgatory, O king, do not; nor those reborn in heaven; nor those reborn as animals. And of those reborn as Pretas three kinds do not: the Vantāsikā (who feed on vomit), the Khuppipāsino (who hunger and thirst.), the Nijjhāmatañhikā (who are consumed by thirst). But the Paradattūpajīvino (who live on the gifts of others) they do derive profit, and those who bear them in remembrance do so too.'
'Then, Nāgasena, offerings given by the givers have run to waste, and are fruitless, since those for whose benefit they are given derive no profit therefrom.'
'No, O king. They run not to waste, neither are fruitless. The givers themselves derive profit from them.'
(Mil. 294-7, Th. Rhys Davids trans.)
For the full dialogue:http://www.sacred-texts.com/bud/sbe36/sbe3606.htm
* * * * * * * * * * * *
First hermit: Still there’s one thing about being a hermit, at least you get to meet people.
Second hermit: Oh yes! I wouldn’t go back to public relations.
— Monty Python, The Hermits
(I shall be offline from 27th June until November)