Edit Alias

Usage

edit alias $alias@$domain

- or -

edit alias $alias domain $domain

Description

The command edit alias is used to modify a Virtual Alias record for REVLY. This command may be used to alter the parameters Name and Maildrop.

Symbol

edit 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

LDAP Suffix

usage: ldap suffix $ldapsuffix

description: The base search path of the LDAP tree.

default: revly

Change Name

usage: change name $name

description: Change the real name or description for the alias.

Domain

usage: domain $domain

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

Add Maildrop

usage: add maildrop $maildrop [$maildrop etc..]

description: Add a maildrop to the list of forwarders for the alias.

Remove Maildrop

usage: remove maildrop $maildrop [$maildrop etc..]

description: Remove a maildrop from the list of forwarders for the alias.

Replace Maildrop

usage: replace maildrop $maildrop [$maildrop etc..]

description: Replace all a forwarders for the alias with the supplied list.

Actions

- Generate a LDIF file containing the alterations to the alias record.

- Execute ldapmodify to edit the alias record in OpenLDAP.

Template

# Edit virtualAlias
dn: alias=:#ALIAS#:,domain=:#DOMAIN#:,o=domains,dc=:#LDAP_SUFFIX#:
changetype: modify
[:#CHANGE_NAME#:]
[:#ADD_MAILDROP#:]
[:#REMOVE_MAILDROP#:]
[:#REPLACE_MAILDROP#:]
replace: changeDate
:#CHANGE_DATE#:

Sub-Templates

changeDate: :#CHANGE_DATE#:

ChangeName

replace: name
:#NAME#:
-

Name

name: :#NAME#:

Add Maildrop

add: maildrop
:#MAILDROP#:
-

Remove Maildrop

delete: maildrop
:#MAILDROP#:
-

Replace Maildrop

replace: maildrop
:#MAILDROP#:
-

Maildrop - Repeatable

maildrop: :#MAILDROP#:

Return Codes

CodeHuman Readable Output
0Edited the alias '$alias@$domain'.
1Could not edit the alias '$alias@$domain' because it does not exist.
2Failed to add attributes to the alias '$alias@$domain' because one or more attributes already exists.
3Failed to remove attributes from the alias '$alias@$domain' because one or more attributes does not exist.

Example

Input

edit alias info@example.com change name "Information" replace maildrop sally@example.com

Generated LDIF file

# Edit virtualAlias
dn: alias=info,domain=example.com,o=domains,dc=revly
changetype: modify
replace: name
name: Information
-
replace: maildrop
maildrop: sally@example.com
-
replace: changeDate
changeDate: 1419358202

Output

Edited the alias 'info@example.com'.

Returncode

0