]> Pileus Git - ~andy/fetchmail/blobdiff - fetchmail.h
Before showdots,
[~andy/fetchmail] / fetchmail.h
index 605c469b001ab888ef4d297ad67597cae6dd6b6a..bba30e219ab938d62fef1d952f8f25e944b08841 100644 (file)
@@ -122,7 +122,7 @@ struct runctl
 
 struct idlist
 {
-    char *id;
+    unsigned char *id;
     union
     {
        struct
@@ -135,7 +135,7 @@ struct idlist
 #define UID_EXPUNGED   3               /* this message has been expunged */ 
         }
        status;
-       char *id2;
+       unsigned char *id2;
     } val;
     struct idlist *next;
 };
@@ -222,6 +222,7 @@ struct hostdata             /* shared among all user connections to given server */
     int poll_count;                    /* count of polls so far */
     char *queryname;                   /* name to attempt DNS lookup on */
     char *truename;                    /* "true name" of server host */
+    char *trueaddr;                     /* IP address of truename, as char */
     struct hostdata *lead_server;      /* ptr to lead query for this server */
     int esmtp_options;
 };
@@ -241,6 +242,7 @@ struct query
     /* per-forwarding-target data */
     struct idlist *smtphunt;   /* list of SMTP hosts to try forwarding to */
     char *smtpaddress;         /* address to force in RCPT TO */ 
+    char *smtpname;             /* full RCPT TO name, including domain */
     struct idlist *antispam;   /* list of listener's antispam response */
     char *mda;                 /* local MDA to pass mail to */
     char *bsmtp;               /* BSMTP output file */
@@ -259,6 +261,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 */
@@ -351,6 +354,7 @@ 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 *fmhome;           /* fetchmail home directory */
 extern int pass;               /* number of re-polling pass */
 extern flag configdump;                /* dump control blocks as Python dictionary */
 extern const char *fetchmailhost;
@@ -401,7 +405,8 @@ extern int phase;
 #define STAGE_GETRANGE 1
 #define STAGE_GETSIZES 2
 #define STAGE_FETCH    3
-#define STAGE_LOGOUT   4
+#define STAGE_IDLE     4
+#define STAGE_LOGOUT   5
 extern int stage;
 
 extern int mytimeout;
@@ -428,8 +433,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 *);
@@ -449,7 +454,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 */
@@ -473,7 +478,7 @@ extern int  UnMimeBodyline(unsigned char **buf, flag delimited, flag issoftline)
 void interface_init(void);
 void interface_parse(char *, struct hostdata *);
 void interface_note_activity(struct hostdata *);
-int interface_approve(struct hostdata *);
+int interface_approve(struct hostdata *, flag domonitor);
 
 /* xmalloc.c */
 #if defined(HAVE_VOIDPOINTER)
@@ -491,7 +496,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 *);
@@ -506,7 +519,7 @@ 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));
-char *getpassword(char *);
+char *fm_getpassword(char *);
 void escapes(const char *, char *);
 char *visbuf(const char *);
 const char *showproto(int);
@@ -514,6 +527,7 @@ 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);
 
 void yyerror(const char *);
 int yylex(void);