locked
Mailbox unavailable. The server response was: 5.7.1 Client does not have permissions to send as this sender

    Question

  • We are evaluating moving to TFS2010 from VSS.  In testing I tried to send a work item as an email and received the error message

    Mailbox unavailable. The server response was: 5.7.1 Client does not have permissions to send as this sender

    We have it set to use the correct mail relay and the correct port.  We can telnet from the TFS box to the mail relay over the proper port.  The from address is using a valid account.  Does anyone have any suggestions as to what else we should look at to get email to work.

    Wednesday, January 19, 2011 2:58 PM

Answers

  • Hi SheldonS,

     

    Thanks for your post.

     

    TFS connect to SMTP server and send email using TFS service account, so we must sure that SMTP server accept the TFS service account to access or SMTP server accept the anonymous access.


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by SheldonS Monday, January 24, 2011 1:49 PM
    Friday, January 21, 2011 11:43 AM

All replies

  • Normally TFS expects to be able to relay mail without authentication.  You'd simply add your TFS server's IP address to the allowed relays and it'll work from there.   If you are requiring that mail be authenticated, there are a few threads on that in the forum, but the answers usually involve a proxy of some sort that takes the relay and then forwards to the authenticated source.
    Ryan Hanisco MCSE, MCTS:SQL 2005, Project+
    techsterity.wordpress.com
    Wednesday, January 19, 2011 3:37 PM
  • Our mail relay does not require authentication.  I should also let you know I am trying to do the email through the web client.
    Wednesday, January 19, 2011 3:57 PM
  • Hi SheldonS,

     

    Thanks for your post.

     

    TFS connect to SMTP server and send email using TFS service account, so we must sure that SMTP server accept the TFS service account to access or SMTP server accept the anonymous access.


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by SheldonS Monday, January 24, 2011 1:49 PM
    Friday, January 21, 2011 11:43 AM
  • I'll have to double check with those in charge of the relay.  I do know I am able to send emails in my .NET applications with the SMTPClient without anything special.

     

    Friday, January 21, 2011 2:20 PM
  • Hi SheldonS,

     

    Thanks for your reply.

     

    What about the progress for this issue?


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, January 24, 2011 2:53 AM
  • It was related to the TFS service account.  I have been able to email an item in TFS.  Thank you for all your help.
    Monday, January 24, 2011 1:49 PM
  • Hi SheldonS,

     

    Thanks for your reply.

     

    I’m glad to hear that you got it to work.

     

    All your participation and support are very important to build such harmonious/ pleasant / learning environment for MSDN community.

     

    Have a nice day!


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, January 25, 2011 3:31 AM
  • Hello,

    I am getting the same issue that SheldonS was getting.

    You mentioned that the problem could be solved by ensuring the server accepts anonymous access.

    To ensure that, I changed the web.config file to have the following setting...

            <authorization>
                <allow users="?" />

    I also added my credentials to the appSettings section. (Username and Password)

     

    Is there a different place I need to change the anonymous access setting?

     

    Thanks

     

     

    Wednesday, January 26, 2011 7:29 PM
  • Hi Flyleafian,

    The setting that I was referring to was not in the TFS configuration, but on the mail server.  You need to configure it to accept anonymous relays...  You have to be careful though as you don't want to become an open relay for everyone lest you end up on the Internet blacklists.  Most mail servers allow you to specify IP addresses for which they can relay.  This will let the outbound mail flow.


    Ryan Hanisco MCSE, MCTS:SQL 2005, Project+
    techsterity.wordpress.com
    Wednesday, January 26, 2011 9:48 PM
  • What if we have setup anonymous relay and we are getting the following error:

    TF53010: The following error has occurred in a Team Foundation component or extension:
    Date (UTC): 2/18/2011 6:34:34 PM
    Machine: TFSSERVER
    Application Domain: TfsJobAgent.exe
    Assembly: Microsoft.TeamFoundation.Framework.Server, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; v2.0.50727
    Service Host:
    Process Details:
      Process Name: TFSJobAgent
      Process Id: 2256
      Thread Id: 4876
      Account name: Domain\tfsservice

    Detailed Message: TF271001: An error occurred while attempting to send an e-mail notification to the following address: dave@Company.com. Further e-mail notification errors that occur within the next five minutes might not be logged. Verify that the e-mail notification settings are correct in the Team Foundation Administration Console.
    Exception Message: Mailbox unavailable. The server response was: 5.7.1 Client does not have permissions to send as this sender (type SmtpException)

    Exception Stack Trace:    at System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response)
       at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, SmtpFailedRecipientException& exception)
       at System.Net.Mail.SmtpClient.Send(MailMessage message)
       at Microsoft.TeamFoundation.JobService.Extensions.Core.NotificationJobExtension.SendEmail(TeamFoundationRequestContext requestContext, TeamFoundationNotification notification)

     

    Friday, February 18, 2011 7:09 PM
  • *** Update ***

    I've found a solution:

    The tfs service account (to start the Visual Studio Team Foundation Background Job Agent) and email alert account (email from address in TFS Administration Console) must be the same and this account must be enabled to handle emails for sending and receiving.

    *************

     

    Hi there,

    is there maybe a solution for that issue from Allen?

    We've got the same error message but we've no solution or any other idea. 

    Please help.

     

    Regards


    • Edited by mschworck Friday, January 13, 2012 12:48 PM
    Friday, January 13, 2012 10:59 AM
  • I just want to say this just worked for me as well. I was getting the same error when users were trying to change the "from" address when sending email through web access. I just had one of our exchange admins add the IP addresses of our app tiers to the smtp server to "allow to relay." They also verified our SMTP server allows anonymous access.
    Tuesday, January 24, 2012 5:23 PM
  • Hi, the problem in this case is related with the service "TFSJobAgent" user, this user must be a registered in the SMTP Server with a valid mailbox
    Wednesday, July 18, 2012 2:51 PM