none
Send e-mail to external recipient by script running on Exchange 2013 server RRS feed

  • Question

  • Hi,

    I have a PowerShell script which sends some reports to external user. Script is running on the Exchange 2013 server.

    There is a Relay connector, which is working fine, I can send emails from scanners, etc. to external recipients.

    The problem is, I cannot send e-mail messages to external recipients directly form Exchange server, I get this error:

    "Mailbox unavailable. The server response was: 5.7.1 Unable to relay"

    I see that when message is sent from the script it uses "Default FrontEnd" connector.

    How can I change this behavior and send e-mail messages from script on the Exchange 2013 server successfuly?

    Thanks.

    Tuesday, February 9, 2016 7:32 AM

Answers

  • Configure the script to send using port 587 and authenticate.  This is the best solution.

    The problem with trying to send it from the Exchange server is you would need a relay connector that will accept mail from the Exchange server, but that would end up applying to all mail, not just the stuff you want it to accept.  You shouldn't futz around with connectors that might impact Exchange server mail flow.

    You could run the script on a different server and configure a receive relay connector that applies to that server.


    Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."
    Celebrating 20 years of providing Exchange peer support!

    Tuesday, February 9, 2016 7:54 AM
    Moderator

All replies

  • Configure the script to send using port 587 and authenticate.  This is the best solution.

    The problem with trying to send it from the Exchange server is you would need a relay connector that will accept mail from the Exchange server, but that would end up applying to all mail, not just the stuff you want it to accept.  You shouldn't futz around with connectors that might impact Exchange server mail flow.

    You could run the script on a different server and configure a receive relay connector that applies to that server.


    Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."
    Celebrating 20 years of providing Exchange peer support!

    Tuesday, February 9, 2016 7:54 AM
    Moderator
  • Ok, I understood. Thank You.

    I end up sending report from different server.

    Tuesday, February 9, 2016 10:18 AM
  • You're welcome.  Please feel free to mark my response as the answer if appropriate in order to close the thread.

    Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."
    Celebrating 20 years of providing Exchange peer support!

    Tuesday, February 9, 2016 4:31 PM
    Moderator