timmcmic / DLConversionV2

MIT License
44 stars 9 forks source link

MailContact & EnableHybridMailFlow #23

Closed adamdrayer closed 2 years ago

adamdrayer commented 2 years ago

Hi Tim,

Not really an issue but more of a question.

I understand enableHybridMailFlow creates a Dynamic Distribution Group with the mailcontact as the member, and the DDG is not synced so it can have the proxyaddresses of the original list.

My question is why not just have the mail contact with the same proxyaddreses as the original list and just not sync the mail contact object? If it only exists on-prem and it has the original proxyaddreses - and the remote routing address of the new list is the targetaddress of the contact, wouldn't that allow for on-premises mail to be routed to the online list?

Thanks.

timmcmic commented 2 years ago

Adam:

Not a problem - here's the logic. There needed to be a way to replace nested distribution group membership. So on premises you migrate a sub DL. Now - you want to email that parent DL - and expect that the subDL will be included.

So on premises it hits the parent DL -> hits the mail contact -> forward to DL in cloud -> expands and those recipients are included.

If we did not replicate the mail contact - we could not represent it in office 365. You cannot replicate the mail contact and recycle the same proxy addresses - it causes a collision between the mail contact and the distribution group.

My blog series https://timmcmic.wordpress.com covers this and nested group membership.

It's complicated - but it works.

Tim

============================== Timothy J. McMichael Senior Support Escalation Engineer @.**@.> (980)-776-7465

Hours: Sunday - Wednesday 08:00 - 16:00 eastern time zone.

Manager: Tom Roughley @.**@.>)

Premier Support - (800)-936-3100 Broad Commercial Support - (800)-936-4900

==============================

From: adamdrayer @.> Sent: Thursday, October 7, 2021 11:28 AM To: timmcmic/DLConversionV2 @.> Cc: Subscribed @.***> Subject: [timmcmic/DLConversionV2] MailContact & EnableHybridMailFlow (#23)

Hi Tim,

Not really an issue but more of a question.

I understand enableHybridMailFlow creates a Dynamic Distribution Group with the mailcontact as the member, and the DDG is not synced so it can have the proxyaddresses of the original list.

My question is why not just have the mail contact with the same proxyaddreses as the original list and just not sync the mail contact object? If it only exists on-prem and it has the original proxyaddreses - and the remote routing address of the new list is the targetaddress of the contact, wouldn't that allow for on-premises mail to be routed to the online list?

Thanks.

- You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftimmcmic%2FDLConversionV2%2Fissues%2F23&data=04%7C01%7Ctimmcmic%40microsoft.com%7C5ffae9ddfa52421370a408d989a71699%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637692173038425062%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=I1n3I78PtQYzKslG%2FIa2HtlpG3%2FSIQ43D3tyvLxVp9s%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAKGTN6NJZV66PWOUYNDA2CDUFW4BDANCNFSM5FRSDWZQ&data=04%7C01%7Ctimmcmic%40microsoft.com%7C5ffae9ddfa52421370a408d989a71699%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637692173038425062%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=nluawHe61rcYnrmM3P2iztHuHlezqbisWSWOuJrIfeM%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7Ctimmcmic%40microsoft.com%7C5ffae9ddfa52421370a408d989a71699%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637692173038435055%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=xOzHFgHb%2F73d9MAwhvEEk0X2sJ5UoEX%2BWiF7W%2B64wqo%3D&reserved=0 or Androidhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7Ctimmcmic%40microsoft.com%7C5ffae9ddfa52421370a408d989a71699%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637692173038445050%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=JoUOqnFCuq4NNc2cNau6H%2B45E%2FVANn4JaSxuWlCDAwQ%3D&reserved=0.

adamdrayer commented 2 years ago

I see.. so if we migrated lists without the enablehybridmailflow enabled, we should create new groups that don't sync, make the contact objects members of those groups, and put the original proxyaddresses in the new non-synced group. Is that correct?

timmcmic commented 2 years ago

You need not do anything.

In the non-hybrid mail flow scenario the contact is created and only the mail attribute is stamped. Contacts with mail attributes appear in exchange online even though they are not full mail contacts.

The contact has custom attribute1 MigratedByGroup and customer attribute 2 SMTPofMigratedGroup stamped so that further migrations know this is a special class contact for a previously migrated distribution group.

At least this is what you should be observing unless something is wrong.

Tim

============================== Timothy J. McMichael Senior Support Escalation Engineer @.**@.> (980)-776-7465

Hours: Sunday - Wednesday 08:00 - 16:00 eastern time zone.

Manager: Tom Roughley @.**@.>)

