You need an MTA (Mail Server Agent) like postfix or sendmail.

Then an MDA (Mail Delivery Agent) like postfix

Set up an IMPA or POP3 Server. IMAP allow multple connection. Keep email on server. POP3 is simpler, it download the mails to local computer.

then, a spam filter

an antivirus like clamav

webmail client like roundcube or citadel