in reply to Re: Re: Re: POP access using System users and DB authentication
in thread POP access using System users and DB authentication

rdfield, I have done (DB Authentication) using DBI module and it works for me. But i am not able to download the mails to client machine. Tested it (using telnet)and accepting db authentication and while using LIST command it shows error "-ERR not logged in yet". Why it shows this error. Please post your comment here. Thanks and Regards sur
  • Comment on Re: Re: Re: Re: POP access using System users and DB authentication

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: POP access using System users and DB authentication
by rdfield (Priest) on Oct 22, 2002 at 15:11 UTC
    Unfortunately there isn't enough detail in your posts to make any sort of educated guess as to what is happening, but my feeling is that you are trying to solve too big a problem. Allow me to explain:

    You seem to have written a large amount of code to solve your complete problem. Now that it compiles, you are running it only to find that it does not give you the answers you expect. This type of programming is so common that it has a name - 'big bang programming', and it is not to be recommended.

    I suggest that you start to analyze your problem using a more iterative approach:

    • break your problem up into smaller, more managable chunks
    • Tackle each 'chunk' seperately
    • Test the output of each chunk of code thoroughly (known as 'unit testing')
    • Make sure that each 'chunk' (or, more commonly, 'sub') gives you the expected output for each set of input.
    • Verify this input <=> output mapping very carefully indeed.
    • Repeat until you are satisfied that each 'sub' is giving the expected responses
    After the individual 'sub's are working to your satisfaction, you can start linking the 'subs' together. You should only attempt to string together an extra 'sub' for each iteration of your testing. Make sure that each combination of 'subs' gives you the expected output for each input. You will more easily identify which 'sub' is causing your problem since the actual output will not match the expected output.

    Give yourself as much information as possible by either running your script with the '-d' flag on the command line ('debug' mode) or by liberally sprinkling your code with informative 'print' statements. These 'print' statements are especially useful in the following circumstances:

    • just before a decision (e.g 'if' or 'unless')
    • just after a 'decision' ro verify that the expected path has been taken
    • after assignments, especially complex ones

    After following this advice you should be able to break the problem down to the most important and relevent lines (say 12 or 15) and be able to post a very short and direct question to this forum (e.g. for the given input (blah blah blah) the following code produces (x x x x) when I was expecting (y y y y), can somebody please explain?)

    rdfield

      rdfield, some how i find out the reason for getting the error message. I am getting lock after reading the mail. Not able to unlik the lock and mail downloading to client is not correct. I will go through it and inform. Thanks for your comment