Configuring the Email Channel

This chapter provides an overview of the email channel and discusses how to:

Click to jump to parent topicUnderstanding the Email Channel

Because the email channel uses a PeopleSoft Integration Broker gateway, the email channel requires additional configuration outside of PeopleSoft MultiChannel Framework configuration pages.

PeopleSoft MultiChannel Framework (MCF) provides a framework for:

Application developers use the PeopleCode application package PT_MCF_MAIL to develop PeopleSoft Application Engine programs and PeopleSoft Pure Internet Architecture components for email processing.

See Mail Classes.

PeopleSoft MultiChannel Framework email channel features include:

Click to jump to top of pageClick to jump to parent topicHandling Email

This section describes some factors to consider when handling email using PeopleSoft MultiChannel Framework.

POP3 Versus IMAP4

Most mail servers support simultaneous client connections through both POP3 and IMAP4. Using IMAP4 for your MCF email connection provides significant benefit over using POP3. IMAP4 allows for the use of email folders, which allows malformed emails to be set aside for separate processing. Quarantining malformed emails allows system administrators to remove or correct invalid emails without interrupting normal processing.

Note. Using IMAP4 for your MCF email connection does not preclude the use of POP3 for any other client connections to your mail server.

Note. POP3 mail servers are typically read-only, which can create issues if emails are required to be deleted after being read.

Time Zone Offsets

Set the values of the email sent time zone offset (in minutes) and the receive time zone offset (in minutes) whenever possible. The default value is 800, which indicates time zone information is not available. When available, the values range from +720 to −720.

Connector Determination of Email Size

The connector sometimes cannot determine the size of the message. In such cases the size is set to 0 and an error message is written to the gateway error log.

Malformed Emails

Emails with syntax that does not comply to the latest standard definitions may not be processed successfully by MCF. MCF will return as much as possible of noncompliant emails, however, at times, invalid parts will be ignored. For example, email addresses with invalid characters will not be displayed, such as two @ symbols. Also, if the header information is not valid, such as a malformed content type, the associated email part may not appear.

A common example of a malformed email is one that contains 8-bit encoded information in a header, such as the To, Cc or Subject field, or in an attachment file name. According to the standard definitions, this information must be encoded using 7-bit encoding, as described in RFC 2045 and others. This encoding is usually done by the email sender.

Note. The PeopleSoft email reader only supports email messages that follow the SMTP specification. Many email clients and mail servers have their own proprietary formats; therefore, be aware that PeopleSoft MCF will interpret these emails according to the RFC specification. For example, some mail servers and clients allow 8-bit encoded data in email headers, which the PeopleSoft email reader does not allow.

Domain Validation

Application developers can use the method IsDomainNameValid to validate email addresses.

Note. The number of retries for domain validation is set by the parameter SMTPDNSTimeoutRetries in psappsrv.cfg.

See SMTP Settings, IsDomainNameValid.

Character Sets

If you wish to attach files which are named using characters outside of the character set recognized by your application server or process scheduler operating system, you should update the locale or regional settings of your operating system to allow those characters to be recognized.

SSL Connections

Certificates are an important component in SSL communication for authentication of any party involved. In this case one party is Email Server and another party is PeopleSoft Applications. For the communication to work, you must import CA signer of the Server Certificate installed in the Email Server to pskey peoplesoft keystore stored in the web server. The path to pskey peoplesoft keystore is defined in secureFileKeystorePath property for the Gateway Properties.

See Importing Keys and Certificates Into the Keystore.

Connect data for outgoing emails can be configured in psappsrv.cfg or provided by the application using application package PT_MCF_MAIL.

See Mail Classes.

Virus Scanning

You can enable virus scanning for inbound MCF Email attachments and outbound file attachments.

Click to jump to parent topicConfiguring PeopleSoft Integration Broker for the Email Channel

This section discusses how to:

Configure nodes and gateways for the email channel in PeopleSoft Integration Broker.

Click to jump to top of pageClick to jump to parent topicPages Used to Configure Integration Broker for Email

Page Name

Definition Name

Navigation

Usage

Node Info

IB_NODE

PeopleTools, Integration Broker, Node Definitions, Node Info

Define the MCF_GetMail node.

Connectors

IB_NODECONN

PeopleTools, Integration Broker, Node Definitions, Connectors

Define the MCF_GetMail connector.

Gateways

IB_GATEWAY

PeopleTools, Integration Broker, Gateways, Gateway ID

Set up the PeopleSoft Integration Broker gateway for the MCF_GetMail connector node.

See Also

Managing Integration Gateways

