The EmailRelay application on a non-replicated Rational® ClearQuest® database with multiple Rational® ClearQuest® databases

In this scenario, two or more Rational® ClearQuest® databases are configured for use with the EmailRelay application in a non-replicated environment.

There is a separate <repository> XML block in the cqemailrelay_cfg.xml file for each Rational® ClearQuest® database that you plan to enable the EmailRelay application on. When the EmailRelay application is configured to run in PostOffice Relay mode, it uses the <repository> XML block to determine how to communicate with the Rational® ClearQuest® Web server. If more than one <repository> XML block exists, EmailPlus cycles through each block, polling the Rational® ClearQuest® database for new EmailPlus records to send.

When the EmailRelay application is configured to run in SMTP Relay mode, the <repository> XML block is ignored. The EmailPlus package of each database must be configured to use the same port that EmailRelay is listening on.
Important: Use the same value for -relaycfgdir. Otherwise, a new cqemailrelay_cfg.xml file will be created that only contains configuration parameters for the new database.

In the following example, there are two Rational® ClearQuest® databases: one called SAMPL, and the other called TEST. To setup and configure the EmailRelay application for both databases, run the cqemailrelay.pl Perl script twice, changing -dbset, -userdb -username, -password, and -serverurl values to be specific to your additional user database.

First, you setup the EmailRelay application for the SAMPL database.
cqperl cqemailrelay.pl -dbset EmailPlus -userdb SAMPL -username admin -password secret -serverurl https://cqweb.server.com/cqweb/oslc/ -relaycfgdir C:\EmailRelay -smtpserver smtp.your.org.com -smtpport 465 -smtpuser cq.emailrelay@your.org.com -smtppassword secret -mode postoffice
Next, you setup the EmailRelay application for the TEST database.
cqperl cqemailrelay.pl -dbset EmailPlus -userdb TEST -username admin -password secret -serverurl https://cqweb.server.com/cqweb/oslc/ -relaycfgdir C:\EmailRelay -smtpserver smtp.your.org.com -smtpport 465 -smtpuser cq.emailrelay@your.org.com -smtppassword secret -mode postoffice
Note: If you are setting up the EmailRelay application in SMTP Relay mode, you have to run the cqemailrealy.pl script only once.
Note: Because there is one EmailRelay server for each Web deployment, you cannot configure some of your databases to use PostOffice Relay mode and others to use SMTP Relay mode.