[Gelöst] Email: CRM kann Kontakt nicht zuordnen

19. Juni 2013 11:32

Hallo zusammen !

Ich suche seit ein paar Tagen paar Tagen nach der Ursache für folgendes Problem:
Seit der Migration von CRM4 auf CRM2011 kann CRM den Sender einer Mail (von extern) nicht mehr auch einem vorhandenen Kontakt zuordnen, wenn der Bezug zu einer Firma festgelegt wird; unter CRM4 hatte dies noch funktioniert.
Selbst wenn man manuell den Kontakt zuordnet und erneut eine Mail von dieser Mailadresse sendet. Auch die automatische Nachverfolgung von Antworten funktioniert nicht, aber das nur zur Info.
Werden interne Mails hochgestuft, dann funktioniert die Zuordnung - der Benutzer, der im Emailrouter steht, wird erkannt.

Wir haben den Emailrouter im Einsatz mit allen aktuellen RUs, der Router funktioniert, sowohl eingehend, als auch ausgehend.
Als Weiterleitungspostfach wurde die Mailaddi des crmadmins verwendet, der auch unter den Benutzern des Routers erscheint (in der Benutzereinstellung E-Mail-Konfiguration ist der Router für ein/ausgehend eingestellt).
In den Systemeinstellungen sind angehakt:
- Nachverfolgungstoken verwenden (defaultwerte)
- Intelligente Übereinstimmung verwenden (defaultwerte)
- Zwischen CRM-Benutzern gesendete Email in 2 Aktivitäten verfolgen
- Sichere Frames – Nein
- Senden von Nachrichten mit nicht aufgelöste Emailempfängern zu lassen – Ja

Zu Testzwecken wurde eine Mailadresse bei gmail angelegt, in CRM eine Testfirma eingerichtet und dieser ein Testkontakt mit eben dieser Mailadresse zugeordnet.
Sende ich nun eine Mail an unsere Support-Adresse und lege den Bezug zur Testfirma fest, dann erscheint der Name des Senders in Rot (Nicht zugeordnet).
Natürlich wurde auch die im Kontakt hinterlegte Mailadresse auf versehentliche Leerzeichen, etc. überprüft.


Checke ich die Systemevents, dann finde ich:

#17174 - Fehler beim Überprüfen der E-Mail-Nachricht mit dem Betreff "test7" in Postfach crmadmin@XXXX.de. Microsoft.Crm.Tools.Email.Providers.EmailException: E-mails for address crXXX@gmail.com in forward mailbox could not be processed as the e-mail address is not associated with any approved forward mailbox user or queue record in CRM. At
#27938 - Fehler beim Überprüfen des Postfachs crmadmin@XXXXX.de auf zu verarbeitende E-Mail-Nachrichten. Microsoft.Crm.Tools.Email.Providers.EmailException: Fehler: Das angegebene Objekt wurde im Informationsspeicher nicht gefunden.

Ich hab daraufhin das Logging des Emailrouters eingeschaltet und erhalte:

06/18/2013 13:45:42 : Adding in hashtable: email [subject:test5]
06/18/2013 13:45:42 : Adding in hashtable: email [subject:test5]
06/18/2013 13:45:42 : Removed email [subject:test5] from hashtable, hashtable.count = 0
06/18/2013 13:45:42 : Removed email [subject:test5] from hashtable, hashtable.count = 0
06/18/2013 13:45:42 : #49073 - Die E-Mail mit dem Betreff "test5" von cxxxx@gmail.com an support@xxx.de wird für die Übermittlung an http://srvxxx01:5555/xxx überprüft.
06/18/2013 13:45:42 : #49073 - Die E-Mail mit dem Betreff "test5" von cxxxx@gmail.com an support@xxx.de wird für die Übermittlung an http://srvxxx01:5555/xxx überprüft.
06/18/2013 13:45:42 : #47100 - Der Parameter "IsForwardMailbox" für die Konfiguration des E-Mail-Router-Diensts wurde mit dem Wert "True" gelesen.
06/18/2013 13:45:42 : #47100 - Der Parameter "IsForwardMailbox" für die Konfiguration des E-Mail-Router-Diensts wurde mit dem Wert "False" gelesen.
06/18/2013 13:45:42 : #1866 - Die an http://srvxxx01:5555/xxx zu übermittelnde E-Mail-Nachricht mit dem Betreff "test5" in Postfach crmadmin@xxx.de wird überprüft.
06/18/2013 13:45:42 : #17174 - Fehler beim Überprüfen der E-Mail-Nachricht mit dem Betreff "test5" in Postfach crmadmin@xxx.de. Microsoft.Crm.Tools.Email.Providers.EmailException: E-mails for address
cxxx@gmail.com in forward mailbox could not be processed as the e-mail address is not associated with any approved forward mailbox user or queue record in CRM.

-->Info: crmadmin@xxx.de ist das im Emailrouter eingetragene Weiterleitungspostfach; beim Benutzer CRM Administrator wurde „E-Mail genehmigen“ angeklickt.

