| Oracle® Email Administrator's Guide Release 2 (9.0.4.1) Part Number B10720-02 |
|
|
View PDF |
This chapter describes the Oracle Email commands provided by the command-line interface, and includes information about the purpose of each command, as well as its syntax, keywords, and parameters.
This chapter contains the following topics:
The oesctl command provides configuration and control operations on Oracle Email services.
This command is used from a command shell, such as /bin/csh on a Unix system. It provides a subset of the functionality available on the Oracle Enterprise Manager pages for Oracle Email. For example, oesctl can be used to start an Oracle Email IMAP4 server, but it cannot be used to modify IMAP service parameters.
Without arguments, oesctl prints out the following usage information:
% oesctl oesctl [ [command] [target|instance] ]
Where command can be any of the following:
The syntax of target is host:installation:service
Where:
host is the host name of the computer on which server processes run.
installation is always um_system for this release of Oracle Email.
service is one of the following:
gc: housekeepinglist: secure listsmtp_in: inbound SMTPsmtp_out: outbound SMTPimap: IMAPpop: POPThe syntax of instance is target:instance_id
Where:
instance_id is a number assigned to an instance when it is created. These numbers are selected automatically at instance creation time. Instance numbers cannot be configured by administrators.
The following examples are executed from a command shell running on a host named mailserver.
The configuration operations query or update the current configuration.
The query operations are:
% oesctl show targets % oesctl show processes target % oesctl create instance target % oesctl delete instance target
% oesctl show targets TARGET: mailserver:um_system:gc TARGET: mailserver:um_system:imap TARGET: mailserver:um_system:list TARGET: mailserver:um_system:pop TARGET: mailserver:um_system:smtp_in TARGET: mailserver:um_system:smtp_out
In the following examples, there is one process instance configured for the IMAP service running on the host mailserver, and there are no process instances for the POP service. A service must have at least one process instance before it can be started. Since the "show targets" example shows no POP instances,the POP service cannot be started on the host mail server.
% oesctl show processes mailserver:um_system:imap mailserver:um_system:imap:101771055406040653 % oesctl show processes mailserver:um_system:pop No processes for mailserver:um_system:pop
In the following example, the list of process instances for the target mailserver:um_system:gc is checked prior to instance creation, and found to be empty. The create command is used to create a new process instance for the target, after which the process instance list is checked again and found to contain the new instance.
% oesctl show processes mailserver:um_system:gc No processes for mailserver:um_system:gc % oesctl create instance mailserver:um_system:gc Succesfully created a new instance for a total of: 1 % oesctl show processes mailserver:um_system:gc mailserver:um_system:gc:101778964029981136
In the following example, the list of process instances for the target mail server: um_sytem: gc is checked prior to instance deletion. The delete command is used to delete the process instance, after which the process instance list is checked again and found to contain no processes.
% oesctl show processes mailserver:um_system:gc mailserver:um_system:gc:101778964029981136 % oesctl delete instance mailserver:um_system:gc Succesfully deleted an instance for a total of: 0 % oesctl show processes mailserver:um_system:gc No processes for mailserver:um_system:gc
The control operations display or alter the operational state of targets and instances.
The control operations are:
% oesctl show status <target> % oesctl startup <target> % oesctl startup <instance> % oesctl shutdown <target> % oesctl shutdown <instance> % oesctl refresh <target> % oesctl refresh <instance>
In the following example:
show shows two instances
status shows the instances are stopped
startup command starts the instances
status shows the instances running
shutdown terminates the instances
% oesctl show processes mailserver:um_system:gc mailserver:um_system:gc:101779027179112257 mailserver:um_system:gc:101779029537864556 % oesctl show status mailserver:um_system:gc mailserver:um_system:gc:101779027179112257 <stopped> mailserver:um_system:gc:101779029537864556 <stopped> % oesctl startup mailserver:um_system:gc mailserver:um_system:gc:101779027179112257 ok mailserver:um_system:gc:101779029537864556 ok % oesctl show status mailserver:um_system:gc mailserver:um_system:gc:101779027179112257 ----Heartbeat---- mailserver:um_system:gc:101779029537864556 ----Heartbeat---- % oesctl shutdown mailserver:um_system:gc mailserver:um_system:gc:101779027179112257 ----Shutdown---- mailserver:um_system:gc:101779029537864556 ----Shutdown---- % oesctl shutdown mailserver:um_system:gc No processes configured to be running for mailserver:um_system:gc
If oesctl is used to start a target, each configured process instance is started.
To start or stop a process instance, use oesctl startup instance and oesctl shutdown instance as follows.
% oesctl startup mailserver:um_system:gc:101779027179112257 ok % oesctl show status mailserver:um_system:gc mailserver:um_system:gc:101779027179112257 ----Heartbeat---- mailserver:um_system:gc:101779029537864556 <stopped> % oesctl shutdown mailserver:um_system:gc:101779027179112257 mailserver:um_system:gc:101779027179112257 ----Shutdown----
% oesctl refresh mailserver:um_system:gc:101779027179112257 ok:is refreshed. Message from console: null % oesctl refresh mailserver:um_system:gc mailserver:um_system:gc:101779027179112257 is refreshed. Message from console: null mailserver:um_system:gc:101779029537864556 is refreshed. Message from console: null
The refresh instance command sends the process instance a message to reload its process parameters from Oracle Internet Directory.
The refresh instance command refreshes all started process instances of that service.
Refresh can be used to change a process parameter and have the change take effect without having to stop and restart running processes. For example, the IMAP service log level can be changed in Oracle Internet Directory and refreshed without disconnecting any users currently connected to the IMAP service. Conversely, executing a shutdown followed by a startup changes the logging behavior, and temporarily disconnect users.
The oesucr command takes input from a file of user names to perform the following tasks:
OESUCR takes a file name as an input parameter.
For user creation, the file should contain a list of records, each followed by an empty line. Each record contains information about an e-mail user to be created. Each record in the file is a name-value pair for an attribute of the e-mail user entry in the directory. Each record must have at least three mandatory attributes:
For user deletion, the file should contain one line listing all the users to be deleted, each separated from the next by a comma.
OESUCR only creates and deletes e-mail users, not corresponding public users. For user creation, the public users must exist prior to creating the corresponding e-mail users. For user deletion, after running the tool, the users are no longer valid e-mail users, but they are still users in the directory.
% oesucr file [-v] [-d]
Where:
file is the path to the file containing the user records to be created or the list of users to be deleted.
The -v flag prints out debug messages.
The -d flag deletes users.
-v and -d can be used together.
To change an e-mail address:
oesucr old_email_address1=new_email_address1 -change
For example:
%oesucr user1@us.oracle.com=newuser1@us.oracle.com
After this command is run, user1@acme.com becomes newuser1@acme.com.
%oesucr filename -encoding=UTF-8
where filename is the name of a file to be read as UTF-8.
The file is read as UTF-8 to support a different type of character encoding.
The following examples assume the file named user_file contains the following records:
Running % oesucr user_file creates two e-mail users called testuser1 and testuser2. Each record in the file contains only the three mandatory attributes: the email address, the quota, and the base user DN.
mail=testuser1@us.oracle.com orclmailquota=400000000 baseuserdn=cn=testuser1,cn=users,o=oracle,dc=com mail=testuser2@us.oracle.com orclmailquota=400000000 baseuserdn=cn=testuser2,cn=users,o=oracle,dc=com
Running % oesucr user_file creates two-e-mail users: testuser1 and testuser2. The role of the first user is set to domain administrator.
mail=testuser1@us.oracle.com orclmailquota=400000000 orclMailDomainControlAci=domain mail=testuser2@us.oracle.com orclmailquota=400000000 baseuserdn=cn=testuser2,cn=users,o=oracle,dc=com
Running % oesucr user_file -d deletes the e-mail users: testuser1@us.oracle.com, testuser2@oracle.com, and testuser3@oracle.com.
mail=testuser1@us.oracle.com,testuser2@oracle.com,testuser3@oracle.com
The following example shows how to create a user through the command-line, without creating a new file. Only one user can be created at a time in this manner:
oesucr -cmd mail=user1@acme.com baseuserdn=cn=user1,cn=users,dc=us,dc=acme,dc=com orclmailquota=400000000 other optional attributes
All parameters are separated by a space, and have the same names as those used in the file. All mandatory attributes must be specified, and can take any valid optional attributes.
The following example shows how to specify a real domain for users:
mail=user1@company1.com realdomain=acme.com baseuserdn=...... orclmailquota=......
The e-mail address of the user becomes user1@company1.com, although the user's entry in Oracle Internet Directory is under acme.com. The name company1.com may or may not exist.
OESDL is the command-line tool for adding users to and removing users from distribution lists.
The oesdl tool takes a file as input. The file should contain a list of records, each followed by an empty line. Each record must have the name of the distribution list and a list of its users.
For adding users to a distribution list, the user type must be indicated, as a regular user, a distribution list, an alias, or a foreign user, as follows:
You can also add users to a list that does not yet exist, by creating the list in the same command that specifies its users. See section "Adding Users to a New List" for more information.
To create a new list, the owner must be specified.
% oesdl file
Where:
file is the path to the file containing the list records.
The following examples assume the file named list_file contains the following records:
Running % oesdl list_file adds user1, user2, and user3 (usertype=U) to list1@oracle.com (usertype=L), which must already exist, since newlist=n (no). It also adds list1@oracle.com to another list called list2@oracle.com.
listname=list1@oracle.com action=add newlist=n usertype=U users=user1@oracle.com,user2@oracle.com,user3@oracle.com listname=list2@oracle.com action=add newlist=n usertype=L users=list1@oracle.com
Running % oesdl list_file creates a new list called list1@oracle.com, sets its owner to user1@oracle.com, and adds users user1@oracle.com and user3@oracle.com to the new list.
listname=list1@oracle.com action=add newlist=y owner=user1@oracle.com usertype=U users=user1@oracle.com,user3@oracle.com
Running % oesdl list_file removes user1 and user2 from list1@oracle.com. It then creates a new list called list2, sets the owner as user1@oracle.com, and adds user1, and user2 to the new list list2@oracle.com.
listname=list1@oracle.com action=delete usertype=U users=user1@oracle.com,user2@oracle.com listname=list2@oracle.com action=add newlist=y owner=user1@oracle.com usertype=U users=user1@oracle.com,user2@oracle.com
The oesrl command creates and manages server side rules.
When creating rules, two formats of text file are accepted. The Java properties file format and the XML format.
When listing rules, only the XML format is listed.
% oesrl [-c file | -x file | -p ruleowner]
Where:
-c file: creates rules based on a Java property file
-x file: creates rules based on an XML file
-p ruleowner: prints ruleowner rules in XML
The file parameter is defined in the next section, "File Formats". Examples of using the -c parameter appear in "Creating User Rules Using Property File Input"; for the -x parameter, in "Creating User Rules Using XML File Input"; and for -p, in "Retrieving Rules".
Property files are text files with name-value pairs. Names can be organized hierarchically and separated by periods. The following are the top-level property names used in the file:
oesrl utility prints out debugging messages. This property is optional.Under each event, you can define anunlimited number of rules using property name eventname.rule#, where eventname is one of the six events and # is a sequence number starting from 1. For example, the property deliver.rule1 defines the name of the first rule under the deliver event. All attributes of this rule can be further defined under the prefix deliver.rule1.
Under each rule, one can define actions and their parameters. Rules often have conditions that need to be defined, using the following list of property names corresponding to each rule attribute:
eventname.rule#.action#: the sequence of actions that can be defined under eventname.rule#.
The choices of values are listed in Oracle Email Java API documentation under Java class CommandType.
eventname.rule#.action#.param#: the parameter sequence needed for the action eventname.rule#.action#.eventname.rule#.active: an optional property that can be set to true or false indicating whether eventname.rule# is active.eventname.rule#.attr#, eventname.rule#.op#, eventname.rule#.operand#: together they represent a condition associated with the rule eventname.rule# as long the same sequence number is used.
The choices of values for eventname.rule#.attr# are listed in Oracle Email Java API documentation under Java class AttributeType. The choices of values for eventname.rule#.op# are listed in Oracle Email Java API documentation under Java class OperatorType.
eventname.rule#.negate#: an optional property value that can be set to true or false, indicating whether the condition number should be negatedeventname.rule#.param#: in case when eventname.rule#.attr# requires a parameter (such as xheader), use this property to specify the parameter value.eventname.rule#.case#: an optional property value that can be set to true or false, indicating whether eventname.rule#.op# is case sensitive .eventname.rule#.cond: if multiple conditions are needed, use this property to specify whether and or or should be used to combine the conditions.
Oracle Corporation recommends listing rule properties in order, so that readability of the property file is maximized. When running the oesrl utility, listing rule properties in order is not required.
XML is the storage format of server side rules. An XML rule representation can be created directly and oesrl can be used to load the rules into the system. The XML file specified needs to a valid XML file according to the rules XML schema. To obtain the XML schema for rules, extract the schema file oracle/mail/sdk/rule/mail_rule.xsd from the Java SDK library esmail_sdk.jar under $ORACLE_HOME/jlib.
This example demonstrates how to use property files to specify rules for a user, and how to use the oesrl utility to save the rules.
% cat > rules.properties ruleowner=user1@oracle.com ruletype=user event1=deliver deliver.rule1=Moving private messages deliver.rule1.cond=or deliver.rule1.attr1=rfc822to deliver.rule1.op1=contains deliver.rule1.operand1=user1@oracle.com deliver.rule1.attr2=rfc822cc deliver.rule1.op2=contains deliver.rule1.operand2=user1@oracle.com deliver.rule1.action1=moveto deliver.rule1.action1.param1=/user1/Private ^D % oesrl -c rules.properties
This example demonstrates how to use XML files to specify rules for a user, and how to use the oesrl utility to save the rules.
% cat > rules.xml <account qualifiedName=user1@oracle.com> <rulelist event=deliver> <rule description=Moving private messages> <condition junction=or> <condition> <attribute tag=rfc822to/> <operator op=contains/> <operand>user1@oracle.com</operand> </condition> <condition> <attribute tag=rfc822cc/> <operator op=contains/> <operand>user1@oracle.com</operand> </condition> </condition> <action> <command tag=moveto/> <parameter>/user1/Private</parameter> </action> </rule> </rulelist> </account> ^D % oesrl -x rules.xml
This example demonstrates how to use list rules for a user in XML format.
% oesrl -p user1@oracle.com <account qualifiedName=user1@oracle.com> <rulelist event=deliver> <rule description=Moving private messages> <condition junction=or> <condition> <attribute tag=rfc822to/> <operator op=contains/> <operand>user1@oracle.com</operand> </condition> <condition> <attribute tag=rfc822cc/> <operator op=contains/> <operand>user1@oracle.com</operand> </condition> </condition> <action> <command tag=moveto/> <parameter>/user1/Private</parameter> </action> </rule> </rulelist> </account>
The oesutil command-line tool enables administrators to change passwords and delete domains.
Use the following command to change passwords:
oesutil -umadmin_passwd old new -v -ocsv1
Where:
There are five delete options that can be used:
user: Deletes all users in a domainalias: Deletes all aliases in a domainlist: Deletes all lists in a domainall: Deletes everything in a domainnews: Deletes all newsgroups in a domainThe following syntax is used for oesutil:
-v used for debugging- domain=domain1 specifies the domain- installation=install1 specifies the installation, and is used only for in type=all cases
oesutil -delete_domain type=user domain=edu oesutil -delete_domain type=list domain=com -v oesutil -delete_domain type=all domain=edu installation=um_system oesutil -delete_domain type=news domain=idc.oracle.com installation=um_system
The OESNG command-line tool enables administrators to create and delete NNTP newsgroups in the Oracle Collaboration Suite system. This utility accepts a file as an input and creates or deletes newsgroups according to the information specified in the file.
The file passed as an input to the OESNG command-line tool must contain a list of records, each followed by an empty line. Each record consists of a set of name=value pairs containing information about the newsgroup to be created or deleted. Names are not case-sensitive. Unless indicated otherwise, all attributes can be specified only once for a group. Lines that begin with the "#" character are treated comments and are not processed by the tool.
For groups that are being deleted, it is sufficient to specify the name of the group and the action as delete.
To delete groups, specify the name of the group and the action as delete.
oesng file
where file is the path to the file containing the newsgroups to be processed.
The following examples show how to use the OESNG command-line tool.
The following example demonstrates how to create a simple public newsgroup.
oesng newsfile <pre>
where newsfile contains the following
name=newsgroup1 newsstore=db1.acme.com
The following example demonstrates how to create a public moderated newsgroup that permits posting and retains articles for 15 days.
oesng newsfile
where newsfile contains the following:
name=newsgroup2 newsstore=db1.acme.com action=create description=A new newsgroup moderatedgroup=true moderator=user1@acme.com moderator=user2@acme.com postingallowed=true retentiondays=15
The following example demonstrates how to delete a public newsgroup.
oesng newsfile
where newsfile contains the following
name=newsgroup5 action=delete
The following example demonstrates how to
oesng newsfile
where newsfile contains the following:
name=newsgroup3 newsstore=db1.acme.com postingallowed=false name=private.newsgroup1 domain=acme.com action=delete name=private.newsgroup2 domain=acme.com newsstore=db1.acme.com postingallowed=true moderatedgroup=true moderator=mod1@acme.com moderator=mod2@acme.com
The OESPR command-line tool enables administrators to create and delete news peers and to associate newsgroups with news peers in an Oracle Collaboration Suite system. It accepts a file as an input and creates or deletes peers according to the information specified in the file.
The file that is passed as an input to the oespr command-line tool must contain a list of records, each followed by an empty line. Each record consists of a set of name=value pairs which contain information about the newsgroup to be created or deleted. Names are not case-sensitive. Unless indicated otherwise, all attributes can be specified only once for a peer.
Lines beginning with the "#" character are treated as comments and are not processed by the tool.
The following describes the newsgroup parameters that can be specified in the file.
To delete peers, specify the host name of the peer and the action as delete.
oespr file
where file is the path to the file containing the peers to be processed.
The following examples show how to use the OESPR command-line tool.
The following example demonstrates how to create a simple peer.
oespr peerfile
where peerfile contains the following:
hostname=host1.acme.com
The following example demonstrates how to create host1.acme.com as a peer that uses articles from the comp.lang.c and comp.lang.java groups on port 2119:
oespr peerfile
where peerfile contains the following:
hostname=host1.acme.com port=2119 feedgroup=comp.lang.c feedgroup=comp.lang.java
The following example demonstrates how to delete a peer.
oespr peerfile
where peerfile contains the following:
hostname=host1.acme.com action=delete