Setting up a full email server (send + receive + IMAP/POP3) on Ubuntu 24.04 is most commonly done with Postfix + Dovecot.
Two main realistic paths in 2026:
Recommendation: Start with iRedMail unless you need to deeply understand/customize every component.
Minimal requirements
Steps (summary)
Follow detailed guides such as:
Core first step:
sudo apt install postfix postfix-mysql dovecot-core dovecot-imapd ...