#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;
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;
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 */
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 */
/* 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);
/* 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));
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);
#endif
#define STRING_DISABLED (char *)-1
+#define STRING_DUMMY ""
/* fetchmail.h ends here */