Version Affected: All
Overview
This article explains how to enable extended SMTP logging for a realm, using .NET trace logging to capture the actual SMTP commands and server responses. This is useful when an SMTP session throws an exception with no further detail, such as OTPHtmlEmailProvider.Send, Exception: Failure sending mail.
- In the Admin Console, click the SecureAuth logo, then go to Tools → Decrypt Web Config, as shown below, and select the realm to decrypt.
- Go to the realm's folder (for example,
D:\SecureAuth\SecureAuth<realm>) and make a backup copy of web.config. - Edit web.config in a text editor and insert the following immediately above the closing
</configuration>tag at the end of the file:
<system.diagnostics>
<sources>
<source name="System.Net">
<listeners>
<add name="TraceFile"/>
</listeners>
</source>
<source name="System.Net.Sockets">
<listeners>
<add name="TraceFile"/>
</listeners>
</source>
</sources>
<sharedListeners>
<add
name="TraceFile"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="System.net.trace.log"
/>
</sharedListeners>
<switches>
<add name="System.Net" value="Verbose"/>
<add name="System.Net.Sockets" value="Verbose"/>
</switches>
<trace autoflush="true" />
</system.diagnostics>- Save web.config, then re-encrypt it from the Admin Console.
- Send a test email from the realm. If logging is working, a new file named System.net.trace.log is created in the realm's folder.
.NET trace logging produces substantial log file sizes. Revert this change once debugging is complete.
SecureAuth Knowledge Base Articles provide information based on specific use cases and may not apply to all appliances or configurations. Be advised that these instructions could cause harm to the environment if not followed correctly or if they do not apply to the current use case.
Customers are responsible for their own due diligence prior to utilizing this information and agree that SecureAuth is not liable for any issues caused by misconfiguration directly or indirectly related to SecureAuth products.
Comments
Please sign in to leave a comment.