]> Pileus Git - ~andy/fetchmail/blobdiff - fetchmail.h
We can specify the authentication command now.
[~andy/fetchmail] / fetchmail.h
index fd5403edaf70e50324f56e21b5d37f3a135cee16..c0f72f69af097407ef190737ebfeabe583601078 100644 (file)
@@ -17,6 +17,7 @@
 #define                P_IMAP_CRAM_MD5 9
 #define                P_IMAP_LOGIN    10
 #define                P_ETRN          11
+#define                P_ODMR          12
 
 #if INET6_ENABLE
 #define                SMTP_PORT       "smtp"
@@ -115,14 +116,16 @@ struct runctl
     int                poll_interval;
     char       *postmaster;
     flag       bouncemail;
+    flag       spambounce;
     char       *properties;
     flag       use_syslog;
     flag       invisible;
+    flag       showdots;
 };
 
 struct idlist
 {
-    char *id;
+    unsigned char *id;
     union
     {
        struct
@@ -135,7 +138,7 @@ struct idlist
 #define UID_EXPUNGED   3               /* this message has been expunged */ 
         }
        status;
-       char *id2;
+       unsigned char *id2;
     } val;
     struct idlist *next;
 };
@@ -206,6 +209,7 @@ struct hostdata             /* shared among all user connections to given server */
     flag sdps;                         /* use Demon Internet SDPS *ENV */
 #endif /* SDPS_ENABLE */
     flag checkalias;                   /* resolve aliases by comparing IPs? */
+    char *principal;                   /* Kerberos principal for mail service */
 
 
 #if defined(linux) || defined(__FreeBSD__)
@@ -261,6 +265,7 @@ struct query
     flag forcecr;              /* if TRUE, force CRs before LFs in text */
     flag pass8bits;            /* if TRUE, ignore Content-Transfer-Encoding */
     flag dropstatus;           /* if TRUE, drop Status lines in mail */
+    flag dropdelivered;         /* if TRUE, drop Delivered-To lines in mail */
     flag mimedecode;           /* if TRUE, decode MIME-armored messages */
     flag idle;                 /* if TRUE, idle after each poll */
     int        limit;                  /* limit size of retrieved messages */
@@ -358,6 +363,7 @@ extern int pass;            /* number of re-polling pass */
 extern flag configdump;                /* dump control blocks as Python dictionary */
 extern const char *fetchmailhost;
                                /* either "localhost" or an FQDN */
+extern suppress_tags;          /* suppress tags in tagged protocols? */
 #ifdef SDPS_ENABLE
 extern char *sdps_envfrom;
 extern char *sdps_envto;
@@ -432,8 +438,8 @@ void stuff_warning();
 void close_warning_by_mail(struct query *, struct msgblk *);
 
 /* rfc822.c: RFC822 header parsing */
-char *reply_hack(char *, const char *);
-char *nxtaddr(const char *);
+unsigned char *reply_hack(unsigned char *, const unsigned char *);
+unsigned char *nxtaddr(const unsigned char *);
 
 /* uid.c: UID support */
 void initialize_saved_lists(struct query *, const char *);
@@ -453,7 +459,7 @@ char *str_find(struct idlist **, int);
 char *idpair_find(struct idlist **, const char *);
 void append_str_list(struct idlist **, struct idlist **);
 void expunge_uids(struct query *);
-void uid_end_query(struct query *);
+void uid_swap_lists(struct query *);
 void write_saved_lists(struct query *, const char *);
 
 /* rcfile_y.y */
@@ -495,7 +501,15 @@ char *xstrdup(const char *);
  #pragma alloca
 #endif
 #endif
-#define        xalloca(ptr, t, n)      if (!(ptr = (t) alloca(n))) {report(stderr, "alloca failed"); exit(PS_UNDEFINED);}
+#define        xalloca(ptr, t, n)      if (!(ptr = (t) alloca(n)))\
+       {report(stderr, _("alloca failed")); exit(PS_UNDEFINED);}
+#if FALSE
+/*
+ * This is a hack to help xgettext which cannot find strings in
+ * macro definitions like the one for xalloca above.
+ */
+static char *dummy = gettext_noop("alloca failed");
+#endif
 
 /* protocol driver and methods */
 int do_protocol(struct query *, const struct method *);
@@ -509,6 +523,7 @@ struct query *hostalloc(struct query *);
 int parsecmdline (int, char **, struct runctl *, struct query *);
 char *MD5Digest (unsigned char *);
 int POP3_auth_rpa(unsigned char *, unsigned char *, int socket);
+void deal_with_sigchld(void);
 int daemonize(const char *, void (*)(int));
 char *fm_getpassword(char *);
 void escapes(const char *, char *);
@@ -518,6 +533,8 @@ void dump_config(struct runctl *runp, struct query *querylist);
 int is_host_alias(const char *, struct query *);
 char *host_fqdn(void);
 char *rfc822timestamp(void);
+flag isafile(int);
+int do_cram_md5 (int sock, char *command, struct query *ctl);
 
 void yyerror(const char *);
 int yylex(void);
@@ -550,4 +567,16 @@ char *strerror ();
 #endif
 #endif
 
+#ifdef FETCHMAIL_DEBUG
+#define exit(e) do { \
+       FILE *out; \
+       out = fopen("/tmp/fetchmail.log", "a"); \
+       fprintf(out, \
+               "Exiting fetchmail from file %s, line %d with status %d\n", \
+               __FILE__, __LINE__, e); \
+       fclose(out); \
+       _exit(e); \
+       } while(0)
+#endif /* FETCHMAIL_DEBUG */
+
 /* fetchmail.h ends here */