Premier Support - (800)-936-3100 Broad Commercial Support - (800)-936-4900

==============================

From: adamdrayer @.> Sent: Thursday, October 7, 2021 11:48 AM To: timmcmic/DLConversionV2 @.> Cc: Tim McMichael @.>; Comment @.> Subject: Re: [timmcmic/DLConversionV2] MailContact & EnableHybridMailFlow (#23)

I see.. so if we migrated lists without the enablehybridmailflow enabled, we should create new groups that don't sync, make the contact objects members of those groups, and put the original proxyaddresses in the new non-synced group. Is that correct?

- You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftimmcmic%2FDLConversionV2%2Fissues%2F23%23issuecomment-937920513&data=04%7C01%7Ctimmcmic%40microsoft.com%7Cfbc5f99dc75249b087ba08d989a9d707%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637692184824236745%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=1DGK7TZa7rEtNH4N4An5r4eP2MZXIXtHlbS78Qll188%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAKGTN6LQXYJGUGVVL5QNRVTUFW6K7ANCNFSM5FRSDWZQ&data=04%7C01%7Ctimmcmic%40microsoft.com%7Cfbc5f99dc75249b087ba08d989a9d707%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637692184824236745%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=1AUFrzJqrKFrvXKZGrhzKRmiHSKO0AUIlpR6GrMDTfo%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7Ctimmcmic%40microsoft.com%7Cfbc5f99dc75249b087ba08d989a9d707%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637692184824246741%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=HTdhnK8XpTODaW0fRdCmUEwN7MZYhcbRf2KybQM9aN8%3D&reserved=0 or Androidhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7Ctimmcmic%40microsoft.com%7Cfbc5f99dc75249b087ba08d989a9d707%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637692184824246741%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ZgxFZZ2Q5vi8IcxeFuiYAtIqbOl6wQv%2FW%2F0nnMlVlBs%3D&reserved=0.

adamdrayer commented 2 years ago

We are running hybrid. We have migrated all our users but we have some IT-related monitoring systems that are on-prem and use the on-prem Exchange server as the target relay server. So we have some groups that we migrated where we still have on-prem systems trying to email them. After migrating the groups without the enableHybridMailFlow set to true, email stopped working, because there is no on-prem AD object that has the original proxyaddress of the group. There is a mailcontact object, but the proxyaddress ends in "...-MigratedByScirpt@domain.com"

timmcmic commented 2 years ago

Oh absolutely I get it now.

So what you would do is create a dynamic distribution group. The filter would be:

The OU where the group was. The primary SMTP address matching the group including all X500 and sub addresses. CustomAttribute1 = migratedByGroup CustomerAttribute2 = primarySMTPAddress of the group.

Then create a mail contact and set the target address of the mail contact to be the @.**@.>.

The addresses of the contact can be whatever - I used -migratedBySCript and the original name.

If you need help let me know.

Tim

============================== Timothy J. McMichael Senior Support Escalation Engineer @.**@.> (980)-776-7465

Hours: Sunday - Wednesday 08:00 - 16:00 eastern time zone.

Manager: Tom Roughley @.**@.>)

Premier Support - (800)-936-3100 Broad Commercial Support - (800)-936-4900

==============================

