Article Details
Product : ServiceDesk Plus
Category : ServiceDesk Plus >> Troubleshooting
 #100004 - Mail Fetching Troubleshooting

  1. Unable to fetch mails into ServiceDesk Plus as the ports are being blocked by Firewall/Antivirus.
  2. Is it important to configure SSL Certificate to use POPS/IMAPS for fetching mails?
  3. Authentication and Configuration Errors:
    • Settings saved successfully. But an error occurred while trying to check connection with mail server - Authentication Failed using the given username and password.
    • Email settings saved successfully. But an error occurred while trying to check connection with mail server – Problem connecting to mailbox.
  4. If the mail box is hidden from the address book there is a failure in Authentication and mails cannot be fetched into SDP.
  5. Processing from Mail Server
    • Password length is greater than the expected value.
    • Plain text authentication is disabled in the mail server
    • Encrypted mode is enabled on POP in the mail server.

1. Unable to fetch mails into ServiceDesk Plus as the ports are being blocked by Firewall/Antivirus.

Firewall Blocking Ports

Possible Cause:

a. The Software/Hardware Firewall blocks the POP/IMAP port.
b. The ipaddress of the server on which ServiceDesk Plus is hosted, is blocked by either the Anti-virus program or firewall or both.
c. Both of the above can be the cause for firewall blocking ports.

Error trace in logs:

javax.mail.MessagingException: Connect failed;

nested exception is:

java.net.ConnectException: Connection timed out: connect

Solution:

You can follow these steps to check if firewall is blocking the port.

  • Open Command Prompt and type,
  • cmd> telnet [mailservername] 110

For instance,

  • cmd> telnet mail.google.com 110

If you receive an error as in the above image, then port 110 is being blocked by either the anti-virus program or the Windows firewall or both. There is also chances for either the mail server or port number or both the mail server and port number to be incorrect.

Information required for analysis:

Support Tab --> Support File

2. Is it important to configure SSL Certificate to use POPS/IMAPS for fetching mails?

Secured Socket Layer

Cause:

If the SSL Certificate in mail server is a self signed certificate then it is not imported in the ServiceDesk Plus java environment while using the POPS/IMAPS protocol.

Error Trace in logs:

javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target|

Solution:

  1. Download the file from the link given below and extract it to the Service Desk Plus Home directory.
    http://bonitas.zohocorp.com/servicedesk/11Mar2010/certgeneration.zip
  2. Run the Extracted batch file from the command prompt using the syntax given below.
    syntax:- gencert.bat (hostname):(port)
    eg:-
    cmd> gencert.bat sdpexchnage.com:995
  3. You will receive an exception PKIX. On supplying the value 1, a file called jssecacerts is generated in the ServiceDesk Plus Home Directory.
  4. Copy the jssecacerts file under jre\lib\security folder and restart ServiceDesk Plus application.
  5. Fill in the values under Mail Server Settings. Start fetching mails to check the functionality.

Information required for analysis:

Support Tab --> Support File

3. Authentication and Configuration Errors:

  1. Settings saved successfully. But an error occurred while trying to check connection with mail server - Authentication Failed using the given username and password.
  2. Email settings saved successfully. But an error occurred while trying to check connection with mail server – Problem connecting to mailbox.

Cause:

The error occurs if

  1. the configured username or password in Mail server settings is incorrect.
  2. the servicedesk server is unable to communicate with the mailserver.

Error trace in logs:

javax.mail.AuthenticationFailedException: Bad login

Solution:

  1. Check if there is proper connection with the mail server.
  2. Check if the given username and password is correct under Admin --> Mail server settings --> Incoming --> Save Settings. cmd> telnet “ip address” “port number”

Protocols Used: Incoming are POP – 110, IMAP- 143

cmd>telnet sdplinmail 110 (POP)
>user "sd-test2"
>ok
>pass "sdp"
>ok

Incorrect password when using POP

cmd> telnet 192.168.113.120 143 (IMAP)

> a1 capability
> a2 login "username" "password"
> a3 inbox mail-box-name

Incorrect password when using IMAP

cmd> telnet 192.168.113.120 993 (IMAPs)

> a1 capability
> a2 starttls
> a3 login "username" "password"
> a4 inbox mail-box-name

