Create Domain

Usage

create domain $domain

Description

The command create domain will create a Virtual Domain record for REVLY. Domains may contain users and aliases. The domain will have access to services defined by the command's parameters. 

Symbol

create domain

Cardinal

action-identifier

Language

Domain Admin

Module

Admin

Parameters

ChangeDate

usage: changedate $timestamp

description: A Unix timestamp representing the last time the domain record was modified.

default: Current timestamp

CreateDate

usage: createdate $timestamp

description: A Unix timestamp representing the time the domain record was created.

default: Current timestamp

Group

usage: group $group

description: The name of a group that the domain is a part of.

LDAP Suffix

usage: ldap suffix $ldapsuffix

description: The base search path of the LDAP tree.

default: revly

Password

usage: password $password

description: Sets a password for the domain. This allows a domain administrator to login with the domain as a username.

Service

usage: service $service [$service etc..]

description: A list of services that the domain will have access to.

Actions

- Encrypt a new domain administrator password if provided.

- Generate a LDIF file containing the new domain information.

- Execute ldapmodify to add the domain to OpenLDAP.

Template

# Create virtualDomain
dn: domain=:#DOMAIN#:,o=domains,dc=:#LDAP_SUFFIX#:
changetype: add
objectClass: top
objectClass: virtualDomain
postfixTransport: virtual:
active: TRUE
delete: FALSE
:#CREATE_DATE#:
:#CHANGE_DATE#:
domain: :#DOMAIN#:
[:#GROUP#:]
[:#PASSWORD#:]
[:#SERVICE#:]

Sub-Templates

CreateDate

createDate: :#CREATE_DATE#:

ChangeDate

changeDate: :#CHANGE_DATE#:

Group

group: :#GROUP#:

Password

userPassword: :#PASSWORD#:

Serivce

service: :#SERVICE#:

Return Codes

CodeHuman Readable Output
0Created the domain '$domain'.
1Could not create the domain '$domain' because it already exists.

Example

Input

create domain example.com group "root" password "secret" service email groupware im

Generated LDIF file

# Create virtualDomain
dn: domain=example.com,o=domains,dc=revly
changetype: add
objectClass: top
objectClass: virtualDomain
postfixTransport: virtual:
active: TRUE
delete: FALSE
createDate: 1419358202
changeDate: 1419358202
domain: example.com
group: root
userPassword: {SSHA}GojpJiwrtz6zYKLyNa6nIoMy0GUS/LaYsgFSbA==
service: email
service: groupware
service: im

Output

Created the domain 'example.com'.

Returncode

0