# Matthias Andree <matthias.andree@gmx.de>
# Requires Python with Tkinter, and the following OS-dependent services:
# posix, posixpath, socket
-version = "1.49"
+version = "1.52 $Revision$"
from Tkinter import *
from Dialog import *
self.warnings = 3600 # Size warning interval (see tunable.h)
self.fetchlimit = 0 # Max messages fetched per batch
self.fetchsizelimit = 100 # Max message sizes fetched per transaction
- self.fastuidl = 10 # Do fast uidl 9 out of 10 times
+ self.fastuidl = 4 # Do fast uidl 3 out of 4 times
self.batchlimit = 0 # Max message forwarded per batch
self.expunge = 0 # Interval between expunges (IMAP)
self.ssl = 0 # Enable Seccure Socket Layer
4. A protocol to use (POP, IMAP, ETRN, etc.)
-5. A polling interval.
+5. A poll interval in seconds.
+ If 0, fetchmail will run in the foreground once when started.
+ If > 0, fetchmail will run in the background and start a new poll
+ cycle after the interval has elapsed.
-6. Options to fetch old messages as well as new, uor to suppress
+6. Options to fetch old messages as well as new, or to suppress
deletion of fetched message.
The novice-configuration code will assume that you want to forward mail
with code as shoddy as GroupWise seems to be, you will probably pay
for it with other problems.<p>
-"""
- if string.find(greetline, "Netscape IMAP4rev1 Service 3.6") > 0:
- warnings = warnings + """
-This server violates the RFC2060 requirement that a BODY[TEXT] fetch should
-set the messages's Seen flag. As a result, if you use the keep option the
-same messages will be downloaded over and over.
-
"""
if string.find(greetline, "InterChange") > 0:
warnings = warnings + """
title = "Autoprobe of " + realhost + " succeeded"
confirm = "The " + protocol + " server said:\n\n" + greetline + warnings
self.protocol.set(protocol)
+ self.service.set(defaultports[protocol])
confwin.title(title)
confwin.iconname(title)
Label(confwin, text=title).pack()
#
# Process options
- (options, arguments) = getopt.getopt(sys.argv[1:], "df:h")
+ (options, arguments) = getopt.getopt(sys.argv[1:], "df:hV", ["help",
+ "version"])
dump = rcfile = None;
for (switch, val) in options:
if (switch == '-d'):
dump = TRUE
elif (switch == '-f'):
rcfile = val
- elif (switch == '-h'):
+ elif (switch == '-h' or switch == '--help'):
print """
-Usage: fetchmailconf [-d] [-f fetchmailrc]
--d - dump configuration (for debugging)
--f fmrc - read alternate fetchmailrc file
+Usage: fetchmailconf {[-d] [-f fetchmailrc]|-h|--help|-V|--version}
+ -d - dump configuration (for debugging)
+ -f fmrc - read alternate fetchmailrc file
+--help, -h - print this help text and quit
+--version, -V - print fetchmailconf version and quit
"""
sys.exit(0)
+ elif (switch == '-V' or switch == '--version'):
+ print "fetchmailconf %s" % version
+ print """
+Copyright (C) 1997 - 2003 Eric S. Raymond
+Copyright (C) 2005 - 2006 Matthias Andree
+fetchmailconf comes with ABSOLUTELY NO WARRANTY. This is free software, you are
+welcome to redistribute it under certain conditions. Please see the file
+COPYING in the source or documentation directory for details. """
+ sys.exit(0)
# Get client host's FQDN
hostname = socket.gethostbyaddr(socket.gethostname())[0]