Indy 10.5.8/Delphi 5 (SMTP) getting "... temporary failure"

Everything has been working fine for over a year, but now a customer is getting the above error. Actually, the program simply bombs on their system. That error only shows up when running inside Delphi. It never makes it outside of Indy code before bombing the program.

Two things: this only happens after several e-mails are sent in a short period of time. Also, this was not a problem before, when the program ran MUCH slower, due to BDE/SQL speed issues. We are now using the Advantage database server, which makes everything run much faster.

We know there is a problem if we go over 250 e-mails, but we haven't reached that level yet, when it bombs. So, what does this indicate, and how do we fix it?

We are looking into moving to the latest version of Indy. Where do we get version 10.6, and will this fix the problem?
0
Keith
5/7/2013 12:51:58 AM
embarcadero.delphi.winsock 1874 articles. 2 followers. Follow

3 Replies
904 Views

Similar Articles

[PageSpeed] 3

Keith wrote:

> Everything has been working fine for over a year, but now a customer
> is getting the above error.

That is not a socket error message, OS error message, or Indy error message. 
 So it has to be an error message from the SMTP server.

> Actually, the program simply bombs on their system. That error only shows
> up when running inside Delphi. It never makes it outside of Indy code before
> bombing the program.

Please elaborate.  What do you mean by "bombs" exactly?  Does the entire 
program just disappear?  When running inside of the IDE, what is the complete 
error message, and call stack?

> Two things: this only happens after several e-mails are sent in a
> short period of time. Also, this was not a problem before, when the
> program ran MUCH slower, due to BDE/SQL speed issues. We are now
> using the Advantage database server, which makes everything run
> much faster.

Maybe the SMTP server itself is also running slow, and your old code allowed 
the server to keep up, and now it is not?

> We know there is a problem if we go over 250 e-mails, but we haven't
> reached that level yet, when it bombs. So, what does this indicate,
> and how do we fix it?

Can't answer that without first identifying where the error is actually coming 
from.

> We are looking into moving to the latest version of Indy. Where do we
> get version 10.6

From Indy's SVN or nightly snapshots.

http://www.indyproject.org/Sockets/Docs/Indy10Installation.EN.aspx

> and will this fix the problem?

Doubtful.

--
Remy Lebeau (TeamB)
0
Remy
5/7/2013 2:11:29 AM
> {quote:title=Keith Shultz wrote:}{quote}
> Everything has been working fine for over a year, but now a customer is getting the above error. Actually, the program simply bombs on their system. That error only shows up when running inside Delphi. It never makes it outside of Indy code before bombing the program.
> 
> Two things: this only happens after several e-mails are sent in a short period of time. Also, this was not a problem before, when the program ran MUCH slower, due to BDE/SQL speed issues. We are now using the Advantage database server, which makes everything run much faster.
> 
> We know there is a problem if we go over 250 e-mails, but we haven't reached that level yet, when it bombs. So, what does this indicate, and how do we fix it?
> 
> We are looking into moving to the latest version of Indy. Where do we get version 10.6, and will this fix the problem?

By bombing I mean that Windows pops the message Notify.exe has stopped working.  We added messages between each line so that we were able to isolate the line of code where the program bombs to the following
NMSMTP.Send(IdMessage);

Here is our code:

    try
      Try              {ks 11/17/2011}
        NMSMTP.ConnectTimeout := 10000;
        NMSMTP.ReadTimeout := 10000;
        NMSMTP.Connect{(1000)};
        NMSMTP.Send(IdMessage);
      except on E:Exception do
        begin
          sError := 'Error: ' + E.Message + '  Subject: ' + sSubject + '  Body: ' + sBody;
          IniFile := nil;
          sIniPath := sGetDBPath(frmTblSys.tblSys_.AdsConnection)+'\EmailSend';
          if not (DirectoryExists(sIniPath)) then
          begin
            CreateDir(sIniPath);
          end;

          DecodeTime(Time, Hour, Min, Sec, Msec);
          sTimeStamp := DateToStr(Date) + ' at ' +
                 StringReplace(Format('%2d:%2d:%2d.%2d', [Hour, Min, Sec, MSec]), ' ', '0',[rfReplaceAll]);
          try
            IniFile := TIniFile.Create(sIniPath + '\EMAILSEND.INI');
            IniFile.WriteString('Error', sTimeStamp, sError);
          finally
            IniFile.Free;
          end;
          sleep(60000); // Wait 1 minute
        end;
      end;
    Finally
        if NMSMTP.Connected then NMSMTP.Disconnect;
    End;
    NMSMTP.Free;
    IdMessage.Free;
    TextLines.Free;
  slTemp.Free;

