fetchmail-friends
[Top] [All Lists]

Re: [fetchmail]Exit code 0 after AUTHFAIL

2001-09-24 07:07:38
Bjoern Voigt <bjoern(_at_)cs(_dot_)tu-berlin(_dot_)de>:
Hello Fetchmail-Friends,

There is probably a bug in Fetchmail's handling of exit codes. I
tested fetchmail-5.9.0 (and some earlier versions) with POP3/SSL and
IMAP/SSL. In this case I used a wrong password, but also some internal
problems of my email provider show the same situation:

      $ fetchmail -f .fetchmailrc-smtp-b4-smtp
      fetchmail: imap.web.de key fingerprint: 
9D:A2:24:DB:25:AE:D1:27:A9:E8:71:C8:C3:33:CE:52
      fetchmail: Authorization failure on <SOME-USER>@imap.web.de
      fetchmail: Query status=3 (AUTHFAIL)
      $ echo $?
      0
      $

But the exit code should be 2 (from manual page):

       3      The  user authentication step failed.  This usually
              means that a bad user-id, password, or APOP id  was
              specified.   Or  it  may mean that you tried to run
              fetchmail under circumstances where it did not have
              standard input attached to a terminal and could not
              prompt for a missing password.

I need correct exit codes for a "POP3/IMAP before
SMTP"-authentication.

Due to a weakness in POP3, server errors at startup look like authentication
errors to fetchmail.  The fix is to switch to IMAP.
-- 
                <a href="http://www.tuxedo.org/~esr/";>Eric S. Raymond</a>

The spirit of resistance to government is so valuable on certain occasions, 
that I wish it always to be kept alive.  It will often be exercised when 
wrong, but better so than not to be exercised at all. I like a little 
rebellion now and then. -- Thomas Jefferson, letter to Abigail Adams, 1787


<Prev in Thread] Current Thread [Next in Thread>