Skip to content

vgroup.1

Manvendra Bhangui edited this page Feb 25, 2024 · 7 revisions

NAME

vgroup - create distribution groups for set of users in a virtual domain

SYNOPSYS

vgroup -a [-n] [-c][q] [-v] groupAddress [password]
vgroup [-i aliasLine] [-d aliasLine]
  [-u newaliasLine -o oldaliasLine] [-v] groupAddress

DESCRIPTION

vgroup implements groups functionality in IndiMail. It is a utility to add groups. On an existing group, vgroup can be used to add, modify and delete members.

The first form of usage is used for creating a new group. Subsequently normal IndiMail programs (vuserinfo, vdeluser, vmoduser, vpasswd, vsetuserquota) can be used to operate on a group exactly like on virtual users. In fact, a group in IndiMail is a virtual user.

The second form of usage is used to add, modify, delete aliases to the group. It uses the valias to do this. The most comman usage of vgroup is to add forwardings. i.e. All mails sent to the group will be forwarded to members. In this case address will be of the form '&email_address'.

The implementation of groups in IndiMail is actually a normal email account with aliases. Hence a group can also be created using vadduser in conjunction with valias with the restriction that the gecos starts with the word 'MailGroup' (see option -c below for more explanation). vgroup has been written for user convenience alone.

OPTIONS

Common Options

-v
Sets verbose mode while vgroup is operating

groupAddress
Email address for the group.

Options for adding a New Group.

-e
Set the encrypted Password field This options disables the internal encryption routine which encrypts the password provided on the command line. This option sets the encrypted password field exactly as given on the command line without any encryption. It expects you to give a standard encrypted password or you can use this to set plaintext/salted password for CRAM authentication.

-r len
Generates Random Password of length len. Need not give password on command line.

-h hash
Specify hash which is one of DES, MD5, SHA-256, SHA-512. Here ID is the id in /etc/shadow. See incrypt(1).

HASH ID Description
DES - DES encryption (shouldn't be used)
MD5 1 MD5 encryption (shouldn't be used)
SHA-256 5 SHA256 encryption
SHA-512 6 SHA512 encryption

You can also set the environment variable PASSWORD_HASH to set the encryption method. The -h argument overrides the environment variable PASSWORD_HASH. The value of PASSWORD_HASH environment variable identifies the encryption method used and this then determines how the rest of the password string is interpreted. The following values of PASSWORD_HASH are supported:

PASSWORD_HASH Value	Description
0	DES encryption (shouldn't be used)
1	MD5 encryption (shouldn't be used)
2	SHA256 encryption
3	SHA512 encryption

-m scram
Sets the CRAM or SCRAM method for encryption. This will set SCRAM password in the scram field in indimail/indibak tables. For CRAM method, it will set clear text password when -C option is specified.

CRAM/SCRAM method	Description
-----------------	-----------
CRAM	Sets clear text password suitable for any
	CRAM method (CRAM-MD5, CRAM-SHA1, ...)
SCRAM-SHA-1	SHA1 encryption suitable for SCRAM-SHA-1.
SCRAM-SHA-256	SHA256 encryption suitable for SCRAM-SHA-256.

-C
Sets up authentication suitable for CRAM-MD5, CRAM-SHA1, CRAM-SHA224, CRAM-SHA256, CRAM-SHA384, CRAM-SHA512, CRAM-RIPEMD and DIGEST-MD5 methods. This works by storing the clear text credentials in the database. if the -m option is selected, this will additionally store a hex-encoded salted password for SCRAM methods, which can be used instead of clear text passwords by clients (for SCRAM authentication).

-S salt
Specify a base64 encoded salt to be used when generating SCRAM password. If not specified, this will be generated using libsodium/gsasl. Here base64 implies characters [0-9], [a-z], [A-Z] and the two characters [./].

-I iteration
Specify the iteration count to be used when generating SCRAM password. The default is 4096.

passwd
Passwd for the user. If not given, user will be prompted.

-a
Add a new group.

-H hostid
For a clustered domain, this option can be used to create the user on a specific host having hostid as the hostid.

-M mdahost
For a clustered domain, this option can be used to create the user on a specific cluster having Mail Delivery Host as mdahost.

-c
Comment field (gecos) for the group account. Internally the comment starts with the word 'IndiGroup'. This will be shown if you use the command vuserinfo on the group address. It is advisable not to change this by external programs such as vmoduser. IndiMail figures out difference between a normal email account and a group account by checking if gecos field starts with the word 'IndiGroup'.

-q
Sets the Quota for the group. This should be set in case the group will also function as a normal user and receive mails.

-n
Ignore requirement of groupAddress to be a local address on the node where vgroup is being run (option valid for clustered domain only)

Options for an Existing Group

-i aliasLine
Insert alias line aliasLine in the group. An alias line has one of the 3 forms. See dot-qmail(5) for more details.

 1. &email       - Forward mails to email
 2. Maildir      - copy mails to a Maildir with path Maildir
 3. | Command    - pipe the mail through command Command

-d aliasLine
delete aliasLine from the group. See valias for more details

-u newaliasLine -o oldaliasLine
Modify oldaliasLine to newaliasLine alias in the group. See valias for more details

RETURN VALUE

0 if all steps were successful, non-zero otherwise. If any of the steps fail, a diagnostic message is printed.

SEE ALSO

dot-qmail(5), valias(1), vcalias(8), vadduser(1), vdelivermail(8), vrenamedomain(1), vreorg(8),

Clone this wiki locally