]> Pileus Git - ~andy/fetchmail/blobdiff - fetchmailconf
Update URL for OPIE at inner.net.
[~andy/fetchmail] / fetchmailconf
index b28a5d9639bbf1bd4adda4bf687be6d41b63d496..36bc99fd9be51da2ed246bec83aa32f6deed78fc 100755 (executable)
@@ -1,10 +1,11 @@
 #!/usr/bin/env python
 #
 # A GUI configurator for generating fetchmail configuration files.
-# by Eric S. Raymond, <esr@snark.thyrsus.com>.
+# by Eric S. Raymond, <esr@snark.thyrsus.com>,
+# Matthias Andree <matthias.andree@gmx.de>
 # Requires Python with Tkinter, and the following OS-dependent services:
-#       posix, posixpath, socket
-version = "1.43"
+#      posix, posixpath, socket
+version = "1.44"
 
 from Tkinter import *
 from Dialog import *
@@ -26,15 +27,15 @@ class Configuration:
        self.syslog = FALSE             # Use syslogd for logging?
        self.servers = []               # List of included sites
        Configuration.typemap = (
-           ('poll_interval',   'Int'),
+           ('poll_interval',   'Int'),
            ('logfile',  'String'),
            ('idfile',    'String'),
-           ('postmaster',      'String'),
-           ('bouncemail',      'Boolean'),
-           ('spambounce',      'Boolean'),
-           ('properties',      'String'),
+           ('postmaster',      'String'),
+           ('bouncemail',      'Boolean'),
+           ('spambounce',      'Boolean'),
+           ('properties',      'String'),
            ('syslog',    'Boolean'),
-           ('invisible',       'Boolean'))
+           ('invisible',       'Boolean'))
 
     def __repr__(self):
        str = "";
@@ -73,54 +74,52 @@ class Configuration:
 
 class Server:
     def __init__(self):
-       self.pollname = None            # Poll label
-       self.via = None                 # True name of host
-       self.active = TRUE              # Poll status
-       self.interval = 0               # Skip interval
-       self.protocol = 'auto'          # Default to auto protocol
-       self.port = 0                   # Port number to use
-       self.uidl = FALSE               # Don't use RFC1725 UIDLs by default
-       self.auth = 'any'               # Default to password authentication
-       self.timeout = 300              # 5-minute timeout
-       self.envelope = 'Received'      # Envelope-address header
-       self.envskip = 0                # Number of envelope headers to skip
-       self.qvirtual = None            # Name prefix to strip
-       self.aka = []                   # List of DNS aka names
-       self.dns = TRUE                 # Enable DNS lookup on multidrop
-       self.localdomains = []          # Domains to be considered local
-       self.interface = None           # IP address and range
-       self.monitor = None             # IP address and range
-       self.plugin = None              # Plugin command for going to server
-       self.plugout = None             # Plugin command for going to listener
-       self.netsec = None              # IPV6 security options
-       self.principal = None           # Kerberos principal
-        self.esmtpname = None          # ESMTP 2554 name
-        self.esmtppassword = None      # ESMTP 2554 password
-       self.tracepolls = FALSE         # Add trace-poll info to headers
-       self.users = []                 # List of user entries for site
+       self.pollname = None            # Poll label
+       self.via = None                 # True name of host
+       self.active = TRUE              # Poll status
+       self.interval = 0               # Skip interval
+       self.protocol = 'auto'          # Default to auto protocol
+       self.port = 0                   # Port number to use
+       self.uidl = FALSE               # Don't use RFC1725 UIDLs by default
+       self.auth = 'any'               # Default to password authentication
+       self.timeout = 300              # 5-minute timeout
+       self.envelope = 'Received'      # Envelope-address header
+       self.envskip = 0                # Number of envelope headers to skip
+       self.qvirtual = None            # Name prefix to strip
+       self.aka = []                   # List of DNS aka names
+       self.dns = TRUE                 # Enable DNS lookup on multidrop
+       self.localdomains = []          # Domains to be considered local
+       self.interface = None           # IP address and range
+       self.monitor = None             # IP address and range
+       self.plugin = None              # Plugin command for going to server
+       self.plugout = None             # Plugin command for going to listener
+       self.principal = None           # Kerberos principal
+       self.esmtpname = None           # ESMTP 2554 name
+       self.esmtppassword = None       # ESMTP 2554 password
+       self.tracepolls = FALSE         # Add trace-poll info to headers
+       self.users = []                 # List of user entries for site
        Server.typemap = (
            ('pollname',  'String'),
-           ('via',       'String'),
-           ('active',    'Boolean'),
+           ('via',       'String'),
+           ('active',    'Boolean'),
            ('interval',  'Int'),
            ('protocol',  'String'),
-           ('port',      'Int'),
-           ('uidl',      'Boolean'),
-           ('auth',      'String'),
+           ('port',      'Int'),
+           ('uidl',      'Boolean'),
+           ('auth',      'String'),
            ('timeout',   'Int'),
            ('envelope',  'String'),
            ('envskip',   'Int'),
            ('qvirtual',  'String'),
            # leave aka out
-           ('dns',       'Boolean'),
+           ('dns',       'Boolean'),
            # leave localdomains out
            ('interface', 'String'),
            ('monitor',   'String'),
-           ('plugin',    'String'),
+           ('plugin',    'String'),
            ('plugout',   'String'),
-            ('esmtpname', 'String'),
-            ('esmtppassword', 'String'),
-           ('netsec',    'String'),
+           ('esmtpname', 'String'),
+           ('esmtppassword', 'String'),
            ('principal', 'String'),
            ('tracepolls','Boolean'))
 