Information required for analysis:

Support Tab --> Support File

4. If the mail box is hidden from the address book there is a failure in Authentication and mails cannot be fetched into SDP.

Hidden Mailbox

Cause:

The mailbox is hidden from the address book which leads to failure in Authentication and hence mails cannot be fetched into ServiceDesk Plus.

Error trace in logs:

[09:26:51:740]|[04-09-2009]|[com.adventnet.servicedesk.common.MailUtilities]|[INFO]|[26]|: Obtained mail store from session.|
[09:26:52:068]|[04-09-2009]|[SYSOUT]|[INFO]|[26]|: Check if the username and password are correct|
[09:26:52:068]|[04-09-2009]|[SYSOUT]|[INFO]|[26]|: javax.mail.AuthenticationFailedException: AUTHENTICATE failed.|
[09:26:52:068]|[04-09-2009]|[SYSOUT]|[INFO]|[26]|: at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:474)|
[09:26:52:068]|[04-09-2009]|[SYSOUT]|[INFO]|[26]|: at javax.mail.Service.connect(Service.java:275)|

Solution:

The mailbox should be found in the address book which will allow mail fetching to start.

  1. Open Active Directory Users and Computers.
  2. Open the Properties dialog box for the user account.
  3. On the Exchange Advanced tab, select the Hide from Exchange Address Lists check box.

Information required for analysis:

Support Tab --> Support File

5. Processing from Mail Server

  1. Password length is greater than the expected value.
  2. Unable to fetch mails as plain text authentication is disabled in the mail server
  3. Error when encrypted mode is enabled on POP in the mail server.

a. Password length is greater than the expected value.

Error trace in logs:

Error when processing. SO RETURNING...|com.adventnet.authentication.PasswordException: Length of the new password is greater than expected value of : 100
For any Mail fetching issue, check for the string "SO RETURNING".. Few lines above or below the line, which contains this string, should give more information on the error trace.

Reason:

When a mail comes in , ServiceDesk Plus will try to create a new user with the user name and password same as the email address and in this case, since the email address is very long it cannot be added to the database and throws the error message. -- Length of the new password is greater than expected value of :100

b. Unable to fetch mail as Plain text Authentication is disabled in the mail server.

Error trace in logs:

javax.mail.MessagingException: No login methods supported!;

nested exception is:

com.sun.mail.iap.ProtocolException: No login methods supported!|

Solution:

Enable plain text login in Microsoft Exchange server and follow the steps given below to configure the IMAP service to use Plain Text Login,

1. Open Exchange Management Shell from Start ->Information required for analysis:

Support Tab --> Support File

c. Error when encrypted mode is enabled on POP in the mail server.

Cause:

Unable to fetch email when encrypted mode is enabled on POP in the mail server.

Error trace in logs:

javax.mail.AuthenticationFailedException: Command is not valid in this state.

Solution:

Reset the password format on the exchange server to the Normal format. This can be done by running a query on the exchange server shell.

Follow the steps below to configure the IMAP service to use Plain Text Login:

  1. Open Exchange Management Shell from Start -> Programs -> Microsoft Exchange 2007.
  2. Enter the following In the shell,
    set-POPsettings –logintype plaintextlogin
  3. Press Enter.
  4. From the Services panel restart the Microsoft Exchange Information Store service.

Information required for analysis:

Support Tab --> Support Files

Information required for analysis:

Support Tab --> Support File

c. Error when encrypted mode is enabled on POP in the mail server.

Cause:

Unable to fetch email when encrypted mode is enabled on POP in the mail server.

Error trace in logs:

javax.mail.AuthenticationFailedException: Command is not valid in this state.

Solution:

Reset the password format on the exchange server to the Normal format. This can be done by running a query on the exchange server shell.

Follow the steps below to configure the IMAP service to use Plain Text Login:

  1. Open Exchange Management Shell from Start -> Programs -> Microsoft Exchange 2007.
  2. Enter the following In the shell,
    set-POPsettings –logintype plaintextlogin
  3. Press Enter.
  4. From the Services panel restart the Microsoft Exchange Information Store service.

Information required for analysis:

Support Tab --> Support Files