]> Pileus Git - ~andy/fetchmail/blobdiff - fetchmail.h
Ready to ship.
[~andy/fetchmail] / fetchmail.h
index 0155bcc02229dee63463b85ba8156889d26bfb6d..aa1c1215f110bf39b86e8c5cf99e065806265751 100644 (file)
@@ -89,6 +89,16 @@ typedef      char    flag;
 #define FLAG_TRUE      2
 #define FLAG_FALSE     1
 
+struct runctl
+{
+    char       *logfile;
+    char       *idfile;
+    int                poll_interval;
+    flag       use_syslog;
+    flag       invisible;
+    char       *postmaster;
+};
+
 struct idlist
 {
     char *id;
@@ -132,6 +142,11 @@ struct hostdata            /* shared among all user connections to given server */
     flag skip;                         /* suppress poll in implicit mode? */
     flag dns;                          /* do DNS lookup on multidrop? */
     flag uidl;                         /* use RFC1725 UIDLs? */
+#ifdef SDPS_ENABLE
+    flag sdps;                         /* use Demon Internet SDPS *ENV */
+#endif /* SDPS_ENABLE */
+    flag checkalias;                   /* resolve aliases by comparing IPs? */
+
 
 #ifdef linux
     char *interface;
@@ -162,7 +177,7 @@ struct query
     struct idlist *smtphunt;   /* list of SMTP hosts to try forwarding to */
     char *smtphost;            /* actual SMTP host to point to */
     char *smtpaddress;         /* address we want to force in the delivery messages */ 
-    int        antispam;               /* listener's antispam response */
+    struct idlist *antispam;   /* list of listener's antispam response */
     char *mda;                 /* local MDA to pass mail to */
     char *preconnect;          /* pre-connection command to execute */
     char *postconnect;         /* post-connection command to execute */
@@ -250,30 +265,22 @@ extern void envquery(int, char **);
 extern int outlevel;           /* see the O_.* constants above */
 extern int yydebug;            /* enable parse debugging */
 
-/* daemon mode control */
-extern int poll_interval;      /* poll interval in seconds */
-extern flag nodetach;          /* if TRUE, don't detach daemon process */
-extern char *logfile;          /* log file for daemon mode */
-extern flag errors_to_syslog;  /* if syslog was set */
-extern flag use_invisible;     /* if invisible was set */
-extern flag quitmode;          /* if --quit was set */
-extern flag check_only;                /* if --check was set */
-extern char *cmd_logfile;      /* if --logfile was set */
-extern int cmd_daemon;         /* if --daemon was set */
-
 /* these get computed */
 extern int batchcount;         /* count of messages sent in current batch */
 extern flag peek_capable;      /* can we read msgs without setting seen? */
 
 /* miscellaneous global controls */
+extern struct runctl run;      /* global controls for this run */
+extern flag nodetach;          /* if TRUE, don't detach daemon process */
+extern flag quitmode;          /* if --quit was set */
+extern flag check_only;                /* if --check was set */
 extern char *rcfile;           /* path name of rc file */
-extern char *idfile;           /* path name of UID file */
 extern int linelimit;          /* limit # lines retrieved per site */
 extern flag versioninfo;       /* emit only version info */
 extern char *user;             /* name of invoking user */
 extern char *home;             /* home directory of invoking user */
-extern char *fetchmailhost;    /* the name of the host running fetchmail */
 extern int pass;               /* number of re-polling pass */
+extern flag configdump;                /* dump control blocks as Python dictionary */
 
 /* prototypes for globally callable functions */
 
@@ -328,7 +335,7 @@ void write_saved_lists(struct query *, const char *);
 
 /* rcfile_y.y */
 int prc_parse_file(const char *, const flag);
-int prc_filecheck(const char *);
+int prc_filecheck(const char *, const flag);
 
 /* base64.c */
 void to64frombits(unsigned char *, const unsigned char *, int);
@@ -367,8 +374,7 @@ int doETRN (struct query *);
 
 /* miscellanea */
 struct query *hostalloc(struct query *); 
-int parsecmdline (int, char **, struct query *);
-void optmerge(struct query *, struct query *);
+int parsecmdline (int, char **, struct runctl *, struct query *);
 char *MD5Digest (unsigned char *);
 int POP3_auth_rpa(unsigned char *, unsigned char *, int socket);
 int daemonize(const char *, void (*)(int));
@@ -376,6 +382,11 @@ char *getpassword(char *);
 void escapes(const char *, char *);
 char *visbuf(const char *);
 char *showproto(int);
+void dump_config(struct runctl *runp, struct query *querylist);
+int is_host_alias(const char *, struct query *);
+#ifdef SDPS_ENABLE
+char *sdps_envto;
+#endif /* SDPS_ENABLE */
 
 void yyerror(const char *);
 int yylex(void);
@@ -394,5 +405,6 @@ void itimerthread(void*);
 #endif
 
 #define STRING_DISABLED        (char *)-1
+#define STRING_DUMMY   ""
 
 /* fetchmail.h ends here */