From Spinoza's "A Theologico-Political Treatise," CHAPTER V. THE CEREMONIAL LAW
(5:60) As for the Christian rites, such as baptism, the Lord's Supper, festivals, public prayers, and any other observances which are, and always have been, common to all Christendom, if they were instituted by Christ or His Apostles (which is open to doubt), they were instituted as external signs of the universal church, and not as having anything to do with blessedness, or possessing any sanctity
(5:61) Therefore, though such ceremonies were not ordained for the sake of upholding a government, they were ordained for the preservation of a society, and accordingly he who lives alone is not bound by them: nay, those who live in a country where the Christian religion is forbidden, are bound to abstain from such rites, and can none the less live in a state of blessedness.
(5:62) We have an example of this in Japan, where the Christian religion is forbidden, and the Dutch who live there are enjoined by their East India Company not to practise any outward rites of religion.
Source: people.ucalgary.ca/~elsegal/363_Transp/SpinozaTractatus.html