locked
TFS notification with Exchange 2007 RRS feed

  • Question

  • Hello!

    I have the same eventlog TF50282 message that others, but nothing fits me as solution. All is working properly but mails are not recieved. We`ve upgraded from Exchange 2003 to Exchange 2007 so the hostname have changed too. I`ve fixed the mailserver name in Services\web.config but that didn`t helped. We were sending from unexistent mailbox before. When the problem appiered I`ve tried to bind a mailbox to tfsservices account but that didn`t helped. What`s wrong with that mail server checking?

     

    TF53010: An unexpected condition has occurred in a Team Foundation component. The information contained here should be made available to your site administrative staff.

    Technical Information (for the administrative staff):

    Date (UTC): 19.06.2007 4:34:31

    Machine: XXXXX

    Application Domain: /LM/W3SVC/3/Root/services-2-128267012478189877

    Assembly: Microsoft.TeamFoundation.Server, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; v2.0.50727

    Process Details:

    Process Name: w3wp

    Process Id: 3512

    Thread Id: 1812

    Account name: NEXUM\nexumservice

    Detailed Message: TF50282: Could not connect to the following e-mail server: 10.10.10.XX

    Error message: System.Net.Mail.SmtpException: Syntax error, command unrecognized. The server response was: 5.7.3 Authentication unsuccessful

    at System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response)

    at System.Net.Mail.MailCommand.Send(SmtpConnection conn, Byte[] command, String from)

    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.Server.WebServiceNotification.SendOneEmail(Boolean plaintext, String to)

    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

    Tuesday, June 19, 2007 9:10 AM

Answers

  • Our exchange admin enable anonymous relaying for the TFS Server now. He said the exchange 2003 server was
    originally configured so. After the echange upgrade from exchange 2003 to 2007 he did not set this switch in exchange
    configuration.
     
    After the configuration in the exchange the alert sending in TFS works fine.
     
    Monday, July 9, 2007 12:59 PM

All replies

  • Hi:

     

     

      Could you please check if there is any firewall which blocks port 25.

     

     Good luck.
    Monday, June 25, 2007 1:22 PM
  • Thanks for at least one answer. Yes I`m sure that smtp port is open because I`m sending mails from this server with other system. This is happening only with Team Foundation mail system. Can somebody can give at least one good clue? :/
    Monday, June 25, 2007 1:53 PM
  • We've got the same problem after the upgrade from Exchange 2003 to Exchange 2007. In the eventmessage is following written:

    "Error message: System.Net.Mail.SmtpException: Syntax error, command unrecognized

    The server response was: 5.7.3 Authentication unsuccessful"

     

    I belive this is a TFS issue. Did anybody have a workaround to this problem?

    Wednesday, June 27, 2007 1:25 PM
  • We are experiencing exactly the same issue after upgrading to Ex2007 from Ex2003. Using Wireshark, I have verified that the server is receiving SMTP commands:

     

    220 ex2007.contoso.com Microsoft ESMTP MAIL Service ready at Thu, 28 Jun 2007 18:06:32 -0700

    EHLO TFSNOTIFY

    250-ex2007.contoso.com Hello [192.168.1.100]

    250-SIZE

    250-PIPELINING

    250-DSN

    250-ENHANCEDSTATUSCODES

    250-STARTTLS

    250-X-ANONYMOUSTLS

    250-AUTH GSSAPI NTLM

    250-X-EXPS GSSAPI NTLM

    250-8BITMIME

    250-BINARYMIME

    250-CHUNKING

    250 XEXCH50

     

    AUTH gssapi XXXXXXXXXXXXX<BASE64CODE HERE>XXXXXXXXXXXXX=

    MAIL FROM:<tfsnotify@contoso.com>

    535 5.7.3 Authentication unsuccessful

     

    This has really stumped me - your post suggests that there have been other solutions posited - care to enlighten me?

     

    Thanks!

    Friday, June 29, 2007 3:10 AM
  • Of what I`m sure that this is not TFS issue. This is some switch in Exchange because I`ve tried to send mail with simple mailtest program which references on System.Mail namespace. I`ve got the same error msg!
    Thursday, July 5, 2007 8:38 AM
  • Also I have written a small testprogram:

     

    Code Snippet

     

    MailMessage eMail = new MailMessage("foo@bar.com", "foo@bar.com");

    SmtpClient SmtpMail = new SmtpClient("Exchange2007Server");

    eMail.Subject = "Test E-Mail";

    eMail.Body = "Hello World";

    SmtpMail.Send(eMail);

     

    I execute it on my Team Server under the team server user and it works fine. I get the email. But if the

    team server try to send a alert msg I get the exception.

     

    I don't know what the problem is ...

    Friday, July 6, 2007 8:42 AM
  • My code

     

    string Host = host;
                    string FromAddress = from;
                    string ToAddress = to;

                    SmtpClient client = new SmtpClient(Host);
                    client.DeliveryMethod = SmtpDeliveryMethod.Network;
                    MailMessage mm = new MailMessage(FromAddress, ToAddress);
                   
                    mm.Body = "TestBody";
                    mm.Subject = "TestSubject";

                  client.UseDefaultCredentials = true;
                    client.Port = 25;
                    mm.BodyEncoding = System.Text.Encoding.UTF8;
                    mm.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure;
                    MessageBox.Show(mm.DeliveryNotificationOptions.ToString());
                    client.Send(mm);

     

    We can get that error when changing UseDefaultCredentials

    Friday, July 6, 2007 11:47 AM
  • We were able to resolve this on our end - of sorts.

     

    The first thing that we had to do was enable anonymous relaying on the Exchange server from internal IP addresses (http://technet.microsoft.com/en-us/library/bb232021.aspx).

    Secondly, we set the SMTP server on the TFS box for anonymous auth. and pointed smart hosts to the Exchange 2007 box. TFS, of course, was set to use the SMTP service on the TFS box.

    The reason I say "of sorts" is that clients sending mail directly to the exchange server were still rejected, even after enabling anonymous relay from internal IPs. They were still attempting to auth using GSSAPI NTLM methods and failing. This is more of a workaround than a solution. Other non-TFS clients are able to relay directly through the exchange server, so it appear to be TFS related.

    I haven't had time to pursue a true resolution, but once I dig out of this Exchange 2007 migration world I'm in I'll have another go at it.
    Saturday, July 7, 2007 3:15 PM
  • Our exchange admin enable anonymous relaying for the TFS Server now. He said the exchange 2003 server was
    originally configured so. After the echange upgrade from exchange 2003 to 2007 he did not set this switch in exchange
    configuration.
     
    After the configuration in the exchange the alert sending in TFS works fine.
     
    Monday, July 9, 2007 12:59 PM