First, you ensure that DNS is setup for your domain. You need at minimum an A record pointing to your your IP plus an MX record. The MX record (Mail eXchange) governs where mail for a domain is sent.
Once you've done that (an given it time to propagate) then mail sent to firstname.lastname@example.org
will arrive at your server. This mail will be sent by a remote SMTP server to an SMTP server (application) listening on port 25 on your server.
So you need to setup on your server an SMTP application to deal with this incoming mail. Common SMTP programs are Sendmail, Postfix and Exim. The configurations differs but the general idea is the same -- to deal with transferring mail (hence they are called mail transfer agents, or MTAs).
Which program your choose is up to you. Do some research on Sendmail, Postfix and Exim (and maybe others) and see what makes sense. Pick one and install it.
Then, in that program you configure your email addresses, e.g., email@example.com
. You might set it up to be a real user account, with disk storage space and a mailbox, or you might configure it to be simply a forwarder to another account -- myRealName@domain.com
. (And then you'd setup myRealName@domain.com
to be a real account with storage space).
The last step is to provide access to the mail stored on your server to clients. To do this you install and setup a POP3 and/or an IMAP server. Examples of this type of software are Courier IMAP and Dovecot. A POP3 server listens on port 110, and IMAP server on port 143. Your users them configure their email program (e.g., Outlook or Thunderbird) to connect to your server using either the POP3 or IMAP protocol to receive their mail.
That's the basics, hope it helps