The error message we see is '...temporary failure'

Running our program on the same system today produces the Windows message 'Notify.exe has stopped working'  the first time it tries to send.

Thank you for your input.
0
Keith
5/7/2013 1:19:09 PM
Keith wrote:

> By bombing I mean that Windows pops the message Notify.exe has stopped
> working.

Then either you did something to deadlock the main thread, or an exception 
was raised that completely stopped the main thread message loop (which is 
very hard to do in the main thread since Delphi has default exception handlers 
in place to prevent that).

> Here is our code:

You are not protecting yourself from any potential errors occuring in Disconnect() 
(which sends a QUIT command to the server, so it can potentially raise an 
exception of its own), or in sGetDBPath() or TIniFile as well.  Try this 
instead:

{code:delphi}
try
  NMSMTP.ConnectTimeout := 10000;
  NMSMTP.ReadTimeout := 10000;
  NMSMTP.Connect;
  try
    NMSMTP.Send(IdMessage);
  finally
    NMSMTP.Disconnect;
  end;
except
  on E: Exception do
  begin
    try
      sError := 'Error: ' + E.Message + '  Subject: ' + sSubject + '  Body: 
' + sBody;
      sIniPath := sGetDBPath(frmTblSys.tblSys_.AdsConnection)+'\EmailSend';
      ForceDirectories(sIniPath);
      sTimeStamp := FormatDateTime(Now, 'ddddd "at" hh:nn:ss.zzz');
      IniFile := TIniFile.Create(sIniPath + '\EMAILSEND.INI');
      try
        IniFile.WriteString('Error', sTimeStamp, sError);
      finally
        IniFile.Free;
      end;
    except
      // do something else
    end;
    Sleep(60000); // Wait 1 minute
  end;
end;
NMSMTP.Free;
IdMessage.Free;
TextLines.Free;
slTemp.Free;
{code}

> The error message we see is '...temporary failure'

As I mentioned earlier, that is not a socket error message, OS error message, 
or Indy error message, so it has to be an SMTP server error message.  You 
can confirm that by checking if the exception being raised is an EIdSMTPReplyError 
or not.

--
Remy Lebeau (TeamB)
0
Remy
5/7/2013 5:01:17 PM
Reply:

Similar Artilces:

Converting Delphi 2007 Indy 10.2.3 to Delphi 2009 Indy 10.5.5 [Edit]
Hello, I am currently attempting to port over a Delphi 2007 project that uses Indy 10.2.3 (very successfully) to Delphi 2009 and Indy 10.5.5 (I just got the latest development build this morning). I think I am running into an encoding issue, but am not sure. Specifically, IDHTTP with SSL calls an old CGI and the CGI returns a .zip file and I then save it to the disk. In 2007 and before this worked perfectly. In 2009, it is not. Here is the examples of the 2 different results (though cut way short in the post) I am getting back: 2007: 'PK'#3#4#$14#0#0#0#8#0'rLQ9žrPb€'#0...

Delphi 2009
Hello, I am using Delphi 2009 with a recent Indy 10.5.5 development snapshot. In my code I am using a TIDHttp with TIDSSLIOHandlerSocketOpenSSL. The Open SLL .dlls I am using is from the the indy website and are openssl-0.9.8k-i386-win32. The issue is, randomly, I am getting a socket error # 0 error. I never got this error with Delphi 2007 and Indy 10.2.3. Any help would be GREATLY appreciated! Thank you. The code looks something like this: var sHttpResult, sVar, sParam: string; ssHttpResult : TStringStream; slPostData : TStringList; begin IdSSL.CheckForDi...

