Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


newbie to unix needs help with email

Posted on 2004-09-13
Medium Priority
Last Modified: 2013-12-16
Hi all,

just have a question about setting up email accounts on unix systems. I am assuming that there is a way to automatically setup user email accounts based on an automated event, like a new user signing up. Is this possible? Is it a native function of the email application being used on the unix server? What tools do people recommend to perform this task?

I really appreciate any help someone would be willing to give me.

Question by:Reige01
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 3
LVL 38

Assisted Solution

yuzh earned 300 total points
ID: 12051853
To setup a user's email account all you need to do is to add the user to the system.

In *nix system, all users have email account. to add a user you can use the "useradd" command. If you want to write a script to add user account, have a look at:


PS: You might have GUI tool in your system for adding user etc, (eg Solaris - admintool,
      HP-UX-- sam, SCO -- scoadmin ......)

To setup a mail server, you can setup sendmail (if you mail already working, someone
already done it for you):

have sendmail FAQ and tips:

LVL 51

Expert Comment

ID: 12063199
>  To setup a user's email account all you need to do is to add the user to the system.
hmm, agreed if "systems" means MTA

Author Comment

ID: 12071521
Hi, thanks for your replies but what I was really after is an automated way to add the email account. For example, someone comes to my website and joins up, enters a username and my system generates an email address based on the information supplied in the join up process without me having to manually add the account. Is this possible, and if so, how do the larger ISP's handle this sort of thing?

Thanks again for your help,

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

LVL 38

Expert Comment

ID: 12071814
>>how do the larger ISP's handle this sort of thing?
    When a new user join up, they information is store in a database, they can use a script
to read the database and create the user account. they can use cron to read the database
and create user account once an hr, 4 hrs, a day etc.

   If the numbers of use is not the big for you, you can store the new user in for in a text
file, for email you only need loginname, real Name, password and store them in a text
   then use cron to run a script to rotate the newuser file to a temp area, and create the
user accounts.

   Have a look at the links in my previous comment to learn how to write the script read
infor from file/database and add users.

   Good luck!

LVL 51

Expert Comment

ID: 12072627
> .. what I was really after is an automated way to add the email account.
you need a tool for that. Probably a handmade one ...

There're too less informations to give you a more detailled answer.

Author Comment

ID: 12081561

thanks for your comments I will take a look at the other articles you posted previously.


What would you need to know to give me a more detailed answer?
LVL 51

Expert Comment

ID: 12082634
which OS?
which MTA?
which authentication scheme (PAM, LDAP, etc.)?
which CGI-Language (perl, php, jsp, etc.)?
which authorization scheme (user for web server vs. root user)?
etc. etc.

Author Comment

ID: 12098864
First up, this question was posted to get some ideas on the do-ability of this as decisions have been made only on some aspects of the project, and others are still in discussion. So, if someone has experience in one or more environments and wouldn't mind passing that on, it would be much appreciated. The more information someone provides, the better.

Ok well the OS will be UNIX, no specific flavour as yet defined, but whatever anyone has knowledge of would be brilliant.
The MTA is also in discussion, I quite like Qmail but some others are pushing for Sendmail, so that is also still up in the air.
PAM is the preferred authentication scheme although there are opponents to this as well.
JSP will be the interface language

This is all very sketchy because this is all very preliminary and I was just hoping to get some pointers and details of how it can be done. I thank you all for your help and look forward to reading anything someone might have to add to this discussion.
LVL 51

Accepted Solution

ahoffmann earned 300 total points
ID: 12099644
I'd suggest to use LDAP as authentication scheme 'cause you're more free to add and use other, even proprietary, fields (compared to traditional /etc/{passwd,shadow})

The only critical point I see is you JSP. I assume that you plan to register your user's using a web server.
Then you have to take care about a lot of things. And even more things if it should work automatically 'cause you need a program with root-priviledges somewhere.
Are you aware how to protect a web server, on the network using firewalls with DMZ etc., and on application level (your JSP) avoiding XSS, path traversal, command injection, etc. ?
Sounds like a lot of work.
LVL 38

Expert Comment

ID: 12099671
It is a big job, you need to pick an  OS plaform, an authentication scheme, CGI-Language,
MTA before doing anything else.

I think you should break this question into a few pieces to get the details answer.

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question