SMTP Connection AVCLI Commands
The AVCLI SMTP commands enable you to manage SMTP email notifications for Audit Vault Server reports and alert.
About the SMTP Connection AVCLI Commands
The AVCLI SMTP connection commands enable you to perform tasks such as registering and modifying SMTP connections.
ALTER SMTP SERVER
Use the ALTER SMTP SERVER command to modify SMTP server configurations and states.
The ALTER SMTP SERVER command modifies the SMTP server configuration and state.
Syntax
ALTER_SMTP SERVER AT <host:[port]> | [SENDER ID <sender_id>]|
[SENDER EMAIL <sender_email>] | [AUTHENTICATED BY <username>]
Arguments
| Argument | Description |
|---|---|
| host:[port] | The name, and optionally, the outgoing port number of the SMTP server. The port defaults to 25. |
| sender_id | The user ID of the person responsible for sending the email (that is, the email address that appears after From). |
| sender_email | The email address of the person whose ID you entered for the SENDER ID, in Request For Comments (RFC) 822 format. |
| username | Optional. The authentication credentials for the recipient user. If the SMTP server runs in authenticated mode and needs a valid user name to connect to send emails, use the |
Usage Notes
-
After you complete the SMTP server configuration, it is enabled and ready to use.
-
If the SMTP server is a secure server, then run the
ALTER SYSTEM SMTP SECURE MODE ONcommand after you runREGISTER SMTP SERVER. -
To test the configuration, run the
TEST SMTP SERVERcommand. -
If you omit an argument, then Audit Vault Server uses the previously configured setting.
Example
avcli> ALTER SMTP SERVER AT new_sample_host:465;
The host and port configuration information of the SMTP server is changed.
avcli> ALTER SMTP SERVER SENDER ID new-do-not-reply;
The sender ID configuration information of the SMTP server is changed.
avcli> ALTER SMTP SERVER AT new_sample_host:465 sender id new-do-not-reply;
The host and port as well as the sender ID of the SMTP server is changed.
ALTER SMTP SERVER DISABLE
Use the ALTER SMTP SERVER DISABLE COMMAND to disable SMTP server configurations.
The ALTER SMTP SERVER DISABLE command disables the SMTP server configuration.
Syntax
ALTER SMTP SERVER DISABLE
Usage Notes
-
After you disable the configuration, Audit Vault Server preserves the most recent configuration. So, when you re-enable the configuration, this configuration is made active again.
-
To find details about the most recent service configuration, see “LIST ATTRIBUTE OF SMTP SERVER”.
-
This command may be useful when the SMTP Server is down for system maintenance.
Example
avcli> ALTER SMTP SERVER DISABLE;
SMTP integration is disabled.
Disables the integration between the Audit Vault and SMT Server.
ALTER SMTP SERVER ENABLE
Use the ALTER SMTP SERVER ENABLE command to enable SMTP server configurations for servers that you have registered with the REGISTER SMTP SERVER command or that you modified with the ALTER SMTP SERVER command.
The ALTER SMTP SERVER ENABLE command enables SMTP server configurations for servers registered with the REGISTER SMTP SERVER command or modified with the ALTER SMTP SERVER command.
Syntax
ALTER SMTP SERVER ENABLE
Usage Notes
-
When you enable the configuration, Audit Vault Server uses the configuration that was in place when you last disabled the SMTP configuration.
-
To find details about the most recent service configuration, see “LIST ATTRIBUTE OF SMTP SERVER”.
Example
avcli> ALTER SMTP SERVER ENABLE;
SMTP integration is enabled.
Enables the integration between the Audit Vault and SMTP server.
ALTER SMTP SERVER SECURE MODE OFF
Use the ALTER SMTP SERVER SECURE MODE OFF command to disable the secure mode in secure SMTP servers.
The ALTER SMTP SERVER SECURE MODE OFF command disables secure mode in an existing secure SMTP server.
Syntax
ALTER SMTP SERVER SECURE MODE OFF
Usage Notes
Run this command after you run either the REGISTER SMTP SERVER or ALTER SMTP SERVER command.
Example
avcli> ALTER SMTP SERVER SECURE MODE OFF;
Updated SMTP server configuration to not use secure protocol.
Sets the SMTP Server registered with Oracle Audit Server to non-secure mode.
ALTER SMTP SERVER SECURE MODE ON
Use the ALTER SMTP SERVER SECURE MODE ON command to enable SMTP server configurations and specify the secure protocol mode that is in use.
The ALTER SMTP SERVER SECURE MODE ON command enables the SMTP server configuration and specifies the secure protocol mode used.
Syntax
ALTER SMTP SERVER SECURE MODE ON PROTOCOL [SSL | TLS ] [TRUSTSTORE <location>]
Arguments
| Argument | Description |
|---|---|
PROTOCOL |
Optional: One of the following types of protocol:
|
| location | The path to the truststore file used to validate the server certificates. Optional. |
Usage Notes
Run this command after you run either the REGISTER SMTP SERVER or ALTER SMTP SERVER command.
Only run this command if the SMTP server that you are configuring is a secure server.
See Also:
Examples
avcli> ALTER SMTP SERVER SECURE MODE ON PROTOCOL ssl TRUSTSTORE /sample_tstore;
This command acknowledges that the SMTP Server registered with Oracle Audit Vault Server is in secure mode, that is, supports SSL or TLS, and uses the file ` /sample_tstore` to validate the certificate obtained from the SMTP Server during connects.
avcli> ALTER SMTP SERVER SECURE MODE ON PROTOCOL tls TRUSTSTORE /sample_tstore;
This example sets TLS protocol instead of SSL.
DROP SMTP SERVER
Use the DROP SMTP SERVER command to unregister the SMTP server that is registered with Oracle Audit Vault Server and remove associated configuration metadata.
The DROP SMTP SERVER command unregisters the SMTP Server registered with the Audit Vault Server and removes any associated configuration metadata.
Syntax
DROP SMTP SERVER
Example
avcli> DROP SMTP SERVER;
SMTP server unregistered successfully.
The SMTP Server is unregistered and any associated configuration metadata is removed.
LIST ATTRIBUTE OF SMTP SERVER
Use the LIST ATTRIBUTE OF SMTP SERVER command to dislay the current SMTP configuration details the Oracle Audit Vault Server uses.
The LIST ATTRIBUTE OF SMTP SERVER command displays the current SMTP configuration details used by Audit Vault Server.
Syntax
LIST ATTRIBUTE OF SMTP SERVER
Usage Notes
To reconfigure the SMTP service connection, run the ALTER SMTP SERVER (“ALTER SMTP SERVER”) command.
Example
avcli> LIST ATTRIBUTE OF SMTP SERVER;
The configuration data/attributes for the SMTP server appear.
REGISTER SMTP SERVER
Use the REGISTER SMTP SERVER command to register SMTP server configurations with Audit Vault Server.
The REGISTER SMTP SERVER command registers the SMTP server configuration with the Audit Vault Server.
Syntax
REGISTER SMTP SERVER AT <host:[port]> SENDER ID <sender_id> SENDER EMAIL <sender_email>
[AUTHENTICATED BY <username>]
Arguments
| Argument | Description |
|---|---|
| host:[port] | The name, and optionally, the outgoing port number of the SMTP server. The port defaults to 25, if unspecified. |
| sender_id | The user ID of the person responsible for sending the email (that is, the email address that appears after From). |
| sender_email | The email address of the person whose ID you entered for the SENDER ID, in Request For Comments (RFC) 822 format. |
| username | Optional. The authentication credentials for the recipient user. If the SMTP server runs in authenticated mode and needs a valid username and password to connect to send emails, use the Audit Vault Server prompts for the password. |
Usage Notes
-
Right after you create the SMTP server configuration, it is enabled and ready to use.
-
If the SMTP server is a secure server, then run the
ALTER SYSTEM SMTP SECURE MODE ONcommand after you runREGISTER SMTP SERVER. -
To test the configuration, run the
TEST SMTP SERVERcommand. -
This command associates the sender id and sender email with this configuration data so that all generated emails are sent with this sender id and sender email.
Examples
avcli> REGISTER SMTP SERVER AT sample_mail.example.com sender id "do-not-reply";
For an SMTP server running in non-authentication mode at sample_mail.example.com, all email is generated and sent from the address: do-not-reply<donotreply@example.com>.
avcli> REGISTER SMTP SERVER AT sample_mail.example.com:455 SENDER ID av-alerts SENDER
EMAIL avalerts@example.com AUTHENTICATED BY smtpuser
For an SMTP server running in authentication mode at sample_mail.example.com, port 455; all email is generated and sent from the address: av-alerts<avalerts@example.com>. The credentials smtpuser connect to this server to send emails. The password has to be entered in the next step by following the prompt.
TEST SMTP SERVER
Use the TEST SMTP SERVER command to test the SMTP integration with Oracle Audit Vault Server by sending a test email.
The TEST SMTP SERVER command tests SMTP integration with the Audit Vault Server by sending a test email.
Syntax
TEST SMTP SERVER SEND EMAIL TO <email_address>
Arguments
| Argument | Description |
|---|---|
| email_address | Recipient of the test email notification |
Usage Notes
-
If the test fails, then check the configuration by running the
LIST ATTRIBUTE OF SMTP SERVERcommand. -
You can recreate the configuration by running the
ALTER_SMTP SERVERcommand. -
If there are no errors, a test email appears in the mail box of the user specified by the e-mail address argument.
-
You can provide a list of comma-separated email addresses to this command.
-
A SMTP Server must first be registered with the Audit Vault Server before this command can be used.
Example
avcli> TEST SMTP SERVER SEND EMAIL TO me@example.com;
To test the SMTP integration, a test email is sent to the email address, me@example.com.
avcli> TEST SMTP SERVER SEND EMAIL TO abc@example1.com,xyz@example2.com;
To test the SMTP integration, a test email is sent to the email address list, abc@example1.com,xyz@example2.com.