You can create a policy that the EmailInput node
or message flow refers to at run time for email server connection information, instead of defining
the connection properties on the node or the message flow. The advantage being that you can change
the host name and security identity values without needing to redeploy your message
flow.
About this task
Use the Email Server policy to change the email server connection information for the EmailInput node.
Procedure
-
Use the Policy editor in the IBM® App Connect
Enterprise Toolkit to create a policy and
select Email Server as the policy type (see Creating policies with the IBM App Connect Enterprise Toolkit).
-
Ensure that the name of the policy is the same as the name that is specified by the
Email server property on the EmailInput
node.
-
Set the Email server name property in the policy to the URL of the email
server that contains incoming email messages.
The URL must be in the format
protocol://hostname:port, where:
- protocol can be pop3, pop3s,
imap, or imops.
- hostname is the Internet Protocol version 4 (IPv4) TCP/IP address or
DNS-resolvable host name of the email host.
- port is the port number that the email server is listening on for
connections over Post Office Protocol 3 (POP3) or Internet Message Access Protocol (IMAP). You can
enter an integer in the range 1 - 65535.
-
Set the Security identity (DSN) property in the policy to the name of the
security identity object that is used to authenticate the connection to the email server.
If you plan to authenticate with the email server by using a userid and password, you
can choose to define the security identity by using either the
mqsicredentials command or the
mqsisetdbparms command.
If you are intending to use the OAuth (Open
Authorization) standard, you must use the mqsicredentials
command to provide a userid and access token.
-
Set the timeout properties in the policy file to avoid hangs due to socket wait calls. For
example:
- Set Connection timeout (seconds) to 5.
- Set Read timeout (seconds) to 5.
- Set Connection idle timeout (seconds) to 300.
-
Deploy this policy before you start the associated message flow.