Click to jump to top of pageClick to jump to parent topicConfiguring the Gateway

Access the Gateways page using the following navigation path:

PeopleTools, Integration Broker, Gateways, Gateway ID

  1. Create a local gateway.

  2. Enter the gateway URL in the form http://<gatewayservername>/PSIGW/PeopleSoftListeningConnector, where <gatewayservername> is the fully qualified host name for the gateway machine.

    For example, http://host1.peoplesoft.com/PSIGW/PeopleSoftListeningConnector.

  3. Save the page.

  4. Click Load Gateway Connectors.

    The connector properties appear.

  5. Save the page again.

  6. Configure the GETMAILTARGET connector properties.

Click to jump to top of pageClick to jump to parent topicConfiguring GETMAILTARGET Properties

Access the Connector Properties page using the following navigation path:

PeopleTools, Integration Broker, Node Definitions, Connectors

Configure GETMAILTARGET connector properties on the MCF_GETMAIL node. You can also set threshold values for email routed to the attachment repository.

The following table lists node properties:

Property Name

Default Value

Description

MCF_AttRoot

c:\temp\att

Defines the location of the attachment repository on the gateway.

For example, if the attachment root is c:\temp\att, then attachments for emails addressed to user name support are downloaded to c:\temp\att\<mail server host name>\<mailbox>.

Note. The directory on the remote machine where the attachments are stored should be shared. The user permissions for should be stored on the node (local node) that will retrieve the attachments.

Note. The user name or mailbox portion of the attachment root path may include encoded characters.

All email attachments, and email parts not of the content types specified for the MCF_ContentTypes property, are always written to the attachment repository. A relative URL is returned to the application that allows the application to access the attachment.

The attachment retrieval depends on the file system of the operating system. For Windows NTFS/FAT 16 file system, the folder length or maximum characters of the file extension is 256/512. For Unix and Solaris UFS file system, the length is 256.

Attachment security is managed at a user and role level using the PT_MCF_EMAIL application package.

Users can configure attachment folder paths using metastrings to enable multiple folders based on several variables:

  • %OPRID%: PeopleSoft user ID.

  • %DBNAME%: database name.

  • %CURRDATE%: current date.

  • %CURRHOUR%: current hour.

MCF_AttServ


http://<machine_name>.<domain_name>/PSAttachServlet/ps/

Defines the location of the MCF attachment repository servlet, located on the gateway web server.

Attachment relative URLs are appended to this address to create a fully qualified URL to reference an attachment in the repository.

Note. When you are setting a remote gateway to access email attachments stored on the remote machine, the database that the gateway/psattachservlet accesses should have the permissions to view the attachments.

Note. If your web server is installed with a PeopleSoft Pure Internet Architecture site name other than ps, include the site name in the specified path.

MCF_ClientCertAlias

ClientCert

Provide the alias of the certificate in pskey.

Note. The client certificate must be imported in pskey.

See Generating Private and Public Key Pairs.

MCF_ClientCertPass

password

Enter the password for the certificate.

Note. The alias and the password must match the alias and password of the imported certificate in pskey keystore.

MCF_ContentTypes

text/plain

Specifies email content types that will be stored in the database. Content types not specified will be stored as attachments. Enter content types separated by commas.

For example, you can Enter text/html and text/xml to enable storage in the database of HTML email and email containing XML.

The content type text/plain is always stored in the database, regardless of values specified for MCF_ContentTypes.

Do not include binary encoded content types in the content types list unless the application can handle base64 encoded text.

MCF_Count

0

Defines the default number of emails retrieved from the mail server unless otherwise specified in the SyncRequest.

The PeopleSoft MultiChannel Framework email application package always specifies the number of emails to be retrieved and does not reference this property.

MCF_EmSz_Conn

4000000

Defines the connector threshold, in bytes.

This parameter ensures that emails retrieved from a POP3 mail server do not exceed the available memory on the gateway server. Email content retrieved from IMAP4 servers can be streamed to a file on the attachment repository, but content retrieved from POP3 servers must first be read into memory before being written to a file. Therefore, the MCF_EmSz_Conn threshold can be set very high for IMAP4 mail servers.

PeopleSoft MultiChannel Framework does not process an email if its size is greater than this value. The status returned to the application is 1. The triggering email is neither downloaded nor deleted from the mail server. Only the email header is returned to the application.

See Mail Classes.

MCF_EmSz_IB

500000

Defines the PeopleSoft Integration Broker threshold, in bytes.

This is the maximum size message that the GETMAILTARGET connector can send through PeopleSoft Integration Broker. The purpose of this threshold is to ensure that retrieved emails do not exceed the available memory on the gateway server and that the server running the application that requested the emails.

