K2 blackpearl Product Documentation: Installation and Configuration Guide
E-mail ProtocolSetup
This topic outlines the messaging protocols which require additional setup post installation in order to be SmartActions-enabled. The Exchange Server option is omitted from this section as it is supported out of the box.
For all options supported, the K2 Server requires a unique e-mail address to be configured before the K2 installation or upgrade proceeds. If no e-mail address is available and K2 SmartActions is a requirement for installation, it is advised that the installation be postponed or the K2 SmartActions option not be installed until the e-mail address is available.

Overview to Manual E-mail Configuration

Configuring the e-mail options manually requires that connection strings are added to the K2 Server configuration file (K2hostserver.exe.config). The <connectionsStrings> section of the config file is encrypted. To edit the connection strings the user needs to delete the entire section:

Copy Delete the encrypted connection string

  <!-- Host Server DB Connection Settings -->
  <connectionStrings configProtectionProvider="K2ConfigurationKey">
    ...
  </connectionStrings>

 And replace it with a copy of the commented-out section at the bottom of the file under the text:

        **** USE THE SETTINGS BELOW TO REPLACE ENCRYPTED SECTION..
        **** CONNECTION STRINGS WILL AUTOMATICALLY BE ENCRYPTED ON STARTUP..

Copy Replace it with this section:

        <connectionStrings>
        <add name="HostserverDB" connectionString="Data Source=SERVERNAME;Initial Catalog=K2HostServer;integrated security=sspi;Pooling=True" />
        <add name="SourceCode.MessageBus.Ews.ExchangeWebServicesConnection:administrator@denallix.com" connectionString="Autodiscover={True/False};Url={EWS URL,not supported if Autodiscover is True};User ID={Login User,optional};Password={Password,optional}" />
        <add name="SourceCode.Net.Mail.SmtpConnection:administrator@denallix.com" connectionString="Host Name={SMTP Server};Port={Port;Default 25};Tls={BootTls/None};Authentication={Windows/Plain};User ID={Login User,optional};Password={Password,optional}" />
        <add name="SourceCode.Net.Mail.SmtpConnection" connectionString="Host Name={SMTP Server};Port={Port;Default 25};Tls={BootTls/None};Authentication=Anonymous" />
        </connectionStrings>

 Then the user needs to edit the section to match the local environment and restart the server to re-encrypt the connection strings section.

It is best-practice to back-up the K2hostserver.exe.config file before editing it.

Use the following guidelines for populating the connection strings manually:

EWS

Exchange Autodiscover must be set up on the domain for “Autodiscover=True” to work.

Each EWS connection is started at server boot time, it is recommended to only have one – but multiple accounts are supported. The connection string takes the format:

Copy Connection String Format

Autodiscover={True/False};Url={EWS URL,not supported if Autodiscover is True};User ID={Login User,optional};Password={Password,optional};Poll Interval={Optional, Default 30S}

Thus valid connection strings are: 

Copy Valid Connection String Examples

<connectionStrings>
    <add name="HostserverDB" connectionString="Data Source=SERVERNAME;Initial Catalog=K2HostServer;integrated security=sspi;Pooling=True" />

    <add name="SourceCode.MessageBus.Ews.ExchangeWebServicesConnection:system@k2.local" connectionString="Autodiscover={True/False};Url={EWS URL,not supported if Autodiscover is True};User ID={Login User,optional};Password={Password,optional};Poll Interval={Optional, Default 30S}" />

    <add name="SourceCode.Net.Mail.SmtpConnection:system@k2.local" connectionString="Host Name={SMTP Server};Port={Port;Default 25};Tls={BootTls/None};Authentication={Windows/Plain};User ID={Login User,optional};Password={Password,optional}" />

    <add name="SourceCode.Net.Mail.SmtpConnection" connectionString="Host Name={SMTP Server};Port={Port;Default 25};Tls={BootTls/None};Authentication=Anonymous" />
</connectionStrings>

String definitions:

 

Poll Interval: You can use S, M, H, D for the units (seconds, minutes, hours, days respectively). Remember if you manually update the connection strings you need to replace the old connectionStrings element. It is also recommend that you keep a backup of what you paste in as the section automatically gets encrypted when HostServer boots. Remember that the poll interval is also ignored if the previous check resulted in mail – it only comes into play when a check for mail returned nothing.

SMTP

SMTP accounts are discovered (using the connection string type "SourceCode.Net.Mail.SmtpConnection") when a message is sent via SMTP; if no connection string can be found for a specific address a connection string with the exact name "SourceCode.Net.Mail.SmtpConnection" is used (it is recommended that this connection string is present and anonymous). The connection strings take the format:

Copy Connection String Format

Host Name={SMTP Server};Port={Port};Tls={BootTls/None};Authentication={Windows/Plain/Anonymous};User ID={Login User};Password={Password}

Thus valid connection strings are:

Copy Valid connection string examples

<add name="SourceCode.Net.Mail.SmtpConnection" connectionString="Host Name=mail.denallix.com;Authentication=Anonymous" />

'It is recommended to have an anonymous connection string, such as this example, unless all the “”addresses that all the K2 processes use are known '(notably, mail events) –in this scenario specify a connection string for each from address.

<add name=
"SourceCode.Net.Mail.SmtpConnection:K2Service@Denallix.com" connectionString="Host Name=mail.denallix.com;Authentication=Windows" />

<add name=
"SourceCode.Net.Mail.SmtpConnection:SmartActions@Denallix.com" connectionString="Host Name=mail.denallix.com;Authentication=Plain;User ID=SmartActions;Password=K2pass" />

<add name=
"SourceCode.Net.Mail.SmtpConnection:K2Service@Denallix.com" connectionString="Host Name=mail.denallix.com;Port=567;Tls=BootTls;Authentication=Windows" />

It is recommended to use authenticated SMTP for known accounts (Authentication is not “Anonymous”) as most mail servers will not spam filter authenticated SMTP messages.

Further Notes
Remember to retain any database connection strings, for example “HostServerDB”.

 

 


K2 blackpearl Product Documentation: Installation and Configuration Guide 4.6.11