none
create smtp with authentication RRS feed

  • Question

  • hi to all.

    i have exch 2016 cu9 and must create relay for sent mail with auth. have made relay

    PS C:\Windows\System32\WindowsPowerShell\v1.0> Get-ReceiveConnector EXCHRND\Relay-with-auth | select authm*,permissi*, remoteipr* | fl
    
    
    AuthMechanism    : Integrated, BasicAuth
    PermissionGroups : ExchangeUsers
    RemoteIPRanges   : {10.33.10.10

    and try to send

    Send-MailMessage -SmtpServer exchange-server -Credential (Get-Credential user1@contoso.ru) -From 'user1@contoso.ru' -To 'sadfgrfgrtghrtht@domain.ru' -Subject 'Test email' -Port 25

    get error message

    5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM

    user1 real domain user with email. 10.33.10.10 is ip my PC.

    what should i configure else?

    Tuesday, December 10, 2019 10:37 AM

All replies

  • Hi Nikita,

    Do you mean you have internal server or applications need use Exchange to anonymously relay messages?

    If user1 is a domain user and has a mailbox on Exchange, the messages from user1 will be received by default receive connectors on Exchange server.

    You can refer to the article Allow anonymous relay on Exchange servers, check the settings of your custom receive connector or create a new one and test if you still get this issue.

    You can use Telnet to test if one or more of the specified network hosts can connect to the dedicated Receive connector, and can anonymously relay mail through the connector. Here is an acritical you can have a reference, How to Configure a Relay Connector for Exchange Server 2010.

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.

    Regards,

    Vera Shen


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

    Wednesday, December 11, 2019 9:23 AM
  • applications need use Exchange.

    not anonymous but autorisation relay!

    Wednesday, December 11, 2019 11:06 AM
  • Hi Nikita,

    If you want an authorized relay, you can also make use of the default exchange connector "Client Frontend".

    You would need send to emails over port 587.

    You could also add the parameter 'usessl' in the send-mailmessage command.

    Thank you

    Wednesday, December 11, 2019 11:17 AM
  • yes, i have tested it, but get same error

    Send-MailMessage -SmtpServer exchange-server -Credential (Get-Credential user1@firma.ru) -From 'user1@firma.ru' -To 'sadfgrfgrtghrtht@bk.ru' -Subject 'Test email' -Port 587 -UseSsl

    5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM

    Wednesday, December 11, 2019 12:42 PM
  • Hi Nikita,
     
    Do you want to set the receive connector as externally secured since you have set the “PermissionGroups” as “ExchangeUsers”, right? According to the suggestions of official articles, if you want to configure the connections as externally secured, you should try to set the “AuthMechanism” as “ExternalAuthoritative” with the following command:
     

    Set-ReceiveConnector <receive connector> -AuthMechanism ExternalAuthoritative


     
    Is “sadfgrfgrtghrtht@domain.ru” an external user? If you want to relay mail to the external user, you should set the connector as “Anonymous users”.
     
    For more information about the custom receive connectors for the application, you can refer to the article I provided above, or Receive messages from a server, service, or device that doesn't use Exchange.

    Regards,

    Vera Shen


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

    Monday, December 16, 2019 1:17 AM
  • Any updates so far? If you have solved your problem, could you share with us? Maybe it will help more people with similar problems.

    Regards,

    Vera Shen


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

    Friday, December 20, 2019 1:05 AM
  • Although I am not sure if you have solved the problem. Please allow me to make a brief summary for the time being, hope more people can get help from here.

    Issue Symptom
    ==========================================
    Exchange is 2016 cu9 and we need to create relay for sending mail with auth. After creating a receive connector, test to send message but get error: “5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM”.

    Possible Cause
    ==========================================
    The AuthMechanism setting of connector.

    Suggestions
    ==========================================
    Check the settings of your connector with the following command:

    Get-ReceiveConnector <connector> | select auth*,permiss*, remote*

    If you want to configure the connections as externally secured, you should try to set the “AuthMechanism” as “ExternalAuthoritative” with the following command:

    Set-ReceiveConnector <receive connector> -AuthMechanism ExternalAuthoritative


    Reference Links
    ==========================================
    Receive messages from a server, service, or device that doesn't use Exchange

    Regards,

    Vera Shen


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

    Thursday, December 26, 2019 12:58 PM