The following are the main configuration for the postfix which is in the file “/etc/postfix/main.cf”
myhostname = mail.example.com
mydomain = example.com
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks = 192.168.0.0/24, 127.0.0.0/8
home_mailbox = Maildir/
[root@office1 ~]adduser -s /sbin/nologin username;
[root@office1 ~]passwd username
Enter the password twice and the email account is created. I have used “/sbin/nologin” in adduser command means the user cannot login locally to the server, mail users have no need to ever login to the mail server.
Once the acount is created then you can able to send/receive emails email@example.com
The emails is stored in “/home/username/Maildir/” directory.