diff options
-rw-r--r-- | NEWS | 5 | ||||
-rw-r--r-- | conf.c | 1 | ||||
-rw-r--r-- | fetchmail.c | 2 | ||||
-rw-r--r-- | fetchmail.h | 1 | ||||
-rw-r--r-- | fetchmail.man | 50 | ||||
-rwxr-xr-x | fetchmailconf | 20 | ||||
-rw-r--r-- | rcfile_l.l | 1 | ||||
-rw-r--r-- | rcfile_y.y | 4 | ||||
-rw-r--r-- | sample.rcfile | 1 |
9 files changed, 66 insertions, 19 deletions
@@ -6,13 +6,14 @@ fetchmail-4.6.3 (): * fetchmailconf now has access to information about which fetchmail compile-time options have been enabled, and uses it to control the choices in various panels. +* Added `properties' option for extension scripts. -There are 252 people on fetchmail-friends and 295 on fetchmail-announce. +There are 250 people on fetchmail-friends and 294 on fetchmail-announce. fetchmail-4.6.2 (Fri Oct 16 12:49:30 EDT 1998): * Time out server open requests like we do reads. This protects against buggy TCP/IP configurations that hang forever on a bad open. -* The '--limit' option can now be used with daemon mode. The user is notfied +* The '--limit' option can now be used with daemon mode. The user is notified that some messages are being skipped on the mail server; the user get notified by email that mentions all the messages being skipped (including their size). A -w/--warnings per-user option specifies at what intervals @@ -322,6 +322,7 @@ void dump_config(struct runctl *runp, struct query *querylist) numdump("fetchlimit", ctl->fetchlimit); numdump("batchlimit", ctl->batchlimit); numdump("expunge", ctl->expunge); + stringdump("properties", ctl->properties); listdump("smtphunt", ctl->smtphunt); stringdump("smtpaddress", ctl->smtpaddress); diff --git a/fetchmail.c b/fetchmail.c index 939eb377..9e4d9240 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -774,6 +774,8 @@ static void optmerge(struct query *h2, struct query *h1, int force) FLAG_MERGE(fetchlimit); FLAG_MERGE(batchlimit); FLAG_MERGE(expunge); + + FLAG_MERGE(properties); #undef FLAG_MERGE } diff --git a/fetchmail.h b/fetchmail.h index 41d9da07..18de9f6c 100644 --- a/fetchmail.h +++ b/fetchmail.h @@ -224,6 +224,7 @@ struct query int fetchlimit; /* max # msgs to get in single poll */ int batchlimit; /* max # msgs to pass in single SMTP session */ int expunge; /* max # msgs to pass between expunges */ + char *properties; /* passthrough properties for extensions */ struct idlist *oldsaved, *newsaved; diff --git a/fetchmail.man b/fetchmail.man index f025e954..0e0dda7c 100644 --- a/fetchmail.man +++ b/fetchmail.man @@ -803,9 +803,10 @@ spam message bodies. .SH THE RUN CONTROL FILE The preferred way to set up fetchmail is to write a -\&\fI.fetchmailrc\fR file in your home directory. When there is a -conflict between the command-line arguments and the arguments in this -file, the command-line arguments take precedence. +\&\fI.fetchmailrc\fR file in your home directory (you may do this +directly, with a text editor, or indirectly via \fIfetchmailconf\fR). +When there is a conflict between the command-line arguments and the +arguments in this file, the command-line arguments take precedence. .PP To protect the security of your passwords, when --version is not on your \fI~/.fetchmailrc\fR may not have more than 0600 (u=rw,g=,o=) permissions; @@ -856,10 +857,38 @@ line. (The `skip' verb allows you to experiment with test entries safely, or easily disable entries for hosts that are temporarily down.) .PP .SS Keyword/Option Summary -Here are the legal server options. Keyword suffixes enclosed in +Here are the legal options. Keyword suffixes enclosed in square brackets are optional. Those corresponding to command-line options are followed by `-' and the appropriate option letter. +Here are the legal global options: + +.TS +l l lw34. +Keyword Opt Function +_ +set daemon \& T{ +Set a background poll interval in seconds +T} +set postmaster \& T{ +Give the name of the last-resort mail recipient +T} +set logfile \& T{ +Name of a file to dump error and status messages to +T} +set idfile \& T{ +Name of the file to store UID lists in +T} +set syslog \& T{ +Do error logging through syslog(3). +T} +set nosyslog \& T{ +Turn off error logging through syslog(3). +T} +.TE + +Here are the legal user options: + .TS l l lw34. Keyword Opt Function @@ -1027,11 +1056,8 @@ T} expunge -e T{ Perform an expunge on every #th message (IMAP only) T} -syslog \& T{ -Do error logging through syslog(3). -T} -nosyslog \& T{ -Turn off error logging through syslog(3). +properties \& T{ +String value is ignored by fetchmail (may be used by extension scripts) T} .TE .PP @@ -1209,6 +1235,12 @@ message headers and data into 8-bit data, making it easier to understand when reading mail. If your e-mail programs know how to deal with MIME messages, then this option is not needed. .PP +The `properties' option is an extension mechanism. It takes a string +argument, which is ignored by fetchmail itself. The string argument may be +used to store configuration information for scripts which require it. +In particular, the output of `--configdump' option will make properties +associated with a user entry readily available to a Python script. +.PP .SS Miscellaneous Run Control Options The words `here' and `there' have useful English-like significance. Normally `user eric is esr' would mean that diff --git a/fetchmailconf b/fetchmailconf index 74302b90..d0e69674 100755 --- a/fetchmailconf +++ b/fetchmailconf @@ -198,6 +198,7 @@ class User: self.fetchlimit = 0 # Max messages fetched per batch self.batchlimit = 0 # Max message forwarded per batch self.expunge = 1 # Interval between expunges (IMAP) + self.properties = None # Extension properties User.typemap = ( ('remote', 'String'), # leave out mailboxes and localnames @@ -221,7 +222,8 @@ class User: ('warnings', 'Int'), ('fetchlimit', 'Int'), ('batchlimit', 'Int'), - ('expunge', 'Int')) + ('expunge', 'Int'), + ('properties', 'String')) def __repr__(self): str = " " @@ -271,6 +273,8 @@ class User: str = str + " batchlimit " + `self.batchlimit` if self.expunge != UserDefaults.expunge: str = str + " expunge " + `self.expunge` + if self.properties != UserDefaults.properties: + str = str + " properties " + `self.properties` str = str + "\n" trimmed = self.smtphunt; if trimmed != [] and trimmed[len(trimmed) - 1] == "localhost": @@ -1229,14 +1233,16 @@ class UserEdit(Frame, MyWidget): self.fetchlimit, '30').pack(side=TOP, fill=X) LabeledEntry(limwin, 'Max messages to forward per poll:', self.batchlimit, '30').pack(side=TOP, fill=X) - LabeledEntry(limwin, 'Interval between expunges (IMAP):', - self.expunge, '30').pack(side=TOP, fill=X) + if self.server.protocol in ('IMAP', 'IMAP-K4', 'IMAP-GSS'): + LabeledEntry(limwin, 'Interval between expunges (IMAP):', + self.expunge, '30').pack(side=TOP, fill=X) limwin.pack(fill=X) - foldwin = Frame(rightwin, relief=RAISED, bd=5) - Label(foldwin, text="Remote folders (IMAP only)").pack(side=TOP) - ListEdit("New folder:", self.user.mailboxes, None, foldwin, None) - foldwin.pack(fill=X, anchor=N) + if self.server.protocol in ('IMAP', 'IMAP-K4', 'IMAP-GSS'): + foldwin = Frame(rightwin, relief=RAISED, bd=5) + Label(foldwin, text="Remote folders (IMAP only)").pack(side=TOP) + ListEdit("New folder:", self.user.mailboxes, None, foldwin, None) + foldwin.pack(fill=X, anchor=N) if mode != 'novice': rightwin.pack(side=LEFT) @@ -64,6 +64,7 @@ monitor { return MONITOR; } batchlimit { return BATCHLIMIT; } fetchlimit { return FETCHLIMIT; } expunge { return EXPUNGE; } +properties { return PROPERTIES; } is { return IS; } here { return HERE; } @@ -63,7 +63,7 @@ extern char * yytext; %token SPAMRESPONSE PRECONNECT POSTCONNECT LIMIT %token NETSEC INTERFACE MONITOR %token IS HERE THERE TO MAP WILDCARD -%token BATCHLIMIT FETCHLIMIT EXPUNGE +%token BATCHLIMIT FETCHLIMIT EXPUNGE PROPERTIES %token SET LOGFILE DAEMON SYSLOG IDFILE INVISIBLE POSTMASTER WARNINGS %token <proto> PROTO %token <sval> STRING @@ -323,6 +323,8 @@ user_option : TO localnames HERE | FETCHLIMIT NUMBER {current.fetchlimit = NUM_VALUE($2);} | BATCHLIMIT NUMBER {current.batchlimit = NUM_VALUE($2);} | EXPUNGE NUMBER {current.expunge = NUM_VALUE($2);} + + | PROPERTIES STRING {current.properties = xstrdup($2);} ; %% diff --git a/sample.rcfile b/sample.rcfile index c77f8cbd..cbd35593 100644 --- a/sample.rcfile +++ b/sample.rcfile @@ -75,6 +75,7 @@ # fetchlimit -- must be followed by numeric msg fetch limit # batchlimit -- must be followed by numeric SMTP batch limit # expunge -- must be followed by numeric delete count +# properties -- must be followed by a string # # Legal protocol identifiers are # pop2 (or POP2) |