Adding email users in bulk

16 posts / 0 new
Last post
#1 Fri, 06/19/2009 - 01:00
Dim Git

Adding email users in bulk

Hi people,

I am expecting to get instructions in the next day or so to add about 250 email users to a VH. I need to be prepared for this because I will have to complete the task in a matter of a few days. In that time I will have to set up the new server, get the domain, test, etc. etc.

What I want to do :-

Firstly, I would like to add the users from a file.

Secondly, I would like to force a change of password the first time a user picks up email which might be by POP or webmail.

I can't see any way of bulk adding or forcing password change in the process.

Anybody have any thoughts please.

Thanks for reading.

Fri, 06/19/2009 - 01:30
Joe
Joe's picture

Firstly, I would like to add the users from a file.

Trivial. Virtualmin has a batch add users facility found on the Mail and FTP Users page (click "Batch create users."). Click the Help.. link on that page for docs on the expected format, and options.

If you need to create users from a file that is not (or cannot be massage into) the required format, you can instead use a shell script with the create-user command.

Something like:

virtualmin create-user --domain domain.tld --user newuser --pass password

Which could be wrapped in a for loop to operate on a whole file (left as an exercise for the reader, since I don't know what format you're dealing with). I've pretty much always been able to massage batch data into the right format for the form, though, so I don't think I've ever used the command line tools for batch adding users.

Secondly, I would like to force a change of password the first time a user picks up email which might be by POP or webmail.

Impossible. POP has no conception of changing passwords.

--

Check out the forum guidelines!

Fri, 06/19/2009 - 03:04
Dim Git

Hmmmm !

Is the batch add users facility only available in the Pro version ? I can't find it in the GPL. Or am I looking in the wrong place.

I am looking (mostly) in the "Edit Mail and FTP Users" within the VH.

Re the forced change of password, I thought that was the case, guess I was just hoping that there might be a little wizardry going on within Virtualmin.

Thanks for your help.

PS I know that there is a lot of work going on with the VM site etc. but sure wish I could access the comparison between GPL & Pro page. :o(

Fri, 06/19/2009 - 03:17
Joe
Joe's picture

Is the batch add users facility only available in the Pro version ? I can't find it in the GPL. Or am I looking in the wrong place.

I wasn't aware of it, if it is. It shouldn't be a Pro only feature. I can't think of why it would be, anyway. But, looks like maybe it is.

Sometimes Jamie's choices for what goes into Pro vs. GPL don't make sense to me. ;-)

PS I know that there is a lot of work going on with the VM site etc. but sure wish I could access the comparison between GPL & Pro page. :o(

Just for you, I've put back the old version on its original URL.

http://www.virtualmin.com/compare.html

It is not as complete as we'd like (it doesn't, for example, know about the missing batch feature...since I didn't know about the missing batch feature), but it covers a few of the high points.

I'm going to see about checking in a change to make batch user adds part of GPL in version 3.70.

--

Check out the forum guidelines!

Fri, 06/19/2009 - 10:06
andreychek

I'll offer that in the meantime, even though the batch create users may be Pro-only, you can accomplish a similar task using the command line tools (in either version).

If you run:

virtualmin create-user

You'll see the following help output:

Adds a new mailbox user to an existing Virtualmin domain.
 
virtualmin create-user --domain domain.name
                       --user new-username
                       --pass password-for-new-user |
                       --encpass encrypted-password |
                       --random-pass
                      [--quota quota-in-blocks]
                      [--real real-name-for-new-user]
                      [--ftp]
                      [--shell /path/to/shell]
                      [--noemail]
                      [--extra email.address@some.domain]
                      [--mysql db] ...
                      [--group name] ...
                      [--web]
                      [--no-check-spam]
                      [--no-creation-mail]

So you could writeup a small script to take all the users you want to add, and use the above to add them in within your script. -Eric

Fri, 06/19/2009 - 10:25
Dim Git

Thanks Joe, Wow ! Putting it back just for me ? I am impressed. Thank you. I must be really special. :o)

