LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 07-14-2003, 03:20 PM   #1
gdthomas67
LQ Newbie
 
Registered: Jul 2003
Posts: 3

Rep: Reputation: 0
creating email account at command line


Hi,

I am trying to create a user account WITH email at the command line. When I create an account with 'useradd' no email account is created. However when I use the RH 8 Gui tool and create a user, it does create an email account.

I am accessing the Email remotely using Sendmail and IMAP, and I need the ability to create accounts remotely by using Telnet or SSH.

Anyone know how to do this? I have searched in vain, it seems like it would be such a simple thing to do, in fact I would've thought it would be a useradd switch..

Any help would be MUCH appreciated.

G.
 
Old 07-14-2003, 05:13 PM   #2
Jon-
Member
 
Registered: Dec 2001
Distribution: RH5.2/6.2/7.0/7.1/7.2/9/ES21/ES31
Posts: 91

Rep: Reputation: 15
The user account should have an incoming email "folder" with useradd, or, at least it used to with RH. I'm not sure what you mean by email account.

If you look in /var/spool/mail you'll see all the inbound email user spool files. All users should have a file ('account') there if they are created with useradd <username>

Now, what you do with that file is a different story You might try installing a text email client, like Pine, or Elm, and see if it can see that same email box.

Thanks,
Jon
 
Old 07-14-2003, 05:26 PM   #3
Blinker_Fluid
Member
 
Registered: Jul 2003
Location: Clinging to my guns and religion.
Posts: 682

Rep: Reputation: 63
Have you tried useradd -m so that the home directory is created automatically?

The /var/spool/mail/[i]username[/] is created automatically when a user has mail.

Last edited by Blinker_Fluid; 07-14-2003 at 05:29 PM.
 
Old 07-14-2003, 07:07 PM   #4
gdthomas67
LQ Newbie
 
Registered: Jul 2003
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for all your replies. Jon not sure what you mean by an incoming folder, if I look at the home directory of users created with the GUI (these are the ones that work fine with Sendmail) I see the following files:

Drafts
.mailboxlist
Sent Items

Those do NOT appear in the users directories created from the command line.

I did however check in /var/spool/mail and it appears all the users have entries in there.

Another little twist is that if I try to Mail the users (created from the command line) it seems to accept the mail address and they dont bounce back, but the users never get the mail. Also if I type 'sendmail -bv username' sendmail will say that the address is deliverable. However if I try accessing the user account using IMAP, again it doesnt appear to exist.

This is driving me crazy!

Also I did try creating a user with 'useradd - m' to see if thats make a difference and it does not.
 
Old 07-15-2003, 08:02 AM   #5
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
Can the user login via IMAP? If you create the files manually, can the user see and use them?

Last edited by stickman; 07-15-2003 at 08:10 AM.
 
Old 07-15-2003, 11:25 AM   #6
gdthomas67
LQ Newbie
 
Registered: Jul 2003
Posts: 3

Original Poster
Rep: Reputation: 0
figured it out

Thanks everybody for your help. After some trial and error, it seems that this works with useradd providing that a password change is issued using 'passwd'. If useradd is issued either with password (-p) or without I am unable to login to sendmail via IMAP.

Once sendmail access the account the relevant files are setup in /home/user, so I was incorrect in thinking they should be there first.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
send email from command line djionel82 Programming 6 11-29-2005 12:12 AM
Networking command line/user account questions daburz Linux - Networking 1 06-20-2004 09:11 AM
Creating A Second Email Address For Email Account On Sendmail treedstang Linux - Software 1 04-27-2004 10:31 PM
command line email with attachments??? crickett Linux - Software 1 06-24-2003 08:47 PM
command-line email client ixion Linux - General 4 02-11-2003 02:28 PM


All times are GMT -5. The time now is 07:03 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration