In Linux, new user accounts automatically receive mail accounts. Here are the steps for adding a new user account in Red Hat Enterprise Linux 5 and its derivative CentOS 5.
Manage User and Group Accounts (GUI)
This section describes how to use the User Manager to manage the user and group accounts.

1. Click Applications then select System Settings and click Users and Groups. This will launch the User Manager window.
3. In the Create New User window, fill in the User Name, Full Name, Password and Confirm Password. Click Ok when you’re done.
4. That’s it, you have just created a new user. To remove a user, select the user you want to remove and click Delete.Manage User and Group Accounts (Console)
Below are the console commands to manage the user and group accounts. Type in any of the commands below without any parameter to see that command’s help information.
- /usr/sbin/useradd [options] login_name
creates a new user - /usr/sbin/usermod [options] login_name
modifies a user’s attributes - /usr/sbin/userdel [options] login_name
deletes the specified user. Use the -r option to automatically remove the user’s home directory and mail spool. - /usr/bin/passwd login_name
sets the password for the specified user - /usr/sbin/groupadd [options] group_name
creates a new group - /usr/sbin/groupmod [options] group_name
modifies a group’s attributes - /usr/sbin/groupdel group_name
deletes the specified group
Related Pages
Visit the forum to ask for help or to give a comment.
***
Posted on 4/23/2007 and last updated on 8/29/2010
Filed under CentOS 5 , Red Hat Enterprise Linux 5 , System Administration


December 23rd, 2007 at 4:20 pm
I used your howto to setup a mail server on fedora core 6 but ma question is when you create the users do you create the maildir yourself or does postfix handle all that it’s self. but on the whole this is an excellent howto. simple straight to the point. Finally I ask for a howto on a virtual mail setup with mysql postfixadmin the works. It would be great. Again Nice work
December 24th, 2007 at 12:04 am
No need to create the maildir directory manually, Postfix and Dovecot will handle it.
October 6th, 2008 at 9:55 pm
After the accounts are created, do i still need to create mailboxes in the Maildir so my LDA can deliver the mail there? Thanks n great article.
October 7th, 2008 at 12:38 am
No need to create the maildir/mailbox directory, Postfix and Dovecot will handle it.
April 7th, 2009 at 8:17 am
I added new users but there is no Maildir created. Users existing when Postfix/Dovecot were installed have /home/username/Maildir folders which work. Iv’e restarted Postfix & Dovecot but no luck. Any help greatly appreciated.
April 8th, 2009 at 1:53 pm
Hi Inheritor,
Don’t worry, the Maildir folders will be automatically created by Postfix whenever a mail for that user has been received or by Dovecot when the user logs in to Dovecot.
April 9th, 2009 at 1:35 am
Thanks, That helped and the Maildir folders are now there. But now I added a few more users but mail to these users are bounced with (unknown user: “csr1″) althought these users are in the aliases file & I’ve issued the newaliases cmd. & postfix reload. What is strange is that mail to one user is delivered with no problem. file permissions are similar for the working user & the not-working ones. I appreciate your help.
April 9th, 2009 at 2:24 am
I’ve stumbled on to the fact that Postfix does changes the user name in the mail address to lower case which would not match a UNIX user name which may be in capitals.
June 24th, 2009 at 5:17 pm
Hi
I’m looking for the command line to create user account (mail) on postfix running on centos 5.3.
thank you in advance.
June 24th, 2009 at 9:18 pm
Hi modular,
I’ve updated the article to show its command line equivalent.
June 24th, 2009 at 9:32 pm
Hi consultant,
Thank you for this update.
July 1st, 2009 at 8:50 pm
Hi consultant,
Can you update your the article with that question please with command line :
- how to configure a password for user
- how to remove a user (with all appropriate file and directory)
- how to test for a user to receive and send mail
Thank you in advance !!!!
July 1st, 2009 at 10:47 pm
Ok I find How to do that (for centos 5.2 or 5.3 tested)
to configure password for user :
# passwd [username]
to remove user :
# userdel [username]
remove the file [username] in /var/spool/mail/
remove the directory [username] in /home/
For “how test receiving and sending mail”
I see in other section of this website how to do !! Thank you very much !!
July 8th, 2009 at 11:43 pm
Hi modular,
I’ve updated this article, thanks for the tip.