Create Alias

Usage

create alias $alias@$domain maildrop $maildrop [$maildrop etc.]

- or -

create alias $alias domain $domain maildrop $maildrop [$maildrop etc.]

Description

The command create alias will create a Virtual Alias record for REVLY. Aliases are email addresses which forward mail to one or more email addresses. Any emails sent to the alias address will be sent to one or more destination email addresses described by the command's maildrop parameter.

Symbol

create alias

Cardinal

action-identifier

Language

Alias Admin

Module

Admin

Parameters

ChangeDate

usage: changedate $timestamp

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

default: Current timestamp

CreateDate

usage: createdate $timestamp

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

default: Current timestamp

Domain

usage: domain $domain

description: The name of a domain that this alias is a part of.

LDAP Suffix

usage: ldap suffix $ldapsuffix

description: The base search path of the LDAP tree.

default: revly

Maildrop

usage: maildrop $maildrop [$maildrop etc.]

description: One or more email addresses where email should be forwarded to.

Name

usage: name $name

description: A real name or description for the alias.

Actions

- Generate a LDIF file containing the new alias information.

- Execute ldapmodify to add the alias to OpenLDAP.

Template

# Create virtualAlias
dn: alias=:#ALIAS#:,domain=:#DOMAIN#:,o=domains,dc=:#LDAP_SUFFIX#:
changetype: add
objectClass: top
objectClass: virtualAlias
active: TRUE
delete: FALSE
[:#NAME#:]
alias: :#ALIAS#:
domain: :#DOMAIN#:
mail: :#ALIAS#:@:#DOMAIN#:
:#MAILDROP#:
:#CREATE_DATE#:
:#CHANGE_DATE#:

Sub-Templates

CreateDate

createDate: :#CREATE_DATE#:
changeDate: :#CHANGE_DATE#:

Domain

domain: :#DOMAIN#:

Maildrop

maildrop: :#MAILDROP#:

Name

name: :#NAME#:

Return Codes

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

Example

Input

create alias info@example.com name "Information" maildrop sally@example.com

Generated LDIF file

# Create virtualAlias
dn: alias=info,domain=example.com,o=domains,dc=revly
changetype: add
objectClass: top
objectClass: virtualAlias
active: TRUE
delete: FALSE
name: Information
alias: info
domain: example.com
mail: info@example.com
maildrop: sally@example.com
createDate: 1419358202
changeDate: 1419358202

Output

Created the alias 'info@example.com'.

Return Code

0