]> Pileus Git - ~andy/fetchmail/commitdiff
Now we can have top-level properties.
authorEric S. Raymond <esr@thyrsus.com>
Sun, 31 Jan 1999 21:15:12 +0000 (21:15 -0000)
committerEric S. Raymond <esr@thyrsus.com>
Sun, 31 Jan 1999 21:15:12 +0000 (21:15 -0000)
svn path=/trunk/; revision=2368

conf.c
fetchmail.h
fetchmail.man
fetchmailconf
rcfile_y.y

diff --git a/conf.c b/conf.c
index b8603f980720c7c4f063ce687c9e1a22c6e0464e..b12c8d7638d6acf5828df61021e0c42fcf6a62fe 100644 (file)
--- a/conf.c
+++ b/conf.c
@@ -183,11 +183,12 @@ void dump_config(struct runctl *runp, struct query *querylist)
     indent('{');
 
     numdump("poll_interval", runp->poll_interval);
-    booldump("syslog", runp->use_syslog);
     stringdump("logfile", runp->logfile);
     stringdump("idfile", runp->idfile);
     stringdump("postmaster", runp->postmaster);
+    stringdump("properties", runp->properties);
     booldump("invisible", runp->invisible);
+    booldump("syslog", runp->use_syslog);
 
     if (!querylist)
     {
index 1e4e6c511e9031833d9cee745134be9d1416cded..f07f04acb1011117bb4a8c1fe3c8cf920dd77d3d 100644 (file)
@@ -103,9 +103,10 @@ struct runctl
     char       *logfile;
     char       *idfile;
     int                poll_interval;
+    char       *postmaster;
+    char       *properties;
     flag       use_syslog;
     flag       invisible;
-    char       *postmaster;
 };
 
 struct idlist
index 7e100034bb62ab6326e31e800070ded523451aa7..6eb9a2897778b909db8aa0c7c0c105f4f67885f4 100644 (file)
@@ -957,6 +957,9 @@ T}
 set nosyslog   \&      T{
 Turn off error logging through syslog(3).
 T}
+set properties         \&      T{
+String value is ignored by fetchmail (may be used by extension scripts)
+T}
 .TE
 
 Here are the legal server options:
index b49fc7b0b0156e24e927f66fd1dc58d34493f580..846ed1d7136a1d96a2aacfec9f7b24c9e89aef16 100755 (executable)
@@ -16,18 +16,20 @@ import sys, time, os, string, socket, getopt
 class Configuration:
     def __init__(self):
        self.poll_interval = 0          # Normally, run in foreground
-       self.syslog = FALSE             # Use syslogd for logging?
        self.logfile = None             # No logfile, initially
        self.idfile = os.environ["HOME"] + "/.fetchids"         # Default idfile, initially
         self.postmaster = None         # No last-resort address, initially
+        self.properties = None         # No exiguous properties
        self.invisible = FALSE          # Suppress Received line & spoof?
+       self.syslog = FALSE             # Use syslogd for logging?
        self.servers = []               # List of included sites
        Configuration.typemap = (
            ('poll_interval',   'Int'),
-           ('syslog',          'Boolean'),
            ('logfile',         'String'),
            ('idfile',          'String'),
            ('postmaster',      'String'),
+           ('properties',      'String'),
+           ('syslog',          'Boolean'),
            ('invisible',       'Boolean'))
 
     def __repr__(self):
@@ -40,6 +42,8 @@ class Configuration:
            str = str + ("set idfile \"%s\"\n" % (self.idfile,));
        if self.postmaster != ConfigurationDefaults.postmaster:
            str = str + ("set postmaster \"%s\"\n" % (self.postmaster,));
+       if self.properties != ConfigurationDefaults.properties:
+           str = str + ("set properties \"%s\"\n" % (self.properties,));
        if self.poll_interval > 0:
            str = str + "set daemon " + `self.poll_interval` + "\n"
        for site in self.servers:
index 050846359c0937aa69ee3838ba061fbcfde8f5bb..adf21428978ea83d2bee4c0c955d2c415562f2ed 100644 (file)
@@ -88,6 +88,7 @@ statement     : SET LOGFILE optmap STRING     {run.logfile = xstrdup($4);}
                | SET IDFILE optmap STRING      {run.idfile = xstrdup($4);}
                | SET DAEMON optmap NUMBER      {run.poll_interval = $4;}
                | SET POSTMASTER optmap STRING  {run.postmaster = xstrdup($4);}
+               | SET PROPERTIES optmap STRING  {run.properties =xstrdup($4);}
                | SET SYSLOG                    {run.use_syslog = TRUE;}
                | SET INVISIBLE                 {run.invisible = TRUE;}