fetchmail-friends
[Top] [All Lists]

[fetchmail]Daemon crashes upon auth fail? (Was: Make daemon warn me when auth fails)

2002-04-26 02:35:46
I'm on 5.9.11 - additional config details down below.

It appears that fetchmail in daemon mode terminates in an uncontrolled
manner when it encounters authentication failure. The reasons I
believe so are

     1. No trace whatsoever in the syslog neither of the auth fail nor
        of the termination ("normal" fetchmail messages are logged
        though, so my syslog.conf should be OK)

     2. Next time I restart fetchmail, It says "removing stale
        lockfile"

These are the last two lines of my syslog after I provoked an auth
fail by editing fetchmailrc:

------------------------------------------------------------
Apr 26 08:55:04 cbe1080 fetchmail[716]: sleeping at Fri, 26 Apr 2002 08:55:04 
+0200 (MET DST)
Apr 26 09:00:04 cbe1080 fetchmail[716]: restarting fetchmail 
(/home/etxbwir/.fetchmailrc changed)
------------------------------------------------------------

When operating in non-daemon mode, it works as expected, i. e. the
auth fail event is syslogged:

------------------------------------------------------------
Apr 26 09:48:07 cbe1080 fetchmail[6488]: No mail for etxbwir(_at_)EMD_SE1 at 
ESEALNT442.al.sw.ericsson.se                    <--- password ok here
Apr 26 09:49:40 cbe1080 fetchmail[6492]: Authorization failure on 
etxbwir(_at_)EMD_SE1@ESEALNT442.al.sw.ericsson.se          <--- password hosed 
now
Apr 26 09:49:40 cbe1080 fetchmail[6492]: Query status=3 (AUTHFAIL)
------------------------------------------------------------

