[BlueOnyx:01459] Re: Automatically create users from a file
mstauber at blueonyx.it
Sun Jun 21 01:29:09 PET 2009
> I need to create users automatically every hour from a file, as is done
> from the control panel BlueOnyx in: *Site Management > User Management >
> Import > Url*
That is a bit unusual.
You could write a script that parses your textfile and then uses the
"/usr/sbin/cadduser" command to create the desired user(s).
Here are the commands that the 5100R-shell-tools provide:
They allow you to add / modify / delete sites and users from the command line.
> You also need to remove users who have more than 6 months without access
> to e-mail account.
User logins to POP3, IMAP and SMTP is of course logged in /var/log/maillog and
/var/log/secure. But as those logs are rotated and packed frequently.
So you'd have to set up a script that builds a list of users, parses the logs
at least once a day and builds a small database that keeps track of who logged
in when for the last time. Based on that you could then use /usr/sbin/cdeluser
to delete users that haven't logged in to email in the last six months.
With best regards
More information about the Blueonyx