X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=fetchmailconf.py;h=2dc02d875995b088dd49e2e84a89ae434e085074;hb=7f6138ffd4935043382ce5f867ee9e177e0a9787;hp=baeb1a0c7305b63c4d6a37b2cf1f786eeda5a434;hpb=570e3ef1831cdb13a1baf846029ffa1cb7ec1b79;p=~andy%2Ffetchmail diff --git a/fetchmailconf.py b/fetchmailconf.py index baeb1a0c..2dc02d87 100755 --- a/fetchmailconf.py +++ b/fetchmailconf.py @@ -5,7 +5,7 @@ # Matthias Andree # Requires Python with Tkinter, and the following OS-dependent services: # posix, posixpath, socket -version = "1.55 $Revision$" +version = "1.57" from Tkinter import * from Dialog import * @@ -65,6 +65,8 @@ class Configuration: str = str + ("set properties \"%s\"\n" % (self.properties,)); if self.poll_interval > 0: str = str + "set daemon " + `self.poll_interval` + "\n" + if self.invisible: + str = str + ("set invisible\n") for site in self.servers: str = str + repr(site) return str @@ -103,6 +105,7 @@ class Server: self.esmtpname = None # ESMTP 2554 name self.esmtppassword = None # ESMTP 2554 password self.tracepolls = FALSE # Add trace-poll info to headers + self.badheader = FALSE # Pass messages with bad headers on? self.users = [] # List of user entries for site Server.typemap = ( ('pollname', 'String'), @@ -127,7 +130,8 @@ class Server: ('esmtpname', 'String'), ('esmtppassword', 'String'), ('principal', 'String'), - ('tracepolls','Boolean')) + ('tracepolls','Boolean'), + ('badheader', 'Boolean')) def dump(self, folded): res = "" @@ -197,6 +201,8 @@ class Server: if self.interface or self.monitor or self.principal or self.plugin or self.plugout: if folded: res = res + "\n" + if self.badheader: + res = res + "bad-header accept " if res[-1] == " ": res = res[0:-1] @@ -827,14 +833,14 @@ class ConfigurationEdit(Frame, MyWidget): sb = Frame(gf) Checkbutton(sb, - {'text':'send spam bounces?', + {'text':'Send spam bounces?', 'variable':self.spambounce, 'relief':GROOVE}).pack(side=LEFT, anchor=W) sb.pack(fill=X) sb = Frame(gf) Checkbutton(sb, - {'text':'treat permanent errors as temporary?', + {'text':'Treat permanent errors as temporary?', 'variable':self.softbounce, 'relief':GROOVE}).pack(side=LEFT, anchor=W) sb.pack(fill=X) @@ -1129,6 +1135,8 @@ class ServerEdit(Frame, MyWidget): ctlwin = Frame(leftwin, relief=RAISED, bd=5) Label(ctlwin, text="Run Controls").pack(side=TOP) Checkbutton(ctlwin, text='Poll ' + host + ' normally?', variable=self.active).pack(side=TOP) + Checkbutton(ctlwin, text='Pass messages with bad headers?', + variable=self.badheader).pack(side=TOP) LabeledEntry(ctlwin, 'True name of ' + host + ':', self.via, leftwidth).pack(side=TOP, fill=X) LabeledEntry(ctlwin, 'Cycles to skip between polls:', @@ -1689,9 +1697,9 @@ class UserEdit(Frame, MyWidget): Label(targwin, text="Domains to fetch from (ODMR/ETRN only)").pack(side=TOP) ListEdit("Domains:", self.user.fetchdomains, None, None, targwin, None) - LabeledEntry(targwin, 'Append to MAIL FROM line:', + LabeledEntry(targwin, 'Use domain on RCPT TO line:', self.smtpaddress, '26').pack(side=TOP, fill=X) - LabeledEntry(targwin, 'Set RCPT To address:', + LabeledEntry(targwin, 'Set fixed RCPT TO address:', self.smtpname, '26').pack(side=TOP, fill=X) LabeledEntry(targwin, 'Connection setup command:', self.preconnect, '26').pack(side=TOP, fill=X) @@ -2085,10 +2093,10 @@ Usage: fetchmailconf {[-d] [-f fetchmailrc]|-h|--help|-V|--version} print "fetchmailconf %s" % version print """ Copyright (C) 1997 - 2003 Eric S. Raymond -Copyright (C) 2005 - 2006 Matthias Andree +Copyright (C) 2005, 2006, 2008, 2009 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. """ +COPYING in the source or documentation directory for details.""" sys.exit(0) # Get client host's FQDN