- 1 .NET
- 2 Microsoft Visual Studio Express 2012
- 3 Configuration Settings
- 4 Set “ClearCategories” "ClearCategories" to false
- 5 Basic Installation Steps
- 6 Detailed Installation Steps (Optional, use when needed)
- 7 Agent Logs:
- 8 Troubleshooting
- 9 Agent Logs
- 10 Agent Functioning
- 11 Message Deliver
- 12 Exchange Logs/tools
The Microsoft Exchange Email Server Plugin can be configured to automatically save the organization's incoming and outgoing emails to Patricia. This will occur where a valid case reference is found in the subject line, and/or within the first 4 lines of the email content. Once a valid case reference has been located the email is automatically saved to Patricia. For emails being received directly into an inbox within the organization, a color-coded category can be set and automatically applied to all emails that have been saved to Patricia. An example is provided in the screen shot below:
...
Software on Development Machine
Anchor | ||||
---|---|---|---|---|
|
- Exchange 2010 requires .NET 3.5 to be installed (blog article: how to install .NET 3.5 on WinServer 2008R2).
- Exchange 2013 requires .NET 4.5 to be installed.
Anchor | ||||
---|---|---|---|---|
|
Download Microsoft Visual Studio Express 2012 from http://www.microsoft.com/en-us/download/details.aspx?id=34673 (select file "wdexpress_full.exe" to download)
...
When using PowerShell or Exchange Management Shell, please always run it as administrator. Otherwise, there will be permission issues.
Anchor 3 3
Configuration Settings
3 | |
3 |
Name | Description | Default Value |
---|---|---|
CategoryValue | Value that the category header should be set to. | Default value is “Saved” |
CreateEML | Indicates whether an EML file has to be written out. The file will be saved in the same location as the dll. | Default value is false. |
IncludeCaseRefsInHeader | If this property is true, case references will be included in header, and in Outlook user may see multiple tags of case references in addition to the tag "Saved". If it is set to false, then only "Saved" tag will be shown in user's Outlook. | Default value is true. |
SavedDateHeaderName | The header that is stamped to indicate the date it was processed. | Default value is “X-Pi-Saved-Date” |
SavedListHeaderName | The header that is stamped to indicate the case reference list it was saved. | Default value is “X-Pi-Saved-List” |
ServiceAddress | REST service address where the mime data is sent. | No default value. Mandatory field and the value has to be specified. |
SubjectPrefix | Prefix that the subject has to be prefixed with. | Default is null, meaning it is not prefixed with anything. |
WebProxyAddress | Proxy address. Can be used for debugging with fiddler. | Default is null meaning no proxy used. |
Anchor 4 4
Set “ClearCategories” to false
4 | |
4 |
Keywords (also known as Categories) are stripped from the message by default. This can be disabled using the "Set-TransportConfig –ClearCategories $false" cmdlet.
...
Otherwise, the category will not be shown in Outlook.
Anchor 5 5
Basic Installation Steps
5 | |
5 |
- Get the latest source code and re-compile again the correct version of Exchange Servers dlls and .NET framework. Example files can be downloaded from here: ex2010-release-20140606.zip (for Exchange Server 2010) or ex2013-release-20140605.zip (for Exchange Server 2013)
- Create a folder to store the plugin DLL and XML files on the hub server. Eg: C:\TransportAgents (Please just use this one if possible)
- Set config files. Set username/password in MailAgent.cs. Make sure this user has unrestricted access rights to the Patricia documents drive.
- Unpack it to: C:\ex2010-release-20140605\
- Copy all DLL and XML files extracted to to the newly created folder, including:
- log4net.dll
- log4net.xml
- PI.PiNuxeoAgent.dll
- PiNuxeoAgentConfig.xml
- Run a new 'Exchange Management Shell' as Administrator (close all opened 'Exchange Management Shell' windows)
- Change the current directory to C:\ex2010-release-20140605\
- Run command: .\InstallAgentExch2010.ps1
Anchor 6 6
Detailed Installation Steps (Optional, use when needed)
6 | |
6 |
Installation of the Transport Agent involves the following:
...
-folder is the folder where the transport agent dll is.
-mail is the mail address where the test mail is being sent to.
-server is the server that SMTP server for sending the mail
Anchor 7 7
Agent Logs:
7 | |
7 |
Logging is done through Log4Net. See the following notes on logging:
...
- Logs are written to the same folder as the all.
- The files are written to the same directory as the dll.
- The file is saved as _MailAgent.log.
- File is rolled over after every 1 GB.
- Last 10 files are maintained.
- Logs can be configured to multiple levels - Info, Debug, Error. Info is the default level.
Anchor 8 8
Troubleshooting
8 | |
8 |
Some of the issues that may occur are (not necessarily because of the agent, but quite often because of Exchange’s interaction with agent, clashes with other agents, some exchange settings etc)
...
1. Open Exchange management command shell.
2. Run the command Get-TransportAgent and confirm that PiNuxeo agent is installed and enabled.
Anchor 8.1 8.1
Issue of digitally signing
8.1 | |
8.1 |
If you got this message:
Code Block | ||
---|---|---|
| ||
File C:\ex2010-release-20140605\InstallAgentExch2010.ps1 cannot be loaded. The file C:\ex2010-release-20140605\InstallA gentExch2010.ps1 is not digitally signed. The script will not execute on the system. Please see "get-help about_signing " for more details.. At line:1 char:27 + .\InstallAgentExch2010.ps1 <<<< + CategoryInfo : NotSpecified: (:) [], PSSecurityException + FullyQualifiedErrorId : RuntimeException |
...
Code Block | ||
---|---|---|
| ||
Set-ExecutionPolicy Restricted |
Anchor 8.2 8.2
Issue of access denied
8.2 | |
8.2 |
If you got this message:
Code Block | ||
---|---|---|
| ||
Could not load file or assembly 'file:///C:\TransportAgents\PI.PiNuxeoAgent.dll' or one of its dependencies. Access is denied. + CategoryInfo : InvalidArgument: (:) [Install-TransportAgent], FileLoadException + FullyQualifiedErrorId : 3A3ADC09,Microsoft.Exchange.Management.AgentTasks.InstallTransportAgent Transport agent "PiNuxeoAgent" isn't found. Parameter name: Identity + CategoryInfo : InvalidArgument: (:) [Enable-TransportAgent], ArgumentException + FullyQualifiedErrorId : 78732C6B,Microsoft.Exchange.Management.AgentTasks.EnableTransportAgent |
...
2) We need to restart the IIS using iisreset command. For more information please see the references.
References:
Anchor 9 9
Agent Logs
9 | |
9 |
If the agent is running, turn on the debug flag in the pinuxeoagentconfig.xml file and restart transport service
<root>
<level value="All"/>
<appender-ref ref="RollingFileAppender"/>
</root>
Set the level flag to all as above. This turns on all levels of logging.
Agent logs can be found at the same location as the dll. If the debug level is on, it adds detailed trace info to the file which can be used in troubleshooting.
Anchor 10 10
Agent Functioning
10 | |
10 |
In case of error or an exception, details along with where the exception occurred can be found in the log file.
Anchor 11 11
Message Deliver
11 | |
11 |
Each message has the following entries at the start and end and a few in between. If the two entries are present, the message is correctly picked up and processed with the agent and any issue with the message delivery has occurred after the agent processed.
ProcessMessage(): Start <Message subject>
ProcessMessage(): End<Message subject>
Anchor 12 12
Exchange Logs/tools
12 | |
12 |
If there was an issue with message delivery and the agent logs indicated successful processing by the agent, certain exchange tools and utilities can be used to further diagnose the issue. Some of them are listed here, but an exchange administration is needed to run and analyze these issues. This is beyond the scope of this document.
...