locked
Address rewriting for outgoing mails from an external domain RRS feed

  • Question

  • We want to use the "Outgoing Address Rewrite Agent" to change the sender address of outgoing mails from an external domain to an internal domain, so we added this rewrite entry to the Edge server:

    New-AddressRewriteEntry -Name "Outgoing Mails" -InternalAddress sender@external.domain -ExternalAddress sender@internal.domain -OutboundOnly $true

    This doesn't work, probably because we want to change external to internal address for outgoing mails and it's normally the other way round. Is there a way to still achieve this?

    Some background information: With this we are trying to work around the issue of the missing resent-from header field when an external sender sends a mail to an internal distribution list which then gets forwarded to an external address again by a mailbox rule. The mail is forwarded by Exchange with the external address as sender and gets consequently marked as spam on the external receiver side.

    Tuesday, April 23, 2019 7:37 AM

Answers

  • Hi Sim,

     

    With my research, there is no other direct method to avoid the forwarding messages been marked spam by the external recipient.

     

    As workaround, you might edit the message and manually send to the recipient as an original email from your organization. It's suggested that asking external recipient, if their hosting mail server has options like 'safe senders list', if  so, could add the original external email address in the list.

     

    Thanks your understanding! 

    Regards,

    Kelvin Deng


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    • Proposed as answer by ThinkCenter Tuesday, April 30, 2019 9:44 AM
    • Marked as answer by SIM_ADM Tuesday, April 30, 2019 9:52 AM
    Friday, April 26, 2019 12:31 PM

All replies

  • Hi SIM_ADM,
     
    Make sure that you have successfully enabled address rewriting, run the following command to verify the Enabled property value:
     
    Get-TransportAgent "Address Rewriting *"
     
    The New-AddressRewriteEntry cmdlet to create an address rewrite entry that rewrites sender and recipient email addresses in messages sent to or sent from your organization through an Edge Transport server. I noticed the cmdlet you provided is incorrect, please try the following cmdlet.
     
    New-AddressRewriteEntry -Name "Outgoing Mails" -InternalAddress sender@internal.domain -ExternalAddress sender@external.domain -OutboundOnly $true
     
    To verify that you have successfully created address rewrite entries:
     
    1. Replace <AddressRewriteEntryIdentity> with the name of the address rewrite entry, and run the following: 
     
    Get-AddressRewriteEntry <AddressRewriteEntryIdentity> | Format-List

    2. From a mailbox that's affected by the address rewrite entry, send a test message to an external mailbox. Verify the test message appears to originate from the rewritten email address.

    Regards,
    Kelvin Deng

    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    • Edited by ThinkCenter Wednesday, April 24, 2019 6:50 AM
    Wednesday, April 24, 2019 6:48 AM
  • Hi Kelvin,

    thank you for your message.

    We made sure the Address Rewriting Transport Agents are enabled and used the cmdlet provided to create a new entry. But the outgoing message sender address isn't rewritten.

    Is address rewriting possible in the way we want to use it? We want to change an external sender address to an internal sender address for outgoing messages.

    Regards

    Sascha


    • Edited by SIM_ADM Wednesday, April 24, 2019 6:57 AM spelling
    Wednesday, April 24, 2019 6:57 AM
  • Hi SIM_ADM,

     

    I understand that you want to change the sender address of outgoing mails from an external domain to an internal domain. In my point of view, Address Rewrite Outbound agent cant achieve your request.

     

    If the “Mail From” is part of the Accepted Domain, and the session is also authenticated, the mail will be treated as Outbound mail and the “Address Rewrite Outbound Agent” will work. If the “Mail From” is not part of the Accepted Domain or the session is not authenticated, the mail will be treated as Inbound and the “Address Rewrite Inbound Agent” will work. The Address Rewrite Inbound Agent (Priority 2) works before the Address Rewrite Outbound Agent (Priority 10).

     

    The Address Rewrite Outbound agent will work only when the sender’s SMTP address is internal, and the session is authenticated. Since the external domain is not a part of Accepted domain, address rewrite will not work. For more information, please see the blog below:

     

    Why is my Address Rewriting not working as expected?

    https://blogs.technet.microsoft.com/exchange/2017/10/26/why-is-my-address-rewriting-not-working-as-expected/

    Currently, we could only rewrite the sender address of outgoing mails when sender’s address is internal (part of Accepted Domain).

    Regards,

    Kelvin Deng


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Thursday, April 25, 2019 7:48 AM
  • Hi Kelvin,

    thank you for clarifying this.

    Is there any other way we could achieve this? It's giving us a big headache in our communication with a client that the resent-from header is not set when messaging internal distribution groups (what I explained in my first post).

    Regards

    Sascha

    Thursday, April 25, 2019 8:05 AM
  • Hi Sim,

     

    With my research, there is no other direct method to avoid the forwarding messages been marked spam by the external recipient.

     

    As workaround, you might edit the message and manually send to the recipient as an original email from your organization. It's suggested that asking external recipient, if their hosting mail server has options like 'safe senders list', if  so, could add the original external email address in the list.

     

    Thanks your understanding! 

    Regards,

    Kelvin Deng


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    • Proposed as answer by ThinkCenter Tuesday, April 30, 2019 9:44 AM
    • Marked as answer by SIM_ADM Tuesday, April 30, 2019 9:52 AM
    Friday, April 26, 2019 12:31 PM
  • Is there any other way we could achieve this? It's giving us a big headache in our communication with a client that the resent-from header is not set when messaging internal distribution groups (what I explained in my first post).

    Regards

    Sascha

    Could you show the rule you have set to redirect?
    Friday, May 10, 2019 12:27 PM