Anything not directly related to marketing and selling to prospective buyers should be excluded from your CAC calculations. This could include any number of expenses, such as:
Headcount and operational expenses related to customer success and retention
Marketing expenses that are specifically used for targeting existing paying customers
Any headcount and operational costs of account managers who are tasked with upselling existing customers
Costs associated with customer training and support (even if it comes from marketing)