A PeopleSoft Integration Broker message can contain one or more emails, depending on the number of emails the application retrieves per message. As soon as this threshold is reached, the remainder of the triggering email is written to the repository, and no more emails are retrieved. Emails fetched prior to the triggering email are returned normally. The triggering email is returned with a return status of 2, indicating that some of its parts were written to the repository.

See Mail Classes.

MCF_EmSz_Part

30000

Defines the text part threshold, in bytes.

If any text part of an email exceeds this value , the part is routed to the attachment repository. This ensures that excessively large objects of text are not written to the database.

For databases with limitations on the maximum size of rows or long text field lengths, this value must be lower than that limit to avoid SQL errors when saving emails.

MCF_Email_Lang_CD

ENG

Defines the expected language of emails downloaded by this node.

This code is included in the email header returned to the application. Configure a node for each language you expect to handle, because Simple Mail Transfer Protocol (SMTP) mail servers and clients do not guarantee correct identification of the email's language when creating an email.

MCF_FetchSize

819200

Determines the number of bytes retrieved for an IMAP email in a single fetch. It also controls the size of the buffer ( in bytes) used to write email attachments to the repository.

Setting MCF_FetchSize to a higher number uses more memory, but it may also increase the speed of download for larger emails and attachments.

MCF_Force_Download_Attachments

False

Enables downloading attachments that might otherwise be interpreted as text. If set to True all attachments, including text/plain, irrespective of their size, are downloaded to the attachment repository. This property enables reading of non-ASCII attachments.

MCF_MethodName

MessageCount

Defines the methods associated with the application class package.

The defined method is the default method used unless otherwise specified in the SyncRequest. The email application package always specifies the method to be used and does not reference this property.

See Mail Classes.

MCF_Password

None

Defines the default password for the mailbox unless otherwise specified in the SyncRequest.

See Mail Classes.

MCF_Port

143

Defines the mail server port to be used.

By default, POP3 servers use port 110 and IMAP4 servers use port 143. Confirm the port number with your system administrator and set it accordingly here.

MCF_Protocol

IMAP4

Defines the protocol used by the connector to access emails on the mail server.

Supported values are POP3 or IMAP4.

MCF_Quarantine

Quarantine

Defines a quarantine folder for email meeting the following criteria:

  • Connector size overflow.

  • Unsupported encoding.

  • Unknown Java exception.

  • JavaMail content error.

  • No attachment repository.

  • Mail parse exception.

The quarantine folder is created for each user account and must be managed by each email user, not by system administrators.

Note. Folders are supported only on IMAP4 mail servers.

MCF_Server

None

Defines the fully qualified host name of the mail server.

This is the default fully qualified host name of the mail server, unless otherwise specified in the SyncRequest. For example, bigserver.peoplesoft.com.

See Mail Classes.

MCF_User

None

Defines the user name for the email account (mailbox) being accessed.

This is the default user name used unless otherwise specified in the SyncRequest.

For example, if emails are addressed to support@peoplesoft.com, the user name is support.

MCF_UseSSL

N

Indicates if an SSL connection will be attempted. If set to Y, an SSL connection will be attempted. MCF_Port and MCF_Protocol will be used as port and protocol for making the SSL connection.

A value of N indicates a Non SSL connection.

Note. The POP3 and IMAP4 email protocols calculate message size differently. POP3 does not include header size, but IMAP4 does. As a result, message sizes affecting thresholds behave differently depending on the protocol used.

Multipurpose Internet Mail Extensions (MIME), is an Internet standard for representing multipart and multimedia data in email so that they can be exchanged between different email systems. The parts may be nested. PeopleSoft embeds the Sun JavaMail API to implement support for the MIME standard. However, all parts of an email are represented in PeopleSoft as level 1 rowsets, regardless of whatever hierarchy existed in the original email. Email clients determine the MIME format of the emails sent from them, so identical email content sent from different email clients may have a different MIME structures.

Click to jump to parent topicEnabling Virus Scanning

This section discusses how:

Click to jump to top of pageClick to jump to parent topicLocating virusscan.xml File for Your Web Server

Virus scanning can be enabled for inbound MCF Email and AddAttachment, by configuring the virusscan.xml file for your virus scan engine. The location of this file depends on your web server:

See Continue, ConvertChar.

Click to jump to top of pageClick to jump to parent topicConfiguring the virusscan.xml File

