ServiceDesk Plus オンプレミス版 ナレッジベース

受信メールサーバ接続/メール送受信のタイムアウト値の設定手順 (R8.0)


本手順はServiceDesk Plus 8.0が対象です。

ServiceDesk Plus 8.1以降のビルドをご利用の場合は、こちらのページの手順をご参照ください。


本ソリューションナレッジでは、
受信メールサーバ接続のタイムアウト値、メール送受信のタイムアウト値を設定する手順をご案内します。

=================
タイムアウト値を設定しない場合、メールサーバへの接続およびメール送受信において接続が途絶え、
メール受信のためのスレッドが立ち上がったままとなり、結果的に、メール受信が停止する場合がございます。
その際、アプリケーションの再起動が必要になり、また、メール受信が停止した場合のアプリケーションからのメッセージも
送信されません。
=================

デフォルトではタイムアウト値が無制限ですが、こちらの手順実施により、 
受信メールサーバへの接続タイムアウト値を90秒に、
メール送受信のタイムアウト値を60秒に設定します。

応答待ちの状態が指定した秒数を経過すると、 タイムアウトによりメール受信スレッドを終了し、
設定間隔により、 次のメール受信スレッドを自動的に起動します。 
下記手順では、データベースに直接接続してレコードを挿入しますので、 
念のため、事前に直近のバックアップファイルのご取得をお願いいたします。 

1. ServiceDesk Plus のバックアップファイルを取得 
2. ServiceDesk Plus を停止 
3. 以下手順で、MySQL DB を開始 

[1] コマンドプロンプトを開く 
[2] [ServiceDeskホーム]bin ディレクトリに移動 
[3] 以下を実行 

cmd>startDB.bat 

4. 以下手順でMySQL DB に接続し、Updateクエリ文を実行 

[1] [ServiceDeskホーム]mysqlbin ディレクトリに移動 
[2] 以下によりDBへ接続 

cmd>mysql.exe -u root -P 33366 servicedesk 

[3] ログインに成功したら、以下を実行(2つのUPDATE文を実行します。IMAP or POP3のどちらかのクエリを選択してください)

<3-1>

[IMAP]
mysql>insert into mailproperties values (5,'imap','mail.imap.connectiontimeout','90000','This property is to set the socket connection timeout. If this property is not set, default is infinite timeout. Specify the time in milliseconds. ',1); 

[POP3]
mysql>insert into mailproperties values (5,'pop3','mail.pop3.connectiontimeout','90000','This property is to set the socket connection timeout. If this property is not set, default is infinite timeout. Specify the time in milliseconds. ',1); 

* 実行後、以下のように表示されます。 
Query OK, 1 row affected 

<3-2>

[IMAP]
mysql>INSERT INTO mailproperties VALUES ( 6,'imap','mail.imap.timeout','60000','This property is to set the Socket I/O timeout. If this property is not set, default is infinite timeout. Specify the time in milliseconds. ',1);

[POP3]
mysql>INSERT INTO mailproperties VALUES ( 6,'pop3','mail.pop3.timeout','60000','This property is to set the Socket I/O timeout. If this property is not set, default is infinite timeout. Specify the time in milliseconds. ',1);

[4] 以下のクエリを実行して、データが挿入されたことを確認。

mysql>select * from mailproperties;

* 実行後以下のように表示されればOK(POP3の場合)

======
mysql> select * from mailproperties;
+--------+----------+-------------------------------+-----------+---------------
--------------------------------------------------------------------------------
-----------------------------------------------------+---------+
| PROPID | PROTOCOL | PROPNAME                      | PROPVALUE | DESCRIPTION

                                                     | ENABLED |
+--------+----------+-------------------------------+-----------+---------------
--------------------------------------------------------------------------------
-----------------------------------------------------+---------+
|      1 | pop3s    | mail.pop3s.auth.plain.disable | true      | This property
is used to forcibly disable plain login in pop3s protocol
                                                     |       0 |
|      2 | imaps    | mail.imaps.auth.plain.disable | true      | This property
is used to forcibly disable plain login in imaps protocol
                                                     |       0 |
|      3 | imap     | mail.imap.auth.plain.disable  | true      | This property
is used to forcibly disable plain login in imap protocol
                                                     |       0 |
|      4 | pop3     | mail.pop3.auth.plain.disable  | true      | This property
is used to forcibly disable plain login in pop protocol.  Not sure if this prope
rty is applicable for pop protocol.                  |       0 |
|      5 | pop3     | mail.pop3.connectiontimeout   | 90000     | This property
is to set the socket connection timeout. If this property is not set, default is
 infinite timeout. Specify the time in milliseconds. |       1 |
|      6 | pop3     | mail.pop3.timeout             | 60000     | This property
is to set the Socket I/O timeout. If this property is not set, default is infini
te timeout. Specify the time in milliseconds.        |       1 |
+--------+----------+-------------------------------+-----------+---------------
--------------------------------------------------------------------------------
-----------------------------------------------------+---------+
6 rows in set (0.47 sec)
==========

[5] データベースからログアウト 

mysql>exit; 

5. 以下手順でMySQL DB を停止 

[1] コマンドプロンプトを開く 
[2] [ServiceDeskホーム]bin ディレクトリに移動 
[3] 以下を実行 

cmd>stopDB.bat 

6. ServiceDesk Plus を起動(開始) 

7. ServiceDesk Plus に管理者アカウントでログインして、 
  「レポート」タブ -> 「新規クエリレポート」をクリック 

8. クエリフィールドに以下のクエリ文をコピーして、貼り付けた後、 
  「レポート作成」ボタンをクリック 

select * from mailproperties where propid=5 

9. 添付しているレポートと同じように出力されているか確認 
   * 問題ない場合は、続けて、以下を実施 

10. ServiceDesk Plus にログイン後、「管理」タブ -> 「メールサーバ設定」より、 
  「取得の停止」をクリックして、一度メール受信を停止 

11. 受信タブの「保存」ボタンが有効になるため、もう一度「保存」をクリックして、 
  受信メールサーバの設定を保存 

12. 「取得の開始」ボタンをクリックして、メール受信を再開