The full answer really depends on what mail server program you are using.
For both the
sendmail you can redirect mail addresses to local accounts using the
/etc/aliases file: any line of the form
address: unix-account will deliver email addressed to
firstname.lastname@example.org to the mailbox of
unix-account. For example, if
/etc/aliases contains a line like this:
then UNIX user
root will get all the mail addressed to
email@example.com, without any need for
postmaster to exist as a regular UNIX account.
Instead of a UNIX account name, you can specify the full path of a file -- mail will be delivered to that file (in mbox format). Other redirections are also possible; see
man aliases for details.
Note: after editing
/etc/aliases, you have to run the command
newaliases (as root, typically) in order to have the mail server pick up the new addresses.