To enable the virus scanning feature:

  1. Open VirusScan.xml.

    <?xml version="1.0" encoding="UTF-8"?> <Providers disableAll="True" logFile="./servers/PIA/logs/VirusScan%u.log"> <!-- Sample Configuration for Symantec Engine <Provider> <name>Symantec</name> <class>psft.pt8.virusscan.provider.GenericVirusScanProviderImpl</class> <icapversion>ICAP/1.0</icapversion> <service-name>/SYMCScanResp-AV</service-name> <policycommand>?action=SCAN</policycommand> <address>152.68.144.44</address> <port>1344</port> <disable>false</disable> </Provider>--> <!-- Configure your own proivider --> <Provider> <!-- Provider Name of the Scan Engine --> <name></name> <!-- Provider Class of the Scan Engine. psft.pt8.virusscan.provider.GenericVirusScanProviderImpl is the default provider class. --> <class>psft.pt8.virusscan.provider.GenericVirusScanProviderImpl</class> <!-- ICAP version --> <icapversion>ICAP/1.0</icapversion> <!-- ICAP ServiceName. The Service Name changes from Scan Engine to Scan Engine. This is the name Scan Engine Service is will be hosted with --> <service-name></service-name> <!-- RESPMOD extra commands, These are the RESPMOD commands (SEE ICAP Protocol). Usually these commands will be chainging from Engine to Engine --> <policycommand></policycommand> <!-- IP Address of Scan Engine host> --> <address></address> <!-- IP Port of Scan Engine host --> <port></port> <!-- Disable scanning for this provider --> <disable></disable> <!-- Default codes = 200 and 204 for clean, 201,403 for infected Use these tags to change the behaivior if needed <clean>200,204</clean> <infected>201,403</infected> --> </Provider> </Providers>

    Note. A sample configuration for Symantec Engine is provided in the remarks.

  2. In the Providers tag, set the attribute disableAll to False .

    <Providers disableAll="False" logFile="./servers/PIA/logs/VirusScan%u.log">

  3. Multiple scan engine can be configured under <Providers>. Each <Provider> tag represents one scan engine. All configured scan engines will check for viruses. For each <Provider> tag enter values for the tags:

    Tag

    Description

    Example Value for Scan Engine

    <name>

    Provider Name of the Scan Engine

    Symantec

    <class>

    Provider Class of the Scan Engine

    Default provider class is:

    psft.pt8.virusscan.provider.⇒ GenericVirusScanProviderImpl

    psft.pt8.virusscan.provider.⇒ GenericVirusScanProviderImpl

    <icapversion>

    ICAP version

    ICAP/1.0

    <service-name>

    Service name for the scan engine host.

    /SYMCScanResp-AV

    <policycommand>

    Policy command used by the Scan Engine. Only SCAN is supported.

    ?action=SCAN

    <address>

    IP address of Scan Engine host.

    IP address of the machine where the scan engine is running

    <port>

    IP port of Scan Engine host.

    Port where the scan engine is running

    <disable>

    Disable scanning for this provider.

    false

    <clean>

    Default codes = 200 and 204 for clean.

    You can use this tag to change the behavior if needed.

    200,204

    <infected>

    Default codes = 201 and 403 for infected

    You can use this tag to change the behavior if needed.

    201,403

Click to jump to top of pageClick to jump to parent topicUsing Virus Scan Error Logs

There are two type of logs generated virus scanning logs and error logs.

Virus Scanning Logs

Virus Scanning logs are the only interface with the scanning engine. These logs are located in the path indicated by the logfile property in VirusScanning.xml. If there is a failure, the details will be logged ig.errorLog.filename in integrationGateway.properties

Error Logs

If there is a failure, the details will be logged ig.errorLog.filename in integrationGateway.properties For example, ig.errorLog.filename in <PIA_HOME>/webserv/<domain>/applications /peoplesoft/PSIGW.war/WEB-INF/integrationGateway.properties.

The return value when the virus scan for mail attachments is REPOSITORY_FAILURE = 8.

See Error Messages Returned by MCFGetMail Class Methods.

If there are any errors during file processing the error codes listed in this table will be generated.

Error Code

Description

%Attachment_ViolationFound

File violation detected by Virus scan engine.

%Attachment_VirusScanError

Virus scan engine error.

%Attachment_VirusConfigError

Virus scan engine configuration error.

%Attachment_VirusConnectError

Virus Scan engine connection error.

Click to jump to parent topicDemonstrating the Email Channel

To demonstrate the email channel, use the Email Sample Pages (MCFEM_DEMOERMS_CMP) component.

This section discusses how to:

The PeopleSoft system provides email sample pages to demonstrate the functionality of the PT_MCF_MAIL application package.

Note. The email sample pages are not intended for any purpose other than demonstration and troubleshooting. They should not be used in production.

