The Enchiridion by St. Augustine
Chapter 110.--The Benefit to the Souls of the Dead from the Sacraments and Alms of Their Living Friends.
Nor can it be denied that the souls of the dead are benefited by the piety of their living friends, who offer the sacrifice of the Mediator, or give alms in the church on their behalf. But these services are of advantage only to those who during their lives have earned such merit, that services of this kind can help them. For there is a manner of life which is neither so good as not to require these services after death, nor so bad that such services are of no avail after death; there is, on the other hand, a kind of life so good as not to require them; and again, one so bad that when life is over they render no help. Therefore, it is in this life that all the merit or demerit is acquired, which can either relieve or aggravate a man's sufferings after this life. No one, then, need hope that after he is dead he shall obtain merit with God which he has neglected to secure here. And accordingly it is plain that the services which the church celebrates for the dead are in no way opposed to the apostle's words: |For we must all appear before the judgment-seat of Christ; that every one may receive the things done in his body, according to that he hath done, whether it be good or bad;| for the merit which renders such services as I speak of profitable to a man, is earned while he lives in the body. It is not to every one that these services are profitable. And why are they not profitable to all, except because of the different kinds of lives that men lead in the body? When, then, sacrifices either of the altar or of alms are offered on behalf of all the baptized dead, they are thank-offerings for the very good, they are propitiatory offerings for the not very bad, and in the case of the very bad, even though they do not assist the dead, they are a species of consolation to the living. And where they are profitable, their benefit consists either in obtaining a full remission of sins, or at least in making the condemnation more tolerable.