2 * For license terms, see the file COPYING in this directory.
5 /* We need this for HAVE_STDARG_H, etc */
8 /* We need this for size_t */
11 /* We need this for time_t */
12 #if TIME_WITH_SYS_TIME
13 # include <sys/time.h>
17 # include <sys/time.h>
25 /* Import Trio if needed */
26 #if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF)
27 # include "trio/trio.h"
30 /* We need this for strstr */
31 #if !defined(HAVE_STRSTR) && !defined(strstr)
32 char *strstr(const char *, const char *);
35 /* constants designating the various supported protocols */
46 #define SMTP_PORT "smtp"
47 #define KPOP_PORT "kpop"
48 #else /* INET6_ENABLE */
50 #define KPOP_PORT 1109
51 #endif /* INET6_ENABLE */
54 #define SIMAP_PORT 993
55 #define SPOP3_PORT 995
59 * We need to distinguish between mailbox and mailbag protocols.
60 * Under a mailbox protocol wwe're pulling mail for a speecific user.
61 * Under a mailbag protocol we're fetching mail for an entire domain.
63 #define MAILBOX_PROTOCOL(ctl) ((ctl)->server.protocol < P_ETRN)
65 /* authentication types */
66 #define A_ANY 0 /* use the first method that works */
67 #define A_PASSWORD 1 /* password authentication */
68 #define A_NTLM 2 /* Microsoft NTLM protocol */
69 #define A_CRAM_MD5 3 /* CRAM-MD5 shrouding (RFC2195) */
70 #define A_OTP 4 /* One-time password (RFC1508) */
71 #define A_KERBEROS_V4 5 /* authenticate w/ Kerberos V4 */
72 #define A_KERBEROS_V5 6 /* authenticate w/ Kerberos V5 */
73 #define A_GSSAPI 7 /* authenticate with GSSAPI */
74 #define A_SSH 8 /* authentication at session level */
76 /* some protocols (KERBEROS, GSSAPI, SSH) don't require a password */
77 #define NO_PASSWORD(ctl) ((ctl)->server.authenticate > A_OTP || (ctl)->server.protocol == P_ETRN)
80 * Definitions for buffer sizes. We get little help on setting maxima
81 * from IMAP RFCs up to 2060, so these are mostly from POP3.
83 #define HOSTLEN 635 /* max hostname length (RFC1123) */
84 #define POPBUFSIZE 512 /* max length of response (RFC1939) */
85 #define IDLEN 128 /* max length of UID (RFC1939) */
87 /* per RFC1939 this should be 40, but Microsoft Exchange ignores that limit */
88 #define USERNAMELEN 128 /* max POP3 arg length */
90 /* clear a netBSD kernel parameter out of the way */
94 * The RFC822 limit on message line size is just 998. But
95 * make this *way* oversized; idiot DOS-world mailers that
96 * don't line-wrap properly often ship entire paragraphs as
99 #define MSGBUFSIZE 8192
101 #define NAMELEN 64 /* max username length */
102 #define PASSWORDLEN 64 /* max password length */
103 #define DIGESTLEN 33 /* length of MD5 digest */
105 /* exit code values */
106 #define PS_SUCCESS 0 /* successful receipt of messages */
107 #define PS_NOMAIL 1 /* no mail available */
108 #define PS_SOCKET 2 /* socket I/O woes */
109 #define PS_AUTHFAIL 3 /* user authorization failed */
110 #define PS_PROTOCOL 4 /* protocol violation */
111 #define PS_SYNTAX 5 /* command-line syntax error */
112 #define PS_IOERR 6 /* bad permissions on rc file */
113 #define PS_ERROR 7 /* protocol error */
114 #define PS_EXCLUDE 8 /* client-side exclusion error */
115 #define PS_LOCKBUSY 9 /* server responded lock busy */
116 #define PS_SMTP 10 /* SMTP error */
117 #define PS_DNS 11 /* fatal DNS error */
118 #define PS_BSMTP 12 /* output batch could not be opened */
119 #define PS_MAXFETCH 13 /* poll ended by fetch limit */
120 #define PS_SERVBUSY 14 /* server is busy */
121 /* leave space for more codes */
122 #define PS_UNDEFINED 23 /* something I hadn't thought of */
123 #define PS_TRANSIENT 24 /* transient failure (internal use) */
124 #define PS_REFUSED 25 /* mail refused (internal use) */
125 #define PS_RETAINED 26 /* message retained (internal use) */
126 #define PS_TRUNCATED 27 /* headers incomplete (internal use) */
127 #define PS_REPOLL 28 /* repoll immediately with changed parameters (internal use) */
128 #define PS_IDLETIMEOUT 29 /* timeout on imap IDLE (internal use) */
130 /* output noise level */
131 #define O_SILENT 0 /* mute, max squelch, etc. */
132 #define O_NORMAL 1 /* user-friendly */
133 #define O_VERBOSE 2 /* chatty */
134 #define O_DEBUG 3 /* prolix */
135 #define O_MONITOR O_VERBOSE
137 #define SIZETICKER 1024 /* print 1 dot per this many bytes */
140 * We #ifdef this and use flag rather than bool
141 * to avoid a type clash with curses.h
149 /* we need to use zero as a flag-uninitialized value */
175 flag mark; /* UID-index information */
176 #define UID_UNSEEN 0 /* hasn't been seen */
177 #define UID_SEEN 1 /* seen, but not deleted */
178 #define UID_DELETED 2 /* this message has been deleted */
179 #define UID_EXPUNGED 3 /* this message has been expunged */
189 struct method /* describe methods for protocol state machine */
191 const char *name; /* protocol name */
194 const char *sslservice;
195 #else /* INET6_ENABLE */
196 int port; /* service port */
197 int sslport; /* service port for ssl */
198 #endif /* INET6_ENABLE */
199 flag tagged; /* if true, generate & expect command tags */
200 flag delimited; /* if true, accept "." message delimiter */
201 int (*parse_response)(int, char *);
202 /* response_parsing function */
203 int (*getauth)(int, struct query *, char *);
204 /* authorization fetcher */
205 int (*getrange)(int, struct query *, const char *, int *, int *, int *);
206 /* get message range to fetch */
207 int (*getsizes)(int, int, int *);
208 /* get sizes of messages */
209 int (*getpartialsizes)(int, int, int, int *);
210 /* get sizes of subset of messages */
211 int (*is_old)(int, struct query *, int);
212 /* check for old message */
213 int (*fetch_headers)(int, struct query *, int, int *);
214 /* fetch FROM headera given message */
215 int (*fetch_body)(int, struct query *, int, int *);
216 /* fetch a given message */
217 int (*trail)(int, struct query *, int);
218 /* eat trailer of a message */
219 int (*delete)(int, struct query *, int);
221 int (*mark_seen)(int, struct query *, int);
222 /* mark as seen method */
223 int (*logout_cmd)(int, struct query *);
225 flag retry; /* can getrange poll for new messages? */
228 struct hostdata /* shared among all user connections to given server */
231 char *pollname; /* poll label of host */
232 char *via; /* "true" server name if non-NULL */
233 struct idlist *akalist; /* server name first, then akas */
234 struct idlist *localdomains; /* list of pass-through domains */
235 int protocol; /* protocol type */
237 char *service; /* IPv6 service name */
238 void *netsec; /* IPv6 security request */
239 #else /* INET6_ENABLE */
240 int port; /* TCP/IP service port number */
241 #endif /* INET6_ENABLE */
242 int interval; /* # cycles to skip between polls */
243 int authenticate; /* authentication mode to try */
244 int timeout; /* inactivity timout in seconds */
245 char *envelope; /* envelope address list header */
246 int envskip; /* skip to numbered envelope header */
247 char *qvirtual; /* prefix removed from local user id */
248 flag skip; /* suppress poll in implicit mode? */
249 flag dns; /* do DNS lookup on multidrop? */
250 flag uidl; /* use RFC1725 UIDLs? */
252 flag sdps; /* use Demon Internet SDPS *ENV */
253 #endif /* SDPS_ENABLE */
254 flag checkalias; /* resolve aliases by comparing IPs? */
255 flag tracepolls; /* if TRUE, add poll trace info to Received */
256 char *principal; /* Kerberos principal for mail service */
257 char *esmtp_name, *esmtp_password; /* ESMTP AUTH information */
259 #if defined(linux) || defined(__FreeBSD__)
263 struct interface_pair_s *interface_pair;
266 char *plugin,*plugout;
268 /* computed for internal use */
269 const struct method *base_protocol; /* relevant protocol method table */
270 int poll_count; /* count of polls so far */
271 char *queryname; /* name to attempt DNS lookup on */
272 char *truename; /* "true name" of server host */
273 char *trueaddr; /* IP address of truename, as char */
274 struct hostdata *lead_server; /* ptr to lead query for this server */
280 /* mailserver connection controls */
281 struct hostdata server;
284 struct idlist *localnames; /* including calling user's name */
285 int wildcard; /* should unmatched names be passed through */
286 char *remotename; /* remote login name to use */
287 char *password; /* remote password to use */
288 struct idlist *mailboxes; /* list of mailboxes to check */
290 /* per-forwarding-target data */
291 struct idlist *smtphunt; /* list of SMTP hosts to try forwarding to */
292 struct idlist *domainlist; /* domainlist to fetch from */
293 char *smtpaddress; /* address to force in RCPT TO */
294 char *smtpname; /* full RCPT TO name, including domain */
295 struct idlist *antispam; /* list of listener's antispam response */
296 char *mda; /* local MDA to pass mail to */
297 char *bsmtp; /* BSMTP output file */
298 char listener; /* what's the listener's wire protocol? */
299 #define SMTP_MODE 'S'
300 #define LMTP_MODE 'L'
301 char *preconnect; /* pre-connection command to execute */
302 char *postconnect; /* post-connection command to execute */
304 /* per-user control flags */
305 flag keep; /* if TRUE, leave messages undeleted */
306 flag fetchall; /* if TRUE, fetch all (not just unseen) */
307 flag flush; /* if TRUE, delete messages already seen */
308 flag rewrite; /* if TRUE, canonicalize recipient addresses */
309 flag stripcr; /* if TRUE, strip CRs in text */
310 flag forcecr; /* if TRUE, force CRs before LFs in text */
311 flag pass8bits; /* if TRUE, ignore Content-Transfer-Encoding */
312 flag dropstatus; /* if TRUE, drop Status lines in mail */
313 flag dropdelivered; /* if TRUE, drop Delivered-To lines in mail */
314 flag mimedecode; /* if TRUE, decode MIME-armored messages */
315 flag idle; /* if TRUE, idle after each poll */
316 int limit; /* limit size of retrieved messages */
317 int warnings; /* size warning interval */
318 int fetchlimit; /* max # msgs to get in single poll */
319 int fetchsizelimit; /* max # msg sizes to get in a request */
320 int fastuidl; /* do binary search for new UIDLs? */
321 int fastuidlcount; /* internal count for frequency of binary search */
322 int batchlimit; /* max # msgs to pass in single SMTP session */
323 int expunge; /* max # msgs to pass between expunges */
324 flag use_ssl; /* use SSL encrypted session */
325 char *sslkey; /* optional SSL private key file */
326 char *sslcert; /* optional SSL certificate file */
327 char *sslproto; /* force usage of protocol (ssl2|ssl3|tls1) - defaults to ssl23 */
328 char *sslcertpath; /* Trusted certificate directory for checking the server cert */
329 flag sslcertck; /* Strictly check the server cert. */
330 char *sslfingerprint; /* Fingerprint to check against */
331 char *properties; /* passthrough properties for extensions */
333 /* internal use -- per-poll state */
334 flag active; /* should we actually poll this server? */
335 const char *destaddr; /* destination host for this query */
336 int errcount; /* count transient errors in last pass */
337 int authfailcount; /* count of authorization failures */
338 int wehaveauthed; /* We've managed to logon at least once! */
339 int wehavesentauthnote; /* We've sent an authorization failure note */
340 int wedged; /* wedged by auth failures or timeouts? */
341 char *smtphost; /* actual SMTP host we connected to */
342 int smtp_socket; /* socket descriptor for SMTP connection */
343 unsigned int uid; /* UID of user to deliver to */
344 struct idlist *skipped; /* messages skipped on the mail server */
345 struct idlist *oldsaved, *newsaved;
346 struct idlist **oldsavedend;
347 char lastdigest[DIGESTLEN]; /* last MD5 hash seen on this connection */
349 /* internal use -- per-message state */
350 int mimemsg; /* bitmask indicating MIME body-type */
351 char digest[DIGESTLEN]; /* md5 digest buffer */
353 /* internal use -- housekeeping */
354 struct query *next; /* next query control block in chain */
357 struct msgblk /* message header parsed for open_sink() */
359 char *headers; /* raw message headers */
360 struct idlist *recipients; /* addressees */
361 char return_path[HOSTLEN + USERNAMELEN + 4];
368 * Numeric option handling. Numeric option value of zero actually means
369 * it's unspecified. Value less than zero is zero. The reason for this
370 * screwy encoding is so we can zero out an option block in order to set the
371 * numeric flags in it to unspecified.
373 #define NUM_VALUE_IN(n) (((n) == 0) ? -1 : (n))
374 #define NUM_VALUE_OUT(n) (((n) < 0) ? 0 : (n))
375 #define NUM_NONZERO(n) ((n) > 0)
376 #define NUM_ZERO(n) ((n) < 0)
377 #define NUM_SPECIFIED(n) ((n) != 0)
379 #define MULTIDROP(ctl) (ctl->wildcard || \
380 ((ctl)->localnames && (ctl)->localnames->next))
383 * Note: tags are generated with an a%04d format from a 1-origin
384 * integer sequence number. Length 4 permits transaction numbers
385 * up to 9999, so we force rollover with % 10000. There's no special
386 * reason for this format other than to look like the exmples in the
389 #define TAGLEN 6 /* 'a' + 4 digits + NUL */
390 extern char tag[TAGLEN];
393 /* list of hosts assembled from run control file and command line */
394 extern struct query cmd_opts, *querylist;
396 /* what's returned by envquery */
397 extern void envquery(int, char **);
399 /* controls the detail level of status/progress messages written to stderr */
400 extern int outlevel; /* see the O_.* constants above */
401 extern int yydebug; /* enable parse debugging */
403 /* these get computed */
404 extern int batchcount; /* count of messages sent in current batch */
405 extern flag peek_capable; /* can we read msgs without setting seen? */
407 /* miscellaneous global controls */
408 extern struct runctl run; /* global controls for this run */
409 extern flag nodetach; /* if TRUE, don't detach daemon process */
410 extern flag quitmode; /* if --quit was set */
411 extern flag check_only; /* if --check was set */
412 extern char *rcfile; /* path name of rc file */
413 extern int linelimit; /* limit # lines retrieved per site */
414 extern flag versioninfo; /* emit only version info */
415 extern char *user; /* name of invoking user */
416 extern char *home; /* home directory of invoking user */
417 extern char *fmhome; /* fetchmail home directory */
418 extern int pass; /* number of re-polling pass */
419 extern flag configdump; /* dump control blocks as Python dictionary */
420 extern char *fetchmailhost; /* either "localhost" or an FQDN */
421 extern int suppress_tags; /* suppress tags in tagged protocols? */
422 extern char shroud[PASSWORDLEN*2+3]; /* string to shroud in debug output */
424 extern char *sdps_envfrom;
425 extern char *sdps_envto;
426 #endif /* SDPS_ENABLE */
428 extern const char *iana_charset; /* IANA assigned charset name */
430 /* from ucs/norm_charmap.c */
431 const char *norm_charmap(const char *name);
433 /* prototypes for globally callable functions */
435 /* from /usr/include/sys/cdefs.h */
436 #if !defined __GNUC__ || __GNUC__ < 2
437 # define __attribute__(xyz) /* Ignore. */
440 /* error.c: Error reporting */
441 #if defined(HAVE_STDARG_H)
442 void report_init(int foreground);
443 void report (FILE *fp, const char *format, ...)
444 __attribute__ ((format (printf, 2, 3)))
446 void report_build (FILE *fp, const char *format, ...)
447 __attribute__ ((format (printf, 2, 3)))
449 void report_complete (FILE *fp, const char *format, ...)
450 __attribute__ ((format (printf, 2, 3)))
452 void report_at_line (FILE *fp, int, const char *, unsigned int, const char *, ...)
453 __attribute__ ((format (printf, 5, 6)))
457 void report_build ();
458 void report_complete ();
459 void report_at_line ();
462 /* driver.c -- main driver loop */
463 void set_timeout(int);
464 int isidletimeout(void);
465 void resetidletimeout(void);
466 int do_protocol(struct query *, const struct method *);
468 /* transact.c: transaction support */
469 void init_transact(const struct method *);
470 int readheaders(int sock,
475 flag *suppress_readbody);
476 int readbody(int sock, struct query *ctl, flag forward, int len);
477 #if defined(HAVE_STDARG_H)
478 void gen_send(int sock, const char *, ... )
479 __attribute__ ((format (printf, 2, 3)))
481 int gen_recv(int sock, char *buf, int size);
482 int gen_transact(int sock, const char *, ... )
483 __attribute__ ((format (printf, 2, 3)))
490 extern struct msgblk msgblk;
492 /* lock.c: concurrency locking */
493 void lock_setup(void), lock_assert(void);
494 void lock_or_die(void), lock_release(void);
495 int lock_state(void);
496 void lock_dispose(void);
498 /* use these to track what was happening when the nonresponse timer fired */
499 #define GENERAL_WAIT 0 /* unknown wait type */
500 #define OPEN_WAIT 1 /* waiting from mailserver open */
501 #define SERVER_WAIT 2 /* waiting for mailserver response */
502 #define LISTENER_WAIT 3 /* waiting for listener initialization */
503 #define FORWARDING_WAIT 4 /* waiting for listener response */
506 /* response hooks can use this to identify the query stage */
507 #define STAGE_GETAUTH 0
508 #define STAGE_GETRANGE 1
509 #define STAGE_GETSIZES 2
510 #define STAGE_FETCH 3
512 #define STAGE_LOGOUT 5
515 extern int mytimeout;
517 /* mark values for name lists */
518 #define XMIT_ACCEPT 1 /* accepted; matches local domain or name */
519 #define XMIT_REJECT 2 /* rejected; no match */
520 #define XMIT_RCPTBAD 3 /* SMTP listener rejected the name */
523 int interruptible_idle(int interval);
524 extern volatile int lastsig;
526 /* sink.c: forwarding */
527 void smtp_close(struct query *, int);
528 int smtp_open(struct query *);
529 char *rcpt_address(struct query *, const char *, int);
530 int stuffline(struct query *, char *);
531 int open_sink(struct query*, struct msgblk *, int*, int*);
532 void release_sink(struct query *);
533 int close_sink(struct query *, struct msgblk *, flag);
534 int open_warning_by_mail(struct query *, struct msgblk *);
535 #if defined(HAVE_STDARG_H)
536 void stuff_warning(const char *, struct query *, const char *, ... )
537 __attribute__ ((format (printf, 3, 4)))
540 void stuff_warning();
542 void close_warning_by_mail(struct query *, struct msgblk *);
544 /* rfc822.c: RFC822 header parsing */
545 unsigned char *reply_hack(unsigned char *, const unsigned char *, size_t *);
546 unsigned char *nxtaddr(const unsigned char *);
548 /* uid.c: UID support */
549 extern int dofastuidl;
551 void initialize_saved_lists(struct query *, const char *);
552 struct idlist *save_str(struct idlist **, const char *, flag);
553 void free_str_list(struct idlist **);
554 struct idlist *copy_str_list(struct idlist *idl);
555 void save_str_pair(struct idlist **, const char *, const char *);
556 void free_str_pair_list(struct idlist **);
557 int delete_str(struct idlist **, long);
558 struct idlist *str_in_list(struct idlist **, const char *, const flag);
559 int str_nr_in_list(struct idlist **, const char *);
560 int str_nr_last_in_list(struct idlist **, const char *);
561 void str_set_mark( struct idlist **, const char *, const flag);
562 int count_list( struct idlist **idl );
563 char *str_from_nr_list( struct idlist **idl, long number );
564 char *str_find(struct idlist **, long);
565 struct idlist *id_find(struct idlist **idl, long);
566 char *idpair_find(struct idlist **, const char *);
567 void append_str_list(struct idlist **, struct idlist **);
568 void expunge_uids(struct query *);
569 void uid_swap_lists(struct query *);
570 void uid_discard_new_list(struct query *ctl);
571 void uid_reset_num(struct query *ctl);
572 void write_saved_lists(struct query *, const char *);
575 int prc_parse_file(const char *, const flag);
576 int prc_filecheck(const char *, const flag);
579 void to64frombits(unsigned char *, const unsigned char *, int);
580 int from64tobits(char *, const char *, int maxlen);
583 /* Bit-mask returned by MimeBodyType */
584 #define MSG_IS_7BIT 0x01
585 #define MSG_IS_8BIT 0x02
586 #define MSG_NEEDS_DECODE 0x80
587 extern void UnMimeHeader(unsigned char *buf);
588 extern int MimeBodyType(unsigned char *hdrs, int WantDecode);
589 extern int UnMimeBodyline(unsigned char **buf, flag delimited, flag issoftline);
592 void interface_init(void);
593 void interface_parse(char *, struct hostdata *);
594 void interface_note_activity(struct hostdata *);
595 int interface_approve(struct hostdata *, flag domonitor);
598 #if defined(HAVE_VOIDPOINTER)
599 #define XMALLOCTYPE void
601 #define XMALLOCTYPE char
603 XMALLOCTYPE *xmalloc(size_t);
604 XMALLOCTYPE *xrealloc(/*@null@*/ XMALLOCTYPE *, size_t);
605 char *xstrdup(const char *);
606 #if defined(HAVE_ALLOCA_H)
613 #define xalloca(ptr, t, n) if (!(ptr = (t) alloca(n)))\
614 {report(stderr, GT_("alloca failed")); exit(PS_UNDEFINED);}
617 * This is a hack to help xgettext which cannot find strings in
618 * macro definitions like the one for xalloca above.
620 static char *dummy = gettext_noop("alloca failed");
623 /* protocol driver and methods */
624 int doPOP2 (struct query *);
625 int doPOP3 (struct query *);
626 int doIMAP (struct query *);
627 int doETRN (struct query *);
628 int doODMR (struct query *);
630 /* authentication functions */
631 int do_cram_md5(int sock, char *command, struct query *ctl, char *strip);
632 int do_rfc1731(int sock, char *command, char *truename);
633 int do_gssauth(int sock, char *command, char *service, char *hostname, char *username);
634 int do_otp(int sock, char *command, struct query *ctl);
638 /* these should be of size PATH_MAX */
639 extern char currentwd[1024], rcfiledir[1024];
641 struct query *hostalloc(struct query *);
642 int parsecmdline (int, char **, struct runctl *, struct query *);
643 char *prependdir (const char *, const char *);
644 char *MD5Digest (unsigned char *);
645 void hmac_md5 (unsigned char *, size_t, unsigned char *, size_t, unsigned char *, size_t);
646 int POP3_auth_rpa(unsigned char *, unsigned char *, int socket);
647 typedef RETSIGTYPE (*SIGHANDLERTYPE) (int);
648 void deal_with_sigchld(void);
649 RETSIGTYPE null_signal_handler(int sig);
650 SIGHANDLERTYPE set_signal_handler(int sig, SIGHANDLERTYPE handler);
651 int daemonize(const char *, void (*)(int));
652 char *fm_getpassword(char *);
653 void escapes(const char *, char *);
654 char *visbuf(const char *);
655 const char *showproto(int);
656 void dump_config(struct runctl *runp, struct query *querylist);
657 int is_host_alias(const char *, struct query *);
658 char *host_fqdn(void);
659 char *rfc822timestamp(void);
661 char *rfc2047e(const char*, const char *);
663 void yyerror(const char *);
667 void itimerthread(void*);
668 /* Have to include these first to avoid errors from redefining getcwd
669 and chdir. They're re-include protected in EMX, so it's okay, I
673 /* Redefine getcwd and chdir to get drive-letter support so we can
674 find all of our lock files and stuff. */
675 #define getcwd _getcwd2
676 #define chdir _chdir2
680 # ifndef strerror /* On some systems, strerror is a macro */
681 char *strerror (int);
683 # endif /* HAVE_STRERROR */
685 #define STRING_DISABLED (char *)-1
686 #define STRING_DUMMY ""
690 #define S_IXGRP 0000010
695 char *stpcpy(char *, const char*);
698 #ifdef FETCHMAIL_DEBUG
699 #define exit(e) do { \
701 out = fopen("/tmp/fetchmail.log", "a"); \
703 "Exiting fetchmail from file %s, line %d with status %d\n", \
704 __FILE__, __LINE__, e); \
708 #endif /* FETCHMAIL_DEBUG */
712 #else /* !__CYGWIN__ */
714 #endif /* __CYGWIN__ */
716 extern int mailserver_socket_temp;
717 extern char *program_name;
719 /* POSIX space characters,
720 * <tab>;<newline>;<vertical-tab>;<form-feed>;<carriage-return>;<space> */
721 #define POSIX_space "\t\n\v\f\r "
723 /* strlcpy/strlcat prototypes */
726 strlcat(chat *dst, const char *src, size_t siz);
730 strlcpy(char *dst, const char *src, size_t siz);
733 /* fetchmail.h ends here */