Troubleshooting

By default, the system service account “Network Service” is configured to run the Mail Gateway service. In case there problems starting the service, try to change the service account to another account and then back to “Network Service” (or other appropriate account).

Another solution is to run it as a “local system account”

The Mail Gateway service logs all warning and error messages to the Windows Event Log. More detailed logging can be enabled by setting the debugLogging attribute of the global element to true and restarting the service. The debug log file can be found in C:\ProgramData\Lundalogik\Mail Gateway.

When using the Mail Gateway Configurator debug logging is always enabled and shown in the bottom part of the window (no file is created).

If Mail Gateway is for some reason unable to connect to Exchange, use the EWS Editor tool to outrule the possibility that there is something wrong with the Exchange URL or account credentials.

When there is to many mails in the mailbox you might get a error similary to this, “Message: Failed to list messages. Check Exchange server availability, mailbox address and permissions” followed by “Message: Message processing failed for account ”[name of the mailbox]“. Logger: MailGateway.Core.MailboxWorker Exception: The server cannot service this request right now. Try again later.”.

To see the limit of mails ask the customer to check the parameter EWSFindCountLimit in their throttlingpolicy on the exchangeserver.

To solve the problem you can can just move all mails to a temp folder and then move a slitlght smaller amount of mails to the inbox.

The error message “Message: Failed to list messages. Check Exchange server availability, mailbox address and permissions” could also appear when the mail account (username/password) we're using to connect to the mailbox are having too many connections to the Exchange server.

E.g. if you're using the same account for several mailboxes, this could cause connection problems for one or several mailboxes even though the permissions are set correctly. Avoid this by using unique accounts for each mailbox, or at least connect just a few mailboxes to the same account.

If for some reason messages cannot be imported and the “save failed messages to disk” option is not set, messages will remain in the inbox and ignored for all future. By using the Mailbox Reset utility the “ignore forever” flag can be reset and messages will be processed again by Mail Gateway.

The Mailbox Reset utility can also be called from the command line in order to e.g. schedule resetting of messages in a certain mailbox. Example of usage:

MailGateway.MailboxReset.exe /mailbox test@example.com

Note!

The user running the reset utility must be able to open the service configuration file.

In certain cases there may be problems for users opening e-mail messages saved as documents in Lime CRM.

Opening .eml files

Outlook 2007 may not be registered as an application that can open .eml files. There is a hotfix from Microsoft available that fixes this.

Opening .msg files

An error message saying that A resource is busy or you lack sufficient access rights or permissions may appear when trying to open .msg files. There is a hotfix from Microsoft available that fixes this.

Mail Gateway is hard-coded to try to connect sender to a person record before anything else. For instance, if Mail Gateway is configured for internal use (i.e. connecting to coworker instead of person), it will still attempt to connect the sender email address to records in the person table before moving on to coworker. If it finds a match in the person table, it will attempt to connect the person record's id to the coworker field and fail.

The practical outcome is that some coworkers (those without a person card with an email address) will be able to use the functionality without a problem while others cannot. The preferable solution is to remove email addresses from any person records that refer to coworkers.

The Mail Gateway Windows service logs all warning and error messages to the Windows Event Log (Application and Services Logs, Lundalogik folder). For certain events a unique event identifier (log ID) is also saved with the message. The following tables lists these identifiers along with a description of the event:

Event ID Description
1 There was a problem sending email.
2 There was a problem with Exchange Server autodiscovery.
3 There was a problem migrating the configuration to the new 2.x format.
4 The configuration file was not found or could not be read.
5 There was a problem connecting to the Lime CRM Web Service.
100 There was a problem talking to the Lime CRM Web Service.
666 A fatal error leading to Mail Gateway shutting down the listener thread for one of the accounts occurred. This means that messages will no longer be retrieved from the mailbox.
  • Last modified: 6 years ago
  • by Jonny Springare