Skip to main content

LevelBlue Named Official Cybersecurity Advisor of the PGA of America. Learn more

LevelBlue Named Official Cybersecurity Advisor of the PGA of America. Learn more

Services
Cyber Advisory
Managed Cloud Security
Data Security
Managed Detection & Response
Email Security
Managed Network Infrastructure Security
Exposure Management
Security Operations Platforms
Incident Readiness & Response
SpiderLabs Threat Intelligence
Solutions
BY TOPIC
Offensive Security
Solutions to maximize your security ROI
Operational Technology
End-to-end OT security
Microsoft
Unlock the full power of Microsoft Security
Securing the IoT Landscape
Test, monitor and secure network objects
Why LevelBlue
About Us
Awards and Accolades
LevelBlue SpiderLabs
PGA of America Partnership
Secure What's Next
LevelBlue Security Operations Platforms
Security Colony
Partners
Microsoft
Unlock the full power of Microsoft Security
Technology Alliance Partners
Key alliances who align and support our ecosystem of security offerings
Loading...
Loading...

HOWTO: How do I use External Commands?

Expand / Collapse


This article applies to:

  • MailMarshal (SEG)
  • MailMarshal ECM/MailMarshal Exchange

Question:

  • How do I use External Commands?

Procedure:

MailMarshal can call on external commands when processing email. There are two ways in which MailMarshal can use external commands.
  • As a basic trigger (rule condition), to initiate an external command when a rule is triggered.
  • MailMarshal activates a command and, depending on the error code returned, a rule is triggered (rule action).
For details of the procedures, see Help for your product version.

Why would I need External Commands?

You may want to write your own custom scripts that can perform processing on the email as it passes through MailMarshal. This would generally be done if the functionality you require is not included in MailMarshal.

Using MailMarshal to trigger an external command

First decide what external command you want to run. This could require you to write a custom DOS batch file, VBS or Java Script. The external command could also be a program file supplied by LevelBlue and specifically designed to supplement the capabilities of MailMarshal (such as the Message Release command).

Create a new external command

Expand the menu tree Policy Elements | External Commands, and add a new External Command.  Enter the path to the command. This path must be available on all processing servers.  If you want to pass parameters to the external program the enter them in the Parameter field. 

Now set up a new rule to trigger the external command. For example, a rule could look like this:

When a message arrives

Where message size is greater than 3000KB

Run the External Command MyExternalCmd

And pass the message to next rule for processing.

In this instance, whenever a message larger that 3000KB is received, the external command that you have set up (called MyExternalCmd) is run.

MailMarshal can make a decision based on the result of an External Command

The external command executable should have the capability to return an error code when run. Create your External Command as above. Edit the properties of the External Command to trigger on whatever error level is required e.g. "Command is triggered if error code is greater than zero"

Now set up a new rule which is to be triggered by the external command. For example, a rule could look like this:

When a message arrives

Where Addressed to IT_Group

And where the external command MYExternalCmd is triggered

Move the message to Quarantine.

 

In this instance, whenever a message arrives for IT_Group, the external command that you have set up (called MyExternalCmd) is run. If it returns an error code greater than zero (or whatever you have set the trigger level to), the rule is triggered.

This article was previously published as:
NETIQKB29136
Marshal KB86

To contact LevelBlue about this article or to request support:


Rate this Article:
     

Add Your Comments


Comment submission is disabled for anonymous users.
Please send feedback to Trustwave Technical Support or the Webmaster
.