@@ -132,12 +131,12 @@ class Server:
        if self.via:
            res = res + (" via " + str(self.via) + "\n");
        if self.protocol != ServerDefaults.protocol:
-           res = res + " with proto " + self.protocol 
+           res = res + " with proto " + self.protocol
        if self.port != defaultports[self.protocol] and self.port:
            res = res + " port " + `self.port`
        if self.timeout != ServerDefaults.timeout:
            res = res + " timeout " + `self.timeout`
-       if self.interval != ServerDefaults.interval: 
+       if self.interval != ServerDefaults.interval:
            res = res + " interval " + `self.interval`
        if self.envelope != ServerDefaults.envelope or self.envskip != ServerDefaults.envskip:
            if self.envskip:
@@ -183,15 +182,13 @@ class Server:
            res = res + " plugin " + `self.plugin`
        if self.plugout:
            res = res + " plugout " + `self.plugout`
-       if self.netsec:
-           res = res + " netsec " + str(self.netsec)
        if self.principal:
            res = res + " principal " + `self.principal`
        if self.esmtpname:
            res = res + " esmtpname " + `self.esmtpname`
        if self.esmtppassword:
            res = res + " esmtppassword " + `self.esmtppassword`
-       if self.interface or self.monitor or self.netsec or self.principal or self.plugin or self.plugout:
+       if self.interface or self.monitor or self.principal or self.plugin or self.plugout:
            if folded:
                res = res + "\n"
 
@@ -217,7 +214,7 @@ class Server:
 class User:
     def __init__(self):
        if os.environ.has_key("USER"):
-           self.remote = os.environ["USER"]    # Remote username
+           self.remote = os.environ["USER"]    # Remote username
        elif os.environ.has_key("LOGNAME"):
            self.remote = os.environ["LOGNAME"]
        else:
@@ -239,7 +236,7 @@ class User:
        self.keep = FALSE       # Keep messages
        self.flush = FALSE      # Flush messages
        self.fetchall = FALSE   # Fetch old messages
-       self.rewrite = TRUE     # Rewrite message headers
+       self.rewrite = TRUE     # Rewrite message headers
        self.forcecr = FALSE    # Force LF -> CR/LF
        self.stripcr = FALSE    # Strip CR
        self.pass8bits = FALSE  # Force BODY=7BIT
@@ -260,10 +257,10 @@ class User:
        self.sslproto = None    # Force SSL?
        self.sslcertck = 0      # Enable strict SSL cert checking
        self.sslcertpath = None # Path to trusted certificates