OK, now I have the order, it is time to get another server. And I guess you have talked me into going Pro.

Eric, Thanks so much for your input, it really is appreciated. Problem is, if I tried to write a script like that I just know I would simply wreck the whole shebang. And then of course, I wouldn't be able to sort it all out. That is the reason I am using VM.

I am not called "Dim Git" for nothing.

Dim:  adjective rather stupid; dim-witted; not bright; not clear to the mind. :o)

Git: –noun British Slang. a foolish or contemptible person; worthless person. :o)

Thanks again you guys. [goes back to sit quietly in the corner]

Fri, 06/19/2009 - 18:17 (Reply to #6)
Joe
Joe's picture

Jamie has approved porting the batch user creation feature to Virtualmin GPL. It'll almost certainly be in 3.70 (Jamie has already updated the changelogs and such for the 3.70 release, but I don't think he has branched it yet, so there's almost certainly still time).

--

Check out the forum guidelines!

Sat, 06/20/2009 - 14:02
Dim Git

Thanks Joe,

Now, I have purchased the Pro version now anyway.

Still trying to find out how to get it because the serial numbers page is not working yet. I think.

Meanwhile I installed the GPL version so I can continue getting things set up.

Sat, 06/20/2009 - 19:46 (Reply to #8)
andreychek

Howdy,

What kinds of problems are you seeing downloading the Pro version?

In theory, that should work just fine now -- if it doesn't, let us know!

The Pro installer should be available at:

http://www.virtualmin.com/serial/

As Joe mentioned in the News forum, the 3 of us are heading out to a Perl conference and may be less responsive than usual. But, if the download isn't working for you, we'd definitely like to get that straightened out.

Just let us know what it's doing -- if you're seeing an error, if you aren't getting a download link, or what.

Thanks! -Eric

Sun, 06/21/2009 - 10:12 (Reply to #9)
Joe
Joe's picture

Orders are working fine now, but I see the issue with your order. I'll ping you via email and we'll get it straightened out.

--

Check out the forum guidelines!

Sat, 06/20/2009 - 14:17
ronald
ronald's picture

you can have the system generate passwords, thats what I do anyway.

This can be done also when importing emailusers with the --random-pass. They can then change it themselves in usermin if they wish.

Edit: on the other hand, in usermin module configuration there is the option: Prompt users with empty password to choose one at first login?

per haps this can be used?

Sat, 06/20/2009 - 23:59
Dim Git

Thanks Ronald, I will have a play.

Eric, thanks for coming back to me.

When I go to http://www.virtualmin.com/serial/ I get the following :-

Software Licenses

Virtualmin
You have no Virtualmin licenses.

Cloudmin
You have no Cloudmin licenses.

I assumed that part of the site had not been fixed yet, seems like I was wrong, again !

Are there instructions there on how to do the upgrade or is it obvious ?

Thanks and hope you enjoy your conference.

Sun, 06/21/2009 - 03:48
ronald
ronald's picture

that serial page is actually working for me. Per haps it needs to be added manually for you, I don't know.

Sun, 06/21/2009 - 13:58
Dim Git

OK, thanks Joe.

At least I have lived up to my name. :-)

Sun, 06/21/2009 - 14:27 (Reply to #14)
Joe
Joe's picture

Hehehe...no problem. So is the serial numbers page working for you now?

--

Check out the forum guidelines!

Mon, 06/22/2009 - 00:10
Dim Git

Okay, Yes, it is working for me now.

I have taken a look and I see where I made the error and would offer an explanation. In the unlikely event that someone else as thick as me does the same.

When you visit the shop page, it shows "Virtualmin" looking like a title for the two options underneath "Upgrades" and "Renewals". Since I was obviously not upgrading, I selected renewals because it just seemed the only other option.

I didn't realise that the title was a link to purchase. Duh !

I will try to upgrade my GPL to PRO in a short while.

Thanks for your help.

EDITED TO ADD: The upgrade was totally painless. Thank you. :-)

Topic locked