at Microsoft.Crm.Tools.Email.Providers.CrmPollingMailboxProvider.CheckForApprovedForwardMailboxUsersOrQueue(EmailMessage emailMessage)
at Microsoft.Crm.Tools.Email.Providers.ExchangePollingMailboxProvider.ValidateMessageInternal(EmailMessage emailMessage)
at Microsoft.Crm.Tools.Email.Providers.CrmPollingMailboxProvider.Run()
06/18/2013 13:45:42 : #47100 - Der Parameter "MessageExpiry" für die Konfiguration des E-Mail-Router-Diensts wurde mit dem Wert "86400000" gelesen.
06/18/2013 13:45:42 : #30463 - Die E-Mail-Nachricht mit den folgenden Details konnte nicht zugestellt werden: Absender: cxxx@gmail.com; Betreff: test5; Gesendet: 06/18/2013 13:44:51. Die Nachricht wurde in den Ordner "Unzustellbar" verschoben.
06/18/2013 13:45:42 : #47100 - Der Parameter "MoveEmails" für die Konfiguration des E-Mail-Router-Diensts wurde mit dem Wert "True" gelesen.
06/18/2013 13:45:42 : #9466 - Übermittlung der E-Mail-Nachricht mit Betreff "test5" in Postfach crmadmin@xxx.de an http://srvxxx01:5555/xxx wird akzeptiert. Grund: AcceptAll.


Kann mir jemand einen Tip geben, an welcher Schraube ich noch drehen kann, ich weiss langsam nicht mehr weiter ?

Vielen Dank für jede Hilfe
Armin

---------------
Update 8.7.2013

Call aufgemacht bei Microsoft, Ursache war bald gefunden:
In seltenen Fällen verändert sich bei der Migration das Format des Feldes "emailadress1" der Entität Kontakt von "email" auf "Text", dann kann keine Zuordnung des Kontaktes erfolgen.

Hier die Lösungen des Problems:

To solve this Issue you will need to apply the steps mentioned in Part I and Part II (for Part II we offer 2 approaches)
Part I
1. Open CRM web client as an administrator and create a new Solution; open IE, browse to CRM, click Settings, click Solutions and then click the new button under Solutions.
2. Within the new Solution window fill out the form as below and click the Save button.
Display Name: Contact
Name: Contact
Publisher: Default Publisher for CRM2011.
Version: 1.1.1.0
3. Now click on Entities within the Solution and then click the Add Existing button.
4. Check the Contact entity and then click OK.
5. When prompted about the missing components select “No, do not include required components” and then click OK.
6. Click the Save button.
7. Now click the Export Solution button.
8. Click Next unless you have not published customizations. Click Publish Customizations first and then click Next.
9. You will be prompted about other missing components. Just click Next to ignore these as we will be importing this Solution right back into the same organization.
10. At the next window do not select any Settings and just click next.
11. Since this will be an unmanaged package so just leave the current option “Unmanaged” selected and click Export button.
12. You will now be prompted to save the file. Just save it to the desktop of the CRM server.
13. Go to the desktop of the CRM server and open the newly created zip file titled Contacts_1_1_1_0.zip.
14. Extract the file customizations.xml.
15. Open the customization.xml file with a XML editor.
16. Press Ctrl+F and search for the string EmailAddress1.
17. Under EmailAddress1 locate the string “<Format>text</Format>”.
18. Within in the string change the work text to email. Save and close the file.
19. Now place the modified customization.xml file back into the zipped solution Contacts_1_1_1_0.zip. If prompted to overwrite the existing file choose yes.
20. Back in CRM Solutions click the Import button.
21. Browse to the location of the Solution file Contacts_1_1_1_0.zip and then click next.
22. Click Next to import the Solution.
23. Once the import completes click “Publish All Customizations” button.
24. Finally, have a user test and see if the problem still exists. It should no longer occur for the contact entity.

Part II
Creating a workflow for the "Contacts" Entity and execute it on every contact, in order to re fill the "EmailSearchBase" table in the Organizations database:
1. Copy email address form the "emailaddress1" field into the "emailaddress2" - this field must be an unused filed in CRM, if it is not so, please proceed to the alternative steps below
2. Delete the content of the "emailaddress1" field
3. Copy the email address from the "emailaddress2" filed into the “emailaddress1" field
4. Delete the content of the "emailaddress2" filed
Execute the newly created workflow on an advanced find windows results, on every result page in 250 result blocks.

Alternative method for Part II
1. Create a "Temp Email" field on the contacts Form
2. Create a Workflow for the Contacts Entity with two steps:
a. Delete the content of the "emailaddress1" field
b. Copy the email address from the "Temp Email" filed into the “emailaddress1" field
c. Set a trigger for this workflow on update of the "Temp Email" filed
3. Create an advanced search for contacts where the "emailadress1" filed contains Data
4. Export the data to an excel sheet, with only the "Emailadress1" and "Temp Email" columns, check the box for "Allowing re importing" be sure to check also the box to export all the results not only results from current page.
Note: The export is limited to 10.000 contact lines
5. Open the export in excel
6. Copy the content of "emailadress1" column to "Temp Email" column  save the excel sheet
7. Re import the excel sheet
8. After the import is successful, enter a new argument into the advanced search window used before: "And" "Temp Email" Dos not contain Data
9. Repeat the above steps 4. to 8. as many times you need, depending on the number of contacts you have in your Database.
10. Finally remove the "Temp Email" from the Contacts Form, and also delete the field to delete the generated temp data from the database.
11. Delete also the created workflow.


Viele Grüße
Armin