When preparing the config details found below, I noticed that the
behavior is different when invoking fetchmail with `-v -v'. Then,
things *do* get syslogged, and the daemon keeps on running. I suppose
this is the intended behavior? It could be questioned though if it is
meaningful to go on after an authentication failure - I guess it's
normally not a transient error. In our site it will cause account
blocking after three failed attempts.

Related to this, I'd like to add an item to the feature wish-list: add
an option that makes fetchmail send a warning mail upon auth fail
(well really upon any possible reason that causes its termination),
much the way it used to be in the umm, 4.6.x (?) days. In previous
posts on this topic I've been recommended to monitor the syslog, but
no matter how you put it: you end up with yet another daemon that
watches the fetchmail daemon (possibly via syslog). And how about the
health of *that* daemon?

Here are my config details:

%> uname -a
SunOS cbe1080 5.7 Generic_106541-18 sun4u sparc SUNW,Ultra-5_10
%> gcc -dumpversion
2.95.1
%> cat myConfigure
./configure --enable-NTLM --prefix=/home/etxbwir/fetchmail/5.9.11 
--with-included-gettex --disable-nls
%> cat fetchmailrc
# Fetchmail run control file for etxbwir

set daemon 300;

set syslog

poll ESEALNT442.al.sw.ericsson.se
  proto IMAP username etxbwir(_at_)EMD_SE1 password ***** is etxbwir here;

smtphost cbesmtp;

fetchall;
%> fetchmail -V
This is fetchmail release 5.9.11+NTLM
SunOS cbe1080 5.7 Generic_106541-18 sun4u sparc SUNW,Ultra-5_10
Taking options from command line and /home/etxbwir/.fetchmailrc
Poll interval is 300 seconds
Idfile is /home/etxbwir/.fetchids
Progress messages will be logged via syslog
Fetchmail will forward misaddressed multidrop messages to etxbwir.
Options for retrieving from etxbwir(_at_)EMD_SE1@ESEALNT442.al.sw.ericsson.se:
  True name of server is ESEALNT442.al.sw.ericsson.se.
  Protocol is IMAP.
  All available authentication methods will be tried.
  Server nonresponse timeout is 300 seconds (default).
  Default mailbox selected.
  All messages will be retrieved (--all on).
  Fetched messages will not be kept on the server (--keep off).
  Old messages will not be flushed before message retrieval (--flush off).
  Rewrite of server-local addresses is enabled (--norewrite off).
  Carriage-return stripping is disabled (stripcr off).
  Carriage-return forcing is disabled (forcecr off).
  Interpretation of Content-Transfer-Encoding is enabled (pass8bits off).
  MIME decoding is disabled (mimedecode off).
  Idle after poll is disabled (idle off).
  Nonempty Status lines will be kept (dropstatus off)
  Delivered-To lines will be kept (dropdelivered off)
  Messages will be SMTP-forwarded to: cbesmtp
  Recognized listener spam block responses are: 571 550 501 554
  Single-drop mode: 1 local name(s) recognized.
  No UIDs saved from this host.

Starting fetchmail with -v -v yields the following syslog:

Apr 26 10:44:34 cbe1080 fetchmail[6530]: starting fetchmail 5.9.11 daemon 
Apr 26 10:44:34 cbe1080 fetchmail[6530]: 5.9.11 querying 
ESEALNT442.al.sw.ericsson.se (protocol IMAP) at Fri, 26 Apr 2002 10:44:34 +0200 
(MET DST): poll started
Apr 26 10:44:34 cbe1080 fetchmail[6530]: IMAP< * OK Microsoft Exchange 
IMAP4rev1 server version 5.5.2654.31 (ESEALNT442.al.sw.ericsson.se) ready
Apr 26 10:44:34 cbe1080 fetchmail[6530]: IMAP> A0001 CAPABILITY^M
Apr 26 10:44:34 cbe1080 fetchmail[6530]: IMAP< * CAPABILITY IMAP4 IMAP4rev1 
IDLE LITERAL+ LOGIN-REFERRALS MAILBOX-REFERRALS NAMESPACE AUTH=NTLM
Apr 26 10:44:34 cbe1080 fetchmail[6530]: IMAP< A0001 OK CAPABILITY completed.
Apr 26 10:44:34 cbe1080 fetchmail[6530]: Protocol identified as IMAP4 rev 1
Apr 26 10:44:34 cbe1080 fetchmail[6530]: IMAP> A0002 AUTHENTICATE NTLM
Apr 26 10:44:34 cbe1080 fetchmail[6530]: IMAP< +
Apr 26 10:44:34 cbe1080 fetchmail[6530]: IMAP> 
TlRMTVNTUAABAAAAB7IAAAcABwAgAAAABwAHACcAAABldHhid2lyRU1EX1NFMQ==
Apr 26 10:44:34 cbe1080 fetchmail[6530]: IMAP< + 
TlRMTVNTUAACAAAAEAAQADAAAAAFggEAPafkp7WrSsYAAAAAAAAAAAAAAABAAAAARQBSAEQAUwBFADEAWAAxAA==
Apr 26 10:44:34 cbe1080 fetchmail[6530]: IMAP> 
TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAA4ADgBwAAAADgAOAH4AAAAOAA4AjAAAAAAAAABaAAAABYIBAPPOyMdjGjNGkLyYo3PdkGObS6TJA/wRs3yzBD/ueeoDtddysPU6rxD9skzwUr8W1UUATQBEAF8AUwBFADEAZQB0AHgAYgB3AGkAcgBlAHQAeABiAHcAaQByAA==
Apr 26 10:44:37 cbe1080 fetchmail[6530]: IMAP< A0002 NO Logon failure
Apr 26 10:44:37 cbe1080 fetchmail[6530]: IMAP> A0003 *
Apr 26 10:44:37 cbe1080 fetchmail[6530]: IMAP> A0004 LOGIN 
"etxbwir(_at_)EMD_SE1" "*"^M
Apr 26 10:44:37 cbe1080 fetchmail[6530]: IMAP< A0003 BAD Protocol Error: 
"Unknown command found"
Apr 26 10:44:46 cbe1080 fetchmail[6530]: IMAP< A0004 NO Logon failure: unknown 
user name or bad password.
Apr 26 10:44:46 cbe1080 fetchmail[6530]: IMAP> A0005 *
Apr 26 10:44:46 cbe1080 fetchmail[6530]: Authorization failure on 
etxbwir(_at_)EMD_SE1@ESEALNT442.al.sw.ericsson.se
Apr 26 10:44:46 cbe1080 fetchmail[6530]: IMAP> A0006 LOGOUT^M
Apr 26 10:44:46 cbe1080 fetchmail[6530]: IMAP< A0005 BAD Protocol Error: 
"Unknown command found"
Apr 26 10:44:46 cbe1080 fetchmail[6530]: IMAP< * BYE Microsoft Exchange 
IMAP4rev1 server version 5.5.2654.31 signing off
Apr 26 10:44:46 cbe1080 fetchmail[6530]: IMAP< A0006 OK LOGOUT completed.
Apr 26 10:44:46 cbe1080 fetchmail[6530]: 5.9.11 querying 
ESEALNT442.al.sw.ericsson.se (protocol IMAP) at Fri, 26 Apr 2002 10:44:46 +0200 
(MET DST): poll completed
Apr 26 10:44:46 cbe1080 fetchmail[6530]: Query status=3 (AUTHFAIL)
Apr 26 10:44:46 cbe1080 fetchmail[6530]: Deleting fetchids file.
Apr 26 10:44:46 cbe1080 fetchmail[6530]: sleeping at Fri, 26 Apr 2002 10:44:46 
+0200 (MET DST)

Like I said, in this case, things seem to work as intended - but not
when invoked without the `-v -v'.

Regards
-- 
Björn Wirén


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