-       self.sslfingerprint = None      # SSL key fingerprint to check
+       self.sslfingerprint = None      # SSL key fingerprint to check
        self.properties = None  # Extension properties
        User.typemap = (
-           ('remote',      'String'),
+           ('remote',      'String'),
            # leave out mailboxes and localnames
            ('password',    'String'),
            # Leave out smtphunt, fetchdomains
@@ -272,11 +269,11 @@ class User:
            ('preconnect',  'String'),
            ('postconnect', 'String'),
            ('mda',      'String'),
-           ('bsmtp',       'String'),
+           ('bsmtp',       'String'),
            ('lmtp',    'Boolean'),
            ('antispam',    'String'),
            ('keep',    'Boolean'),
-           ('flush',       'Boolean'),
+           ('flush',       'Boolean'),
            ('fetchall',    'Boolean'),
            ('rewrite',     'Boolean'),
            ('forcecr',     'Boolean'),
@@ -286,15 +283,15 @@ class User:
            ('dropstatus',  'Boolean'),
            ('dropdelivered', 'Boolean'),
            ('idle',    'Boolean'),
-           ('limit',       'Int'),
+           ('limit',       'Int'),
            ('warnings',    'Int'),
            ('fetchlimit',  'Int'),
-           ('fetchsizelimit',  'Int'),
+           ('fetchsizelimit',  'Int'),
            ('fastuidl',    'Int'),
            ('batchlimit',  'Int'),
            ('expunge',     'Int'),
            ('ssl',      'Boolean'),
-           ('sslkey',      'String'),
+           ('sslkey',      'String'),
            ('sslcert',     'String'),
            ('sslcertck',   'Boolean'),
            ('sslcertpath', 'String'),
@@ -314,9 +311,9 @@ class User:
        if (self.keep != UserDefaults.keep
                or self.flush != UserDefaults.flush
                or self.fetchall != UserDefaults.fetchall
-               or self.rewrite != UserDefaults.rewrite 
-               or self.forcecr != UserDefaults.forcecr 
-               or self.stripcr != UserDefaults.stripcr 
+               or self.rewrite != UserDefaults.rewrite
+               or self.forcecr != UserDefaults.forcecr
+               or self.stripcr != UserDefaults.stripcr
                or self.pass8bits != UserDefaults.pass8bits
                or self.mimedecode != UserDefaults.mimedecode
                or self.dropstatus != UserDefaults.dropstatus
@@ -414,7 +411,7 @@ class User:
 #
 
 defaultports = {"auto":0,
-               "POP2":109, 
+               "POP2":109,
                "POP3":110,
                "APOP":110,
                "KPOP":1109,
@@ -428,7 +425,7 @@ listboxhelp = {
     'title' : 'List Selection Help',
     'banner': 'List Selection',
     'text' : """
-You must select an item in the list box (by clicking on it). 
+You must select an item in the list box (by clicking on it).
 """}
 
 def flag2str(value, string):
@@ -464,7 +461,7 @@ def ButtonBar(frame, legend, ref, alternatives, depth, command):
            ind = width * row + column
            if ind < len(alternatives):
                Radiobutton(subframe,
-                       {'text':alternatives[ind], 
+                       {'text':alternatives[ind],
                         'variable':ref,
                         'value':alternatives[ind],
                         'command':command}).pack(side=TOP, anchor=W)
@@ -479,7 +476,7 @@ def ButtonBar(frame, legend, ref, alternatives, depth, command):
 def helpwin(helpdict):
 # help message window with a self-destruct button
     helpwin = Toplevel()
-    helpwin.title(helpdict['title']) 
+    helpwin.title(helpdict['title'])
     helpwin.iconname(helpdict['title'])
     Label(helpwin, text=helpdict['banner']).pack()
     textframe = Frame(helpwin)
@@ -491,7 +488,7 @@ def helpwin(helpdict):
     scroll.config(command=helpwin.textwidget.yview)
     scroll.pack(side=RIGHT, fill=BOTH)
     helpwin.textwidget.insert(END, helpdict['text']);
-    Button(helpwin, text='Done', 
+    Button(helpwin, text='Done',
           command=lambda x=helpwin: x.destroy(), bd=2).pack()
     textframe.pack(side=TOP)
 
@@ -510,7 +507,7 @@ def make_icon_window(base, image):
        pass
 
 class ListEdit(Frame):
-# edit a list of values (duplicates not allowed) with a supplied editor hook 
+# edit a list of values (duplicates not allowed) with a supplied editor hook
     def __init__(self, newlegend, list, editor, deletor, master, helptxt):
        self.editor = editor
        self.deletor = deletor
@@ -591,7 +588,7 @@ class ListEdit(Frame):
                apply(self.deletor, (label,))
 
 def ConfirmQuit(frame, context):
-    ans = Dialog(frame, 
+    ans = Dialog(frame,
                 title = 'Quit?',
                 text = 'Really quit ' + context + ' without saving?',
                 bitmap = 'question',
@@ -754,7 +751,7 @@ class ConfigurationEdit(Frame, MyWidget):
        self.master.title('fetchmail ' + self.mode + ' configurator');
        self.master.iconname('fetchmail ' + self.mode + ' configurator');
        self.master.protocol('WM_DELETE_WINDOW', self.nosave)
-       self.keepalive = []     # Use this to anchor the PhotoImage object
+       self.keepalive = []     # Use this to anchor the PhotoImage object
        make_icon_window(self, fetchmail_icon)
        Pack.config(self)
        self.post(Configuration, 'configuration')
@@ -766,7 +763,7 @@ class ConfigurationEdit(Frame, MyWidget):
 
        gf = Frame(self, relief=RAISED, bd = 5)
        Label(gf,
-               text='Fetchmail Run Controls', 
+               text='Fetchmail Run Controls',
                bd=2).pack(side=TOP, pady=10)
 
        df = Frame(gf)
@@ -774,7 +771,7 @@ class ConfigurationEdit(Frame, MyWidget):
        ff = Frame(df)
        if self.mode != 'novice':
            # Set the postmaster
-           log = LabeledEntry(ff, '     Postmaster:', self.postmaster, '14')
+           log = LabeledEntry(ff, '     Postmaster:', self.postmaster, '14')
            log.pack(side=RIGHT, anchor=E)
 
        # Set the poll interval
@@ -804,7 +801,7 @@ class ConfigurationEdit(Frame, MyWidget):
                {'text':'Log to syslog?',
                'variable':self.syslog,
                'relief':GROOVE}).pack(side=LEFT, anchor=W)
-           log = LabeledEntry(sf, '     Logfile:', self.logfile, '14')
+           log = LabeledEntry(sf, '     Logfile:', self.logfile, '14')
            log.pack(side=RIGHT, anchor=E)
            sf.pack(fill=X)
 
@@ -813,7 +810,7 @@ class ConfigurationEdit(Frame, MyWidget):
                'variable':self.invisible,
                 'relief':GROOVE}).pack(side=LEFT, anchor=W)
            # Set the idfile
-           log = LabeledEntry(gf, '     Idfile:', self.idfile, '14')
+           log = LabeledEntry(gf, '     Idfile:', self.idfile, '14')
            log.pack(side=RIGHT, anchor=E)
 
        gf.pack(fill=X)
@@ -821,9 +818,9 @@ class ConfigurationEdit(Frame, MyWidget):
        # Expert mode allows us to edit multiple sites
        lf = Frame(self, relief=RAISED, bd=5)
        Label(lf,
-             text='Remote Mail Server Configurations', 
+             text='Remote Mail Server Configurations',
              bd=2).pack(side=TOP, pady=10)
-       ListEdit('New Server:', 
+       ListEdit('New Server:',
                map(lambda x: x.pollname, self.configuration.servers),
                lambda site, self=self: self.server_edit(site),
                lambda site, self=self: self.server_delete(site),
@@ -832,7 +829,7 @@ class ConfigurationEdit(Frame, MyWidget):
 
     def destruct(self):
        for sitename in self.subwidgets.keys():
-           self.subwidgets[sitename].destruct()        
+           self.subwidgets[sitename].destruct()
        self.master.destroy()
        self.onexit()
 
@@ -847,7 +844,7 @@ class ConfigurationEdit(Frame, MyWidget):
        fm = None
        if not self.outfile:
            fm = sys.stdout
-       elif not os.path.isfile(self.outfile) or Dialog(self, 
+       elif not os.path.isfile(self.outfile) or Dialog(self,
                 title = 'Overwrite existing run control file?',
                 text = 'Really overwrite existing run control file?',
                 bitmap = 'question',
@@ -875,7 +872,7 @@ remotehelp = {
     'title' : 'Remote site help',
     'banner': 'Remote sites',
     'text' : """
-When you add a site name to the list here, 
+When you add a site name to the list here,
 you initialize an entry telling fetchmail
 how to poll a new site.
 
@@ -890,7 +887,7 @@ serverhelp = {
     'title' : 'Server options help',
     'banner': 'Server Options',
     'text' : """
-The server options screen controls fetchmail 
+The server options screen controls fetchmail
 options that apply to one of your mailservers.
 
 Once you have a mailserver configuration set
@@ -898,7 +895,7 @@ up as you like it, you can select `OK' to
 store it in the server list maintained in
 the main configuration window.
 
-If you wish to discard changes to a server 
+If you wish to discard changes to a server
 configuration, select `Quit'.
 """}
 
@@ -914,7 +911,7 @@ a command-line argument.
 The `True name of server' box should specify the actual DNS name
 to query. By default this is the same as the poll name.
 
-Normally each host described in the file is queried once each 
+Normally each host described in the file is queried once each
 poll cycle. If `Cycles to skip between polls' is greater than 0,
 that's the number of poll cycles that are skipped between the
 times this post is actually polled.
@@ -941,12 +938,12 @@ protocols; fortunately these are the most
 frequently supported.
 
 The `Protocol' button bar offers you a choice of
-all the different protocols available.  The `auto'
+all the different protocols available. The `auto'
 protocol is the default mode; it probes the host
 ports for POP3 and IMAP to see if either is
 available.
 
-Normally the TCP/IP service port to use is 
+Normally the TCP/IP service port to use is
 dictated by the protocol choice.  The `Port'
 field (only present in expert mode) lets you
 set a non-standard port.
@@ -980,10 +977,6 @@ The sslcertck option enables strict checking of SSL server
 certificates (and sslcertpath gives trusted certificate
 directory). With sslfingerprint, you can specify a finger-
 print the server's key is checked against.
-
-The `netsec' option will be configurable only if fetchmail
-was compiled with IPV6 support.  If you need to use it,
-you probably know what to do.
 """}
 
 multihelp = {
@@ -998,7 +991,7 @@ suserhelp = {
     'title' : 'User list help',
     'banner': 'User list',
     'text' : """
-When you add a user name to the list here, 
+When you add a user name to the list here,
 you initialize an entry telling fetchmail
 to poll the site on behalf of the new user.
 
@@ -1030,16 +1023,16 @@ class ServerEdit(Frame, MyWidget):
        self.master.iconname('Fetchmail host ' + self.server.pollname);
        self.post(Server, 'server')
        self.makeWidgets(self.server.pollname, mode)
-       self.keepalive = []     # Use this to anchor the PhotoImage object
+       self.keepalive = []     # Use this to anchor the PhotoImage object
        make_icon_window(self, fetchmail_icon)
-#       self.grab_set()
-#       self.focus_set()
-#       self.wait_window()
+#      self.grab_set()
+#      self.focus_set()
+#      self.wait_window()
        return self
 
     def destruct(self):
        for username in self.subwidgets.keys():
-           self.subwidgets[username].destruct()        
+           self.subwidgets[username].destruct()
        del self.parent.subwidgets[self.server.pollname]
        self.master.destroy()
 
@@ -1050,7 +1043,7 @@ class ServerEdit(Frame, MyWidget):
     def save(self):
        self.fetch(Server, 'server')
        for username in self.subwidgets.keys():
-           self.subwidgets[username].save()    
+           self.subwidgets[username].save()
        self.destruct()
 
     def defaultPort(self):
@@ -1063,7 +1056,7 @@ class ServerEdit(Frame, MyWidget):
        # a custom port number you should be in expert mode and playing
        # close enough attention to notice this...
        self.port.set(defaultports[proto])
-       if not proto in ("POP3", "APOP", "KPOP"): self.uidl.state = DISABLED 
+       if not proto in ("POP3", "APOP", "KPOP"): self.uidl.state = DISABLED
 
     def user_edit(self, username, mode):
        self.subwidgets[username] = UserEdit(username, self).edit(mode, Toplevel())
@@ -1112,14 +1105,14 @@ class ServerEdit(Frame, MyWidget):
        Label(protwin, text="Protocol").pack(side=TOP)
        ButtonBar(protwin, '',
                  self.protocol, protolist, 2,
-                 self.defaultPort) 
+                 self.defaultPort)
        if mode != 'novice':
            LabeledEntry(protwin, 'On server TCP/IP port:',
                      self.port, leftwidth).pack(side=TOP, fill=X)
            self.defaultPort()
            Checkbutton(protwin,
                text="POP3: track `seen' with client-side UIDLs?",
-               variable=self.uidl).pack(side=TOP)   
+               variable=self.uidl).pack(side=TOP)
        Button(protwin, text='Probe for supported protocols', fg='blue',
               command=self.autoprobe).pack(side=LEFT)
        Button(protwin, text='Help', fg='blue',
@@ -1157,11 +1150,11 @@ class ServerEdit(Frame, MyWidget):
                 self.server.localdomains, None, None, mdropwin, multihelp)
            mdropwin.pack(fill=X)
 
-           if os_type in ('linux', 'freebsd') or 'netsec' in feature_options:
+           if os_type in ('linux', 'freebsd'):
                secwin = Frame(rightwin, relief=RAISED, bd=5)
                Label(secwin, text="Security").pack(side=TOP)
                # Don't actually let users set this.  KPOP sets it implicitly
-               #       ButtonBar(secwin, 'Authorization mode:',
+               #       ButtonBar(secwin, 'Authorization mode:',
                #                self.auth, authlist, 1, None).pack(side=TOP)
                if os_type == 'linux' or os_type == 'freebsd'  or 'interface' in dictmembers:
                    LabeledEntry(secwin, 'IP range to check before poll:',
@@ -1169,18 +1162,15 @@ class ServerEdit(Frame, MyWidget):
                if os_type == 'linux' or os_type == 'freebsd' or 'monitor' in dictmembers:
                    LabeledEntry(secwin, 'Interface to monitor:',
                         self.monitor, leftwidth).pack(side=TOP, fill=X)
-               if 'netsec' in feature_options or 'netsec' in dictmembers:
-                   LabeledEntry(secwin, 'IPV6 security options:',
-                        self.netsec, leftwidth).pack(side=TOP, fill=X)
                # Someday this should handle Kerberos 5 too
                if 'kerberos' in feature_options:
                    LabeledEntry(secwin, 'Principal:',
                         self.principal, '12').pack(side=TOP, fill=X)
-                # ESMTP authentication
-                LabeledEntry(secwin, 'ESMTP name:',
-                             self.esmtpname, '12').pack(side=TOP, fill=X)
-                LabeledEntry(secwin, 'ESMTP password:',
-                             self.esmtppassword, '12').pack(side=TOP, fill=X)
+               # ESMTP authentication
+               LabeledEntry(secwin, 'ESMTP name:',
+                            self.esmtpname, '12').pack(side=TOP, fill=X)
+               LabeledEntry(secwin, 'ESMTP password:',
+                            self.esmtppassword, '12').pack(side=TOP, fill=X)
                Button(secwin, text='Help', fg='blue',
                       command=lambda: helpwin(sechelp)).pack(side=RIGHT)
                secwin.pack(fill=X)
@@ -1199,7 +1189,7 @@ class ServerEdit(Frame, MyWidget):
        for (protocol, port) in (("IMAP",143), ("POP3",110), ("POP2",109)):
            sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
            try:
-                sock.connect((realhost, port))
+               sock.connect((realhost, port))
                greetline = sock.recv(1024)
                sock.close()
            except:
@@ -1240,7 +1230,7 @@ This appears to be an old version of the UC Davis POP server.  These are
 dangerously unreliable (among other problems, they may drop your mailbox
 on the floor if your connection is interrupted during the session).
 
-It is strongly recommended that you find a better POP3 server.  The fetchmail
+It is strongly recommended that you find a better POP3 server. The fetchmail
 FAQ includes pointers to good ones.
 
 """
@@ -1259,14 +1249,14 @@ message retrieved with TOP. Its response to RETR is normal, so use the
 # that internally cucipop does allocate a certain data structure in
 # multiples of 16, using realloc() to bump it up to the next
 # multiple if it needs more.
-# 
+#
 # The distinctive symptom is that when there are 16 messages in the
 # inbox, you can RETR and DELE all 16 messages successfully, but on
 # QUIT cucipop returns something like "-ERR Error locking your
 # mailbox" and aborts without updating it.
-# 
+#
 # The cucipop banner looks like:
-# 
+#
 # +OK Cubic Circle's v1.31 1998/05/13 POP3 ready <6229000062f95036@wakko>
 #
            if string.find(greetline, "Cubic Circle") > 0:
@@ -1297,7 +1287,7 @@ Its response to RETR is normal, so use the `fetchall' option.
 """
            if string.find(greetline, " geonet.de") > 0:
                warnings = warnings + """
-You appear to be using geonet.  As of late 2002, the TOP command on
+You appear to be using geonet. As of late 2002, the TOP command on
 geonet's POP3 is broken.  Use the fetchall option.
 
 """
@@ -1307,7 +1297,7 @@ You appear to be using some version of HP OpenMail.  Many versions of
 OpenMail do not process the "TOP" command correctly; the symptom is that
 only the header and first line of each message is retrieved.  To work
 around this bug, turn on `fetchall' on all user entries associated with
-this server.  
+this server.
 
 """
            if string.find(greetline, "Escape character is") > 0:
@@ -1357,7 +1347,7 @@ it has been observed with fetchpop.  The fix is to upgrade to qpopper
 You appear to be using a SpryNet server.  In mid-1999 it was reported that
 the SpryNet TOP command marks messages seen.  Therefore, for proper error
 recovery in the event of a line drop, it is strongly recommended that you
-turn on `fetchall' on all user entries associated with this server.  
+turn on `fetchall' on all user entries associated with this server.
 
 """
            if string.find(greetline, "TEMS POP3") > 0:
@@ -1389,7 +1379,7 @@ They also botch the TOP command the fetchmail normally uses for retrieval
 Turning on fetchall will disable the use of TOP.
 
 Therefore, it is strongly recommended that you turn on `fetchall' on all
-user entries associated with this server.  
+user entries associated with this server.
 
 """
            if string.find(greetline, " Novonyx POP3") > 0:
@@ -1404,7 +1394,7 @@ You may have to use the fetchall option.
 Some servers issuing the greeting line 'IMS POP3' have been known to
 do byte-stuffing incorrectly.  This means that if a message you receive
 has a . (period) at start of line, fetchmail will become confused and
-probably wedge itself.  (This bug was recorded on IMS POP3 0.86.)
+probably wedge itself. (This bug was recorded on IMS POP3 0.86.)
 
 """
 
@@ -1463,7 +1453,7 @@ POP3 facility is enabled, we recommend you fall back on it.
 ### Checks for protocol variants start here
 
            closebrak = string.find(greetline, ">")
-           if  closebrak > 0 and greetline[closebrak+1] == "\r":
+           if  closebrak > 0 and greetline[closebrak+1] == "\r":
                warnings = warnings + """
 It looks like you could use APOP on this server and avoid sending it your
 password in clear.  You should talk to the mailserver administrator about
@@ -1473,7 +1463,7 @@ this.
            if string.find(greetline, "IMAP2bis") > 0:
                warnings = warnings + """
 IMAP2bis servers have a minor problem; they can't peek at messages without
-marking them seen.  If you take a line hit during the retrieval, the 
+marking them seen.  If you take a line hit during the retrieval, the
 interrupted message may get left on the server, marked seen.
 
 To work around this, it is recommended that you set the `fetchall'
@@ -1486,8 +1476,8 @@ a pointer to an open-source implementation.
 """
            if string.find(greetline, "IMAP4rev1") > 0:
                warnings = warnings + """
-I see an IMAP4rev1 server.  Excellent.  This is (a) the best kind of
-remote-mail server, and (b) the one the fetchmail author uses.  Fetchmail
+I see an IMAP4rev1 server.  Excellent. This is (a) the best kind of
+remote-mail server, and (b) the one the fetchmail author uses. Fetchmail
 has therefore been extremely well tested with this class of server.
 
 """
@@ -1501,13 +1491,13 @@ Fetchmail doesn't know anything special about this server type.
            title = "Autoprobe of " + realhost + " succeeded"
            confirm = "The " + protocol + " server said:\n\n" + greetline + warnings
            self.protocol.set(protocol)
-       confwin.title(title) 
+       confwin.title(title)
        confwin.iconname(title)
        Label(confwin, text=title).pack()
        Message(confwin, text=confirm, width=600).pack()
-       Button(confwin, text='Done', 
+       Button(confwin, text='Done',
                   command=lambda x=confwin: x.destroy(), bd=2).pack()
-       
+
 #
 # User editing stuff
 #
@@ -1570,11 +1560,11 @@ class UserEdit(Frame, MyWidget):
        self.master.iconname('Fetchmail user ' + self.user.remote);
        self.post(User, 'user')
        self.makeWidgets(mode, self.parent.server.pollname)
-       self.keepalive = []     # Use this to anchor the PhotoImage object
+       self.keepalive = []     # Use this to anchor the PhotoImage object
        make_icon_window(self, fetchmail_icon)
-#       self.grab_set()
-#       self.focus_set()
-#       self.wait_window()
+#      self.grab_set()
+#      self.focus_set()
+#      self.wait_window()
        return self
 
     def destruct(self):
@@ -1590,9 +1580,9 @@ class UserEdit(Frame, MyWidget):
     def save(self):
        ok = 0
        for x in self.user.localnames: ok = ok + (string.find(x, '@') != -1)
-       if ok == 0 or  Dialog(self, 
+       if ok == 0 or  Dialog(self,
            title = "Really accept an embedded '@' ?",
-           text = "Local names with an embedded '@', such as in foo@bar " 
+           text = "Local names with an embedded '@', such as in foo@bar "
                   "might result in your mail being sent to foo@bar.com "
                   "instead of your local system.\n Are you sure you want "
                   "a local user name with an '@' in it?",
@@ -1682,9 +1672,9 @@ class UserEdit(Frame, MyWidget):
        Checkbutton(optwin, text="Fetch old messages as well as new",
                    variable=self.fetchall).pack(side=TOP, anchor=W)
        if mode != 'novice':
-           Checkbutton(optwin, text="Flush seen messages before retrieval", 
+           Checkbutton(optwin, text="Flush seen messages before retrieval",
                    variable=self.flush).pack(side=TOP, anchor=W)
-           Checkbutton(optwin, text="Rewrite To/Cc/Bcc messages to enable reply", 
+           Checkbutton(optwin, text="Rewrite To/Cc/Bcc messages to enable reply",
                    variable=self.rewrite).pack(side=TOP, anchor=W)
            Checkbutton(optwin, text="Force CR/LF at end of each line",
                    variable=self.forcecr).pack(side=TOP, anchor=W)
@@ -1694,9 +1684,9 @@ class UserEdit(Frame, MyWidget):
                    variable=self.pass8bits).pack(side=TOP, anchor=W)
            Checkbutton(optwin, text="Undo MIME armoring on header and body",
                    variable=self.mimedecode).pack(side=TOP, anchor=W)
-           Checkbutton(optwin, text="Drop Status lines from forwarded messages", 
+           Checkbutton(optwin, text="Drop Status lines from forwarded messages",
                    variable=self.dropstatus).pack(side=TOP, anchor=W)
-           Checkbutton(optwin, text="Drop Delivered-To lines from forwarded messages", 
+           Checkbutton(optwin, text="Drop Delivered-To lines from forwarded messages",
                    variable=self.dropdelivered).pack(side=TOP, anchor=W)
        optwin.pack(fill=X)
 
@@ -1719,7 +1709,7 @@ class UserEdit(Frame, MyWidget):
            if self.parent.server.protocol not in ('ETRN', 'ODMR'):
                LabeledEntry(limwin, 'Interval between expunges:',
                             self.expunge, '30').pack(side=TOP, fill=X)
-           Checkbutton(limwin, text="Idle after each poll (IMAP only)", 
+           Checkbutton(limwin, text="Idle after each poll (IMAP only)",
                    variable=self.idle).pack(side=TOP, anchor=W)
            limwin.pack(fill=X)
 
@@ -1750,7 +1740,7 @@ class Configurator(Frame):
        self.master.title('fetchmail configurator');
        self.master.iconname('fetchmail configurator');
        Pack.config(self)
-       self.keepalive = []     # Use this to anchor the PhotoImage object
+       self.keepalive = []     # Use this to anchor the PhotoImage object
        make_icon_window(self, fetchmail_icon)
 
        Message(self, text="""
@@ -1797,9 +1787,9 @@ class RunWindow(Frame):
        self.master.iconname('fetchmail run window');
        Pack.config(self)
        Label(self,
-               text="Running "+command, 
+               text="Running "+command,
                bd=2).pack(side=TOP, pady=10)
-       self.keepalive = []     # Use this to anchor the PhotoImage object
+       self.keepalive = []     # Use this to anchor the PhotoImage object
        make_icon_window(self, fetchmail_icon)
 
        # This is a scrolling text window
@@ -1815,10 +1805,10 @@ class RunWindow(Frame):
 
        Button(self, text='Quit', fg='blue', command=self.leave).pack()
 
-       self.update()   # Draw widget before executing fetchmail
+       self.update()   # Draw widget before executing fetchmail
 
        # Always look for a runnable command in the directory we're running in
-        # first. This avoids some obscure version-skew errors that can occur
+       # first. This avoids some obscure version-skew errors that can occur
        # if you pick up an old fetchmail from the standard system locations.
        os.environ["PATH"] = os.path.dirname(sys.argv[0]) + ":" + os.environ["PATH"]
        child_stdout = os.popen(command + " 2>&1", "r")
@@ -1843,9 +1833,9 @@ class MainWindow(Frame):
        self.master.iconname('fetchmail launcher');
        Pack.config(self)
        Label(self,
-               text='Fetchmailconf ' + version, 
+               text='Fetchmailconf ' + version,
                bd=2).pack(side=TOP, pady=10)
-       self.keepalive = []     # Use this to anchor the PhotoImage object
+       self.keepalive = []     # Use this to anchor the PhotoImage object
        make_icon_window(self, fetchmail_icon)
        self.debug = 0
 
@@ -1921,7 +1911,7 @@ def copy_instance(toclass, fromdict):
 # conformability checking; they'll still get copied if they are
 # present in the dictionary.
     optional = ('interface', 'monitor',
-               'netsec', 'esmtpname', 'esmtppassword',
+               'esmtpname', 'esmtppassword',
                'ssl', 'sslkey', 'sslcert', 'sslproto', 'sslcertck',
                'sslcertpath', 'sslfingerprint', 'showdots')
     class_sig = setdiff(toclass.__dict__.keys(), optional)
@@ -1929,12 +1919,12 @@ def copy_instance(toclass, fromdict):
     dict_keys = setdiff(fromdict.keys(), optional)
     dict_keys.sort()
     common = intersect(class_sig, dict_keys)
-    if 'typemap' in class_sig: 
+    if 'typemap' in class_sig:
        class_sig.remove('typemap')
     if tuple(class_sig) != tuple(dict_keys):
        print "Fields don't match what fetchmailconf expected:"
-#       print "Class signature: " + `class_sig`
-#       print "Dictionary keys: " + `dict_keys`
+#      print "Class signature: " + `class_sig`
+#      print "Dictionary keys: " + `dict_keys`
        diff = setdiff(class_sig, common)
        if diff:
            print "Not matched in class `" + toclass.__class__.__name__ + "' signature: " + `diff`
@@ -1947,7 +1937,7 @@ def copy_instance(toclass, fromdict):
            setattr(toclass, x, fromdict[x])
 
 #
-# And this is the main sequence.  How it works:  
+# And this is the main sequence.  How it works:
 #
 # First, call `fetchmail --configdump' and trap the output in a tempfile.
 # This should fill it with a Python initializer for a variable `fetchmailrc'.
@@ -1969,7 +1959,7 @@ def copy_instance(toclass, fromdict):
 #     the edited result to stdout as well.
 # -f: specify the run control file to read.
 
-if __name__ == '__main__': 
+if __name__ == '__main__':
 
     if not os.environ.has_key("DISPLAY"):
        print "fetchmailconf must be run under X"
@@ -2040,7 +2030,7 @@ gUSiYASJpMEHhilJTEnhAlGoQqYAZQ1AiqEMZ0jDGtqQImhwwA13yMMevoQAGvGhEAWHGMOAAAA7
        cmd = "umask 077; fetchmail -f " + rcfile + " --configdump --nosyslog >" + tmpfile
     else:
        cmd = "umask 077; fetchmail --configdump --nosyslog >" + tmpfile
-       
+
     try:
        s = os.system(cmd)
        if s != 0:
@@ -2057,14 +2047,14 @@ gUSiYASJpMEHhilJTEnhAlGoQqYAZQ1AiqEMZ0jDGtqQImhwwA13yMMevoQAGvGhEAWHGMOAAAA7
        print "Can't read configuration output of fetchmail --configdump."
        os.remove(tmpfile)
        sys.exit(1)
-       
+
     os.remove(tmpfile)
 
     # The tricky part -- initializing objects from the configuration global
     # `Configuration' is the top level of the object tree we're going to mung.
     # The dictmembers list is used to track the set of fields the dictionary
     # contains; in particular, we can use it to tell whether things like the
-    # monitor, interface, netsec, ssl, sslkey, or sslcert fields are present.
+    # monitor, interface, ssl, sslkey, or sslcert fields are present.
     dictmembers = []
     Fetchmailrc = Configuration()
     copy_instance(Fetchmailrc, fetchmailrc)