[perl #31973] Re: "perl 5.8.2 (on Power PC) Can't locate lib.pm - ?"
> At this point, you should go back to whoever ... I am "on my own" - this came from "free" CD-ROM without support. >I don't know what this "fadsroot" stuff is. >Are you *sure* that this is what gets called when you do a plain 'perl -v'? One way to check is by >explicitly calling /fadsroot/usr/bin/perl -v my board NFS mounts /fadsroot from the Linux RedHat 9 Shrike Intel PC NFS server (i686) as a root directory. When I telnet (from my Windows XP laptop ... yet another machine ...) into NFS server I use /fadsroot. On the Powe...

RE: [perl #31973] Re: "perl 5.8.2 (on Power PC) Can't locate lib .pm - ?"
> So I have ONLY two alternatives: > > 1) Somehow "fix" installed power pc perl 5.8.2 - by adding > "missing" or > "misplaced" 5.8.2 perl module files > (such as lib.pm, Config.pm, etc. ) Although generally you need to make proper installation, in this particular case you could just get things working. First, tell us how you get that perl-5.8.2 You tried to build 5.8.5, but then switched to 582. Is it already-built binaries? Is it from some Linux distribution? If this is the case, usually it's not hard to make it just wo...

RE: [perl #31973] Re: "perl 5.8.2 (on Power PC) Can't locate lib .pm - ?"
> perl-5.8.2 - came as pre-built binaries - from "free" > Arabella (partner of > Motorola/Freescale) CD-ROM (came with the board) - without support and > without any documentation (fadsroot). I copied it ("fadsroot > directory" from > that CD-ROM onto the disk drive of my Linux Red Hat 9 Shrike > Intel PC (NFS > server) and my board mounts it as root file system during the booting > (this is the intended use of "fadsroot"). ok. let us think those are valid binaries until proven otherwise. > Apparently there were also...

Groupwise 5.5 "offiles" folder getting HUGE
Hi everyone, Can someone give me a quick lesson on what exactly the "offiles" directory and its folders contains as mine is growing out of control and I need to determine if its because of my users not keeping their mailboxes clean and efficient or if its because of some sort of problem or "mail bomb" attack. There are approximately 300 folders under the offiles directory and some are empty, and some contain thousands of files. Whats my best bet on reducing the size of this directory? Do these folders contain the actual content of every users Groupwise acco...

edir 8.8.5: ndsconfig fails "Unable to get host IP address"
I am trying to add an edir 8.8.5 server to an existing tree that is all 8.8.1. We are building a test environment as follows: Code: -------------------- TESTTREE | +- o=IDV | +- cn=admin | +- ou=SERVICES | +- *oldserver* (192.168.40.69) | +- ou=SERVERS | +- *newserver* (192.168.40.70) -------------------- Here is the ndsconfig command that I am running in our test environment: Code: -------------------- ndsconfig add -e -p 192.168.40.69:524 -t TESTTREE -S newserver -n ou=servers.ou=services.o=idv -a cn=admin.o=idv...

List::MoreUtils-0.25_1 pass on 5.10.1RC0, 5.10.0, 5.8.9, 5.8.8
Following up on my report that List::MoreUtils-0.24 failed its tests on the "maint-5.10 snapshot (aka 'RC0')" that came out on July, and Tassilo later confirming the nature of the problem ... List::MoreUtils-0.25_1 was just released on CPAN, and I have tested it manually from a download of the tarball from search.cpan.org, and the problem appears to be fixed. A clean unpack/Makefile/make/make-test passes all tests on 4 versions of Perl on my same PPCG4/MacOSX10.5.7 machine: - 5.10.1RC0 built by me with defaults, custom install loc - 5.10.0 built by m...

perl 5.10.0 / osx 10.5.2 'make' dies at "error: redefinition of 'union semun'"
i'm building perl 5.10.0 on Darwin Kernel Version 9.2.0: Tue Feb 5 16:15:19 PST 2008; root:xnu-1228.3.13~1/RELEASE_PPC powerpc-apple-darwin9-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5531) currently, make dies @ "redef of 'union semun'" cd /build/perl-5.10.0 make ... In file included from miniperlmain.c:36: perl.h:5431: error: redefinition of 'union semun' make: *** [miniperlmain.o] Error 1 looking @ perl.h:5427 .... #ifdef HAS_SEM # include <sys/ipc.h> # include <sys/sem.h> # ifndef HAS_UNION_SEMUN /*...

Encoding issues with Delphi 2007 and Indy 10.5.5
Hi, I'm using the last snapshot of Indy 10 (Rev 3539) with Delphi 2007 under a French version of Windows Vista. I just discovered that some characters wasn't transferred correctly, probably since the Unicode update (AFAIK that worked fine with Indy 10.2.3). They are replaced by '?' on the other end of the connection. For instance, this code : procedure TForm2.Button1Click(Sender: TObject); begin IdTCPClient1.Connect; IdTCPClient1.IOHandler.WriteLn('£'); end; procedure TForm2.IdTCPServer1Execute(AContext: TIdContext); var S: string;...

"How A Bill Becomes Law" or "On getting changes into the Perl 5 core"
=46rom time to time we've discussed what it takes to get a proposed = change into Perl 5. In the course of a recent chat with Chip, I wrote = out the following guidance.=20 To a first approximation, it's a codification of what has already been = the policy. It's my hope that by writing this down, we can slightly = smooth out the "significant change" contribution process. I'd love = feedback on this before a variant of it ends up in perlpolicy.pod. It is = not my intent that this policy be applied to bug fixes or documentation = improvements. My current th...

Updated XPCOM linked to Xulrunner 5.0 not "registered" or "defined" in Firefox 5. What do I do next??
Hello, I was shipping two extensions, one for Firefox 3.6 and one for Firefox 4.0,= containing XPCOM components for Mac OS X. I knew that my extension would = not work with 5.0 but was unable to do anything until recently when Bug 653= 971 was fixed and the Xulrunner binaries for Mac OS X appeared. So I very carefully modified my build scripts to build a third extension in= the same way, for Firefox 5.0. Briefly, my scripts lipo together the four= Xulrunner binaries libmozalloc.dylib, libnspr4.dylib, libxpcom.dylib and l= ibxpcomglue_s.a into 32/64 bit fat binaries, link to th...

GWIA 5.5.5 & crowing "host down" messages
Hi! Occasionally GWIA 5.5.5's SEND & DEFERRED directories fill up with status (?) messages. Please check the sample at end of this message. Otherwise GWIA is working fine. The GWIA is run on NT 4.0 SP6a box which is located at DMZ zone. SMTP, POP3 & IMAP4 are allowed in and mail relaying is denied. The Orbs test ran fine and verifed that this box does not relay messages. When the problem occurs outbound SMTP from GWIA starts to slow down because the queues in SEND & DEFERRED directories starts to build up. After moving the "status" messages a...

BE 8.5 Abends on NetWare 5.0 "CPU Hog Detected by Timer"
Hello, Novell NetWare 5.00i 27 March 2000 Server name...............: <servername> OS Version................: v5.00 OS revision number........: 8 Product Version...........: v5.01 Product Revision Number...: 1 This Server is running without any changes for long months now. Same style abend happenden on 03 February 2005 1.27.40 26 January 2005 1.23.16 6 January 2005 1.25.30 never before that date, first abend logged is 28 December 2000 0.11.11 (page fault in SERVER.EXE) inbetween few page fault abends. I'm jus wondering why BE is hogging the CPU, and...

Web resources about - Indy 10.5.8/Delphi 5 (SMTP) getting "... temporary failure" - embarcadero.delphi.winsock

Resources last updated: 12/24/2015 11:13:31 AM