Open Email Relay Prevention Configuration
KB003668
PRODUCTIntroduction
An open email relay risk was identified in the Send an e-mail rule action in SmartForms, which allows SmartForms runtime users to alter the From and To addresses in views and forms that use the action. In this article you will find guidance on best practices when using the send email function.
The preferred method of sending an email in a solution is to use the workflow Send Email step because the workflow loads the email addresses from Workflow Context fields and SmartObjects that are loaded server side which can’t be tampered with.
If you prefer using the Send an e-mail rule action in SmartForms, you can now configure the SmartForms web.config file to minimize the security risk of open email relay.
Use the guidance below to configure the SmartForms web.config file to prevent open email relay. If you use the Send an e-mail rule action in SmartForms and you don’t configure these settings, your solution is still at risk of open email relay.
Configure security settings
To minimize the risk of open email relay, you can configure one of the settings below. Add the preferred setting to the node in the Web.config files in the following locations:
"%ProgramFiles%K2K2 smartforms DesignerWeb.config"
"%ProgramFiles%K2K2 smartforms RuntimeWeb.config"
- We suggest you close and reopen your web browser after saving the configuration in the Web.config files to allow the application of your changes to your browser.
Setting | Example | Description |
Enforce the From Address | <add key="Forms.AppFramework.SendMail.EnforceFromAddress" value="true" /> | Checks the From Address at runtime:
|
Disable Send an e-mail rule action | <add key="Forms.AppFramework.SendMail.Disabled" value="true" /> | Disables the Send an e-mail rule action:
|
Enable logging and tracing
If you want to monitor the logs for events regarding these security settings, you can follow the steps below to enable logging and tracing.
- Create a debug folder called Debug here: "C:Debug”, and assign write permissions to the Application Pool Account on this folder.
- Edit the SmartForms Web.config file found here: "%ProgramFiles%K2K2 smartforms RuntimeWeb.config".
- Under <appSettings>, change the following values:
Setting New value Forms.Global.ErrorLogging.Enabled true Forms.Global.ErrorLogging.FirstChangeExceptions.Enabled true (uncomment the attribute) "TraceFilter" value="FormRuntime,Performance,PerformanceSummary" Uncomment the attribute - Under <system.diagnostics>, change the following values:
Setting New value EnableTracing true MessageTypeToTrace 4 (this can also be 3)