problem with Database mail:All mails have Unsent status

  • We have setup Database Mail on SQL SERVER 2008 R2 (RTM).Since yesterday,Database Mail stopped working. I did the following checking and seems everything is ok

    1-Database Mail is enabled

    2-mails are being sent by sysadmin account

    3- Database Mail is started

    4-I checked and mail server is accessible from SQL host(using ping ,telnet ServerName 25)

    When I checked the msdb.dbo.sysmail_Allitems,All emails had unsent status.

    I would appreciate if someone help me on this.

    Thanks

  • run this query, and review the err.description:

    they probably all have the same error message..it might say 5.7.1 relaying prohibited, or 551 mailserver not found, etc.

    post one of those error messages so we can help debuga bit more.

    SELECT

    err.[description],

    fail.*

    FROM [msdb].[dbo].[sysmail_event_log] err

    inner join [msdb].[dbo].[sysmail_faileditems] fail

    ON err.mailitem_id = fail.mailitem_idt_id AND T.EventSubClass = V.subclass_value

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Thanks for your reply

    Here is the error messages,that I found:

    The mail could not be sent to the recipients because of the mail server failure.

    (Sending Mail using Account 1 (2012-06-02T13:14:37). Exception Message: Could not connect to mail server. (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond [My_IPAddress]:25). ).

    When I used telnet [My_IPAddress] 25,It successfully connect to the mailserver.

  • ok don't telnet by ip address, try to go to the mx record: mail.yoursever.com or whatever.

    the DNS resolution seems to be the issue, i'm thinking...either DNS or name change?

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Is this a new mail server that you've set up or is it one that used to work now all of a sudden doesn't work?

    If it's a new one you've set up, I believe depending on whether or not your domain is 2003, your network admin will have to allow the server to relay mail (this happens in the exchange admin).

    If that's not it, I've seen this error occur when your mail server requires authentication, but the mail server you're trying to send mail from it has been set up as anonymous (which is the default)

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • Thanks for your replies.This database mail setup used to work,but suddenly stopped working.As I wrote before,I am able to ping and telnet the mailserver(mashine).Regarding authentication,that setting is used in all of our servers and all of them are working fine.It's using "Windows Authentication using database Engine service credentials".

  • Aspet Golestanian Namagerdi (8/10/2012)


    Thanks for your replies.This database mail setup used to work,but suddenly stopped working.As I wrote before,I am able to ping and telnet the mailserver(mashine).Regarding authentication,that setting is used in all of our servers and all of them are working fine.

    can you try ping or traceroute to mail.yourserver.com (or whatever the mx record is..not the IP address) formt eh sqls erver? also nslookup mail.yourserver.com ?

    i'm still thinking it's a DNS resolution thing.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • @lowell +1

    (makes sense considering it used to work, but recently stopped)

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • I tried

    ping mail.OurServer.com

    telnet mail.OurServer.com 25

    nslookup mail.OurServer.com

    and in all cases it worked correctly and successfully .

  • Aspet Golestanian Namagerdi - Friday, August 10, 2012 9:46 AM

    I tried ping mail.OurServer.com telnet mail.OurServer.com 25 nslookup mail.OurServer.comand in all cases it worked correctly and successfully .

    Did you find the solution, I am facing the same situation.

  • Chandan you would probably get better, more specific help if you start a new thread, and fully describe the errors you get and what you've tried so far. did you try any of the diagnosis SQL 's in this thread? is there an error in the mail logs?

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 11 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic. Login to reply