The 20 Minute E-Mail Solution!
TOC PREV NEXT INDEX

Adding Aliases (addalias.exe)


Addalias.exe is a utility for adding batches of aliases stored in a text file, or for modifying or deleting aliases on the IMail Server system. If you invoke addalias with no command line options (by typing only addalias at the MS-DOS prompt), you can manually input command lines, pressing Enter after each line. If you do this, press CTRL-Z to exit the utility when you are done.

Basic Command Syntax

addalias [-h hostname] [-cX] [-{a|d|m}] alias[=destination]

Argument Explanation
-a aliasname Use -a to add an alias if the alias doesn't already exist, where aliasname is the alias you want to add. Only one alias may be added in a single command line.
-cX Use -c to specify to specify an alternate delimiting character. This tells Addalias to replace the default delimiter (the equal sign) with the desired delimiter. Note that a space is not allowed. (When you use -c in a text file, it affects all lines in that file.)
-d aliasname Use -d to delete an alias that already exists, where aliasname is the alias you want to delete. Only one alias may be deleted in a single command line.
-f filename You can put multiple commands into a text file for one execution of Addalias. Use -f to specify the name of the text file containing the Addalias commands. (All the above commands are valid for the text file, but note that -h and -c persist across multiple lines of input.)
-h hostname Use the -h argument to specify the virtual host for the alias. The primary IMail Server host is used if no host is specified. (When you use -h in a text file, it affects all lines in that file.)
-i groupname Use -i to import a NT group as a group alias if the alias does not already exist, where groupname is the group that you want to import. Only one alias can be added in a single command line.
-l Use -l to list current aliases. This argument may not be used in a text file.
-m aliasname Use -m to modify or add an alias even if the alias exists, where aliasname is the alias you want to modify. Only one alias may be modified in a single command line.
-? Use -? to see a summary of argument options.

Adding an Alias to the Default Domain

The following examples add an alias of newalias to a domain named email.

addalias -c: -a newalias:email 
addalias -a newalias=email 
addalias -c: newalias:email  
addalias newalias=email  
addalias newalias email 

Adding an Alias to a Specific Domain

The following example adds an alias of newalias to a domain named email in the host named secondhost.com.

addalias -h secondhost.com -a newalias email 

Deleting an Alias

The following examples delete an alias.

addalias -d oldalias 
addalias -h another.net -d alias1 

Importing a Windows NT Group as a Group Alias

The following example converts an existing NT group into an alias.

addalias -h NThost.com -i groupname

This feature is only intended to work for local and global groups only. It is not intended to work with Microsoft Active Directory Services (ADS) "Universal" Groups.

Note: This option is only for hosts using the Windows NT database. Global groups will be ignored if the server is not a primary domain controller (PDC).

Return Codes

Addalias returns 1 if it performed at least one of the requested operations; it returns 0 if it failed.

Using a Text File

Instead of entering commands at the MS-DOS prompt, you can use a text file to input multiple commands for one execution. You can use this technique to add aliases to your IMail Server system from another mail system if the other mail program can create a delimited text file of aliases.

For example, you could create a text file named test.txt that contains the following lines.

test1=me 
test2=test1 
test3=test2 
-h virtual001 test1=me 
test3=me 
-m test2=him 
-d test3 

At the MS-DOS prompt, you enter:

addalias < test.txt 

The < symbol tells addalias to use test.txt as input.

You then get the following messages:

current host is mail1.ipswitch.com
added [mail1.ipswitch.com] test1 -> me
added [mail1.ipswitch.com] test2 -> test1
added [mail1.ipswitch.com] test3 -> test2
current host is virtual001
alias exists [virtual001] test1 -> someone
added [virtual001] test3 -> me
modified [virtual001] test2 -> him
deleted [virtual001] test3 -> me 


Ipswitch, Inc.
http://www.ipswitch.com
TOC PREV NEXT INDEX
©Ipswitch 2002