"Be rightly served" is an idiomatic expression that means to receive the consequences or punishment that one deserves. There are various synonyms or phrases to convey this idea, such as to get what one deserves, to reap what one sows, to receive one's just deserts, to be punished accordingly, to suffer the consequences, to face retribution, to be held accountable, to meet one's fate, to pay the price, to answer for one's actions, to be punished for wrongdoing, to be taught a lesson, to receive one's comeuppance, to be recompensed, to be appropriately rewarded or punished. The choice of synonym might depend on the context, tone, or register of the communication.