The email sample pages can be also used to test the configuration of your integration gateway and MCF_GETMAIL node.

Note. Using the email sample pages requires access to a mail server.

Click to jump to top of pageClick to jump to parent topicPages Used to Demonstrate the Email Channel

Page Name

Definition Name

Navigation

Usage

GetMail - Server

MCFGETMAIL_PG

PeopleTools, MultiChannel Framework, Email, Sample Pages, GetMail - Server

Demonstrate GetMail functionality.

MailStore - DB

MCFMAILSTORE_PG

PeopleTools, MultiChannel Framework, Email, Samples Pages, MailStore - DB

Demonstrate MailStore functionality.

Click to jump to top of pageClick to jump to parent topicUsing the GetMail - Server Page

Access the GetMail - Server page using the following navigation path:

PeopleTools, MultiChannel Framework, Email, Sample Pages, GetMail - Server

This page demonstrates reading or deleting emails from the mail server. It also demonstrates the storage and retrieval of emails to and from the database tables. Output of the response to each of the requests is written to a file at %PS_SERVDIR%/files/mcfdata.out on the application server. Check this file after each test for the output data.

To demonstrate email functionality, send an email to the user name and server that you enter on the GetMail - Server page.

Username and Password

Enter a valid username and password for an account on the mail server.

Server

Enter the mail server.

IB Nodename (Integration Broker node name)

Enter the PeopleSoft Integration Broker node used to access email from the mail server.

The default is MCF_GETMAIL

Use Rowset API

Select to use the rowset-based GetMail API.

Deselect to use the new Mail Classes API.

Read Headers

Select a method to be called from the drop-down list box, then click Fetch. Select from:

Message Count:

Writes the number of emails in the specified mailbox to the output file mcfdata.out.

ReadHeadersWithAttach:

Writes headers and attachment information for all emails in the specified mailbox to the output file mcfdata.out.

Read Emails

Enter the number of emails to read, select other parameters, then click Fetch to read emails.

Emails to Read

Enter the number of emails to retrieve from the specified mailbox and write to the output file mcfdata.out.

Write to Database

Select to have the retrieved emails written to the database as well as to the output file mcfdata.out.

Remove from Mail Server

Select to delete emails from the mail server after they have been retrieved .

Access an Email

Enter an email UID list, select a method from the drop-down list box, and then click Fetch to access the selected emails.

UID List (unique identifier list)

Enter the unique ID of an email to be retrieved or deleted. To delete, you can enter a comma-delimited list of unique email IDs (UID) to be deleted.

Each email has a unique number (the UID) associated with it that is permanently guaranteed not to refer to any other email in the mailbox. To find the UID of an email, run the ReadHeadersWith Attach option first, which returns the UID for each email. If an invalid UID is specified, one empty row is returned.

Read Email w/ attachment

Retrieves the specified email from the specified mailbox and writes it to the output file mcfdata.out.

Remove Message

Deletes the specified email from the specified mailbox.

Create IMAP Folder

Create an email folder; only valid for IMAP4 mail servers.

Folder Name

Enter the name of the folder to create.

Click to jump to top of pageClick to jump to parent topicUsing the MailStore - DB Page

Access the MailStore - DB page using the following navigation path:

PeopleTools, MultiChannel Framework, Email, Samples Pages, MailStore - DB

View an example of how to access emails from the database (how to retrieve and delete email) and how to authorize email attachments for viewing or deletion using the PT_MCF_MAIL application package provided with PeopleSoft MCF.

Email ID

Enter the PeopleSoft email ID (not to be confused with the UID) with which the email was saved to the database.

Emails from Database

Enter an email ID, select an action from the drop-down list box, and then click Execute to perform the selected action.

Delete Email from Database

Deletes the specified email from the database and any corresponding attachments from the repository.

Retrieve Email

Retrieves the specified email from the database and writes it to the output file mcfdata.out.

Force Delete

Select after entering Delete Email from Database to force the deletion even if an error occurs when deleting associated attachments from the repository.

Use Rowset API

Select to use the rowset-based GetMail API.

Deselect to use the new Mail Classes API.

Authorize Email

Enter an email ID, a user role or name, and click Authorize or Unauthorize to perform the specified action.

Email ID

Enter the PeopleSoft email ID (not to be confused with the UID) with which the email was saved to the database.

User/Role Name

Enter a PeopleSoft user ID or role to be authorized or unauthorized to view the attachment associated with the selected email.

After entering an ID or role, select User or Role, as appropriate, from the drop-down list box.

See Also

Using the Email Sample Page