The most demanding service to run well.
WHAT IT INVOLVES
An MTA for sending and receiving An IMAP or POP server for mailbox access Spam filtering Antivirus scanning DKIM signing Correct SPF, DKIM, DMARC and reverse DNS
Each is a component to configure, secure and maintain.
THE DIFFICULTIES
Deliverability. A new IP address has no sending reputation, and major providers treat unknown senders cautiously. Building reputation takes weeks of careful sending. Security. A misconfigured mail server becomes an open relay, is abused within hours, and blacklists your address. Maintenance. Spam rules, certificates and software all need ongoing attention.
THE ALTERNATIVE
Do not run mail. Send through a dedicated provider by SMTP, and receive through a hosted mail service.
For most VPS deployments this is the better decision by a wide margin. It removes the hardest service to operate and gives better deliverability than you would achieve yourself.
IF YOU DO RUN IT
Use a control panel, which configures the stack coherently, and read the mail security article here.