From: adamdrayer @.> Sent: Thursday, October 7, 2021 11:54 AM To: timmcmic/DLConversionV2 @.> Cc: Tim McMichael @.>; Comment @.> Subject: Re: [timmcmic/DLConversionV2] MailContact & EnableHybridMailFlow (#23)

We are running hybrid. We have migrated all our users but we have some IT-related monitoring systems that are on-prem and use the on-prem Exchange server as the target relay server. So we have some groups that we migrated where we still have on-prem systems trying to email them. After migrating the groups without the enableHybridMailFlow set to true, email stopped working, because there is no on-prem AD object that has the original proxyaddress of the group. There is a mailcontact object, but the proxyaddress ends in @.**@.>"

- You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftimmcmic%2FDLConversionV2%2Fissues%2F23%23issuecomment-937925619&data=04%7C01%7Ctimmcmic%40microsoft.com%7C123f672dc23044633f5508d989aaae55%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637692188436410174%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=BHYMxn970v06Ra02x0sTZzdeWHDu%2FlSCpHnONyq6StM%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAKGTN6KQECMG2OFKKODOIBLUFW7BRANCNFSM5FRSDWZQ&data=04%7C01%7Ctimmcmic%40microsoft.com%7C123f672dc23044633f5508d989aaae55%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637692188436420175%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ePotkIk8IHOsNtn4neXZTBxfcBgWPedyKDpcDS6Gm5k%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7Ctimmcmic%40microsoft.com%7C123f672dc23044633f5508d989aaae55%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637692188436430170%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=XIILixMpYEACvm%2F1owvH%2BIeVGYDfQY8IFu7i8qlA0V8%3D&reserved=0 or Androidhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7Ctimmcmic%40microsoft.com%7C123f672dc23044633f5508d989aaae55%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637692188436430170%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=8qJO%2FP83uhEC60JcBAanyjDyKdVYZy6H3Ez4tVMYU1o%3D&reserved=0.

adamdrayer commented 2 years ago

Got it. Thank you so much for the fast response!

timmcmic commented 2 years ago

Adam...

The new version published online now has a new function to enable hybrid mail flow after the fact.

Enable-HybridMailFlowPostMigration

You specify the SMTP address of the group and the organizational unit - and it uses the office 365 group properties to recreate the mail contact and the dynamic distribution group.

Tim

adamdrayer commented 2 years ago

Thank you so much for this update!

timmcmic commented 2 years ago

If you have a chance to give it a try let me know.

Tim


From: adamdrayer @.> Sent: Tuesday, October 19, 2021 3:00 PM To: timmcmic/DLConversionV2 @.> Cc: Tim McMichael @.>; State change @.> Subject: Re: [timmcmic/DLConversionV2] MailContact & EnableHybridMailFlow (#23)

Thank you so much for this update!

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftimmcmic%2FDLConversionV2%2Fissues%2F23%23issuecomment-947020200&data=04%7C01%7Ctimmcmic%40microsoft.com%7Cea410d5daf114037903208d99332b76f%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637702668314427368%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=8WBmSLE64mJv%2F849g%2FmjockexX64GqF6z6LoCf%2FUv%2Bs%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAKGTN6LWA75IA2UVJUV7PYLUHW54XANCNFSM5FRSDWZQ&data=04%7C01%7Ctimmcmic%40microsoft.com%7Cea410d5daf114037903208d99332b76f%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637702668314437356%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=XjZtbvBPmy%2Fz%2B70rGwLFT7O%2FaKNhZud%2FDPCsW%2FPaQ70%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7Ctimmcmic%40microsoft.com%7Cea410d5daf114037903208d99332b76f%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637702668314447351%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=0dEefG97aQHjY%2FdVUy36n17VVOIiPxIkQFS75rM7y2s%3D&reserved=0 or Androidhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7Ctimmcmic%40microsoft.com%7Cea410d5daf114037903208d99332b76f%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637702668314457346%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=kkUeb%2Fy9gVzaTLAPisEhHyF%2FGtlB4x35DBSPiOhZxzo%3D&reserved=0.