PDA

View Full Version : How to setup an email account in Webmin


Atjeu
05-28-2003, 02:52 PM
Provided by an Atjeu customer:

To create an Email User

Create a Unix user:
Webmin: System -> Users and Groups
- Click on "Create a new user"
a)Now you have a Create User form
- fill in the appropriate information and for our purposes the user name will be demo_user
a)Username- an alphabetic LOWERCASE name that you create
It must not repeat any previously created
It does not have to be the email user name. That will be
assigned late to refer to this Username
b)Realname- This will be used only by you to recognize Username
c) Shell- automatically created. Don't change
d) UserID- automatically created. Don't change
e)Home directory- usually use /home/username
f)Normal Password select- write your password. it will be encoded on exit
- Click on Create

Tell Sendmail about the new user and that user's email address:
Webmin: Servers -> Sendmail Configuration -> Address Mapping (virtuser)
- Fill the following fields:
Mail for Address demo@demo.com
Send to Address demo_user
- Click Create
The new Mapping will be added to the list.

Stop and Start Sendmail.

Zoltan Orc
05-30-2003, 12:31 PM
I disagree with a couple of things:

c) I wouldn't want to give full shell access for simple mail users (which your version does). Change the shell to something else or alternatively leave it the way it is but explicitly disallow this user in the SSH settings (under Servers).

e) Sendmail doesn't store e-mails in the home directory but in /var/spool/mails. For mail only users, I set up the dir /home/mailusers and there I make a subdir for each such user.

Also, AFAIK you don't need to restart Sendmail for virtuser settings to take effect.

At any rate, while it's possible to use Sendmail for POP accounts, if you have more than a dozen or so, you're better off with some more advanced mail server software. Sendmail is a bit of living history and is cool and easy to use in some ways, but all in all for today's requirements it simply doesn't cut it any more, especially the part with the Unix user required for a simple mail account. Unless you take a lot of care, this can open up several security holes in your server (such a mail user has not only shell access unless disabled but also FTP access and if you set a couple of automatized things and don't watch out, also MySQL access etc.).