| mail.h | | mail.h | |
| | | | |
| skipping to change at line 13 | | skipping to change at line 13 | |
| * | | * | |
| * Author: Mark Crispin | | * Author: Mark Crispin | |
| * Networks and Distributed Computing | | * Networks and Distributed Computing | |
| * Computing & Communications | | * Computing & Communications | |
| * University of Washington | | * University of Washington | |
| * Administration Building, AG-44 | | * Administration Building, AG-44 | |
| * Seattle, WA 98195 | | * Seattle, WA 98195 | |
| * Internet: MRC@CAC.Washington.EDU | | * Internet: MRC@CAC.Washington.EDU | |
| * | | * | |
| * Date: 22 November 1989 | | * Date: 22 November 1989 | |
|
| * Last Edited: 7 January 2003 | | * Last Edited: 2 April 2003 | |
| * | | * | |
| * The IMAP toolkit provided in this Distribution is | | * The IMAP toolkit provided in this Distribution is | |
| * Copyright 1988-2003 University of Washington. | | * Copyright 1988-2003 University of Washington. | |
| * The full text of our legal notices is contained in the file called | | * The full text of our legal notices is contained in the file called | |
| * CPYRIGHT, included with this Distribution. | | * CPYRIGHT, included with this Distribution. | |
| */ | | */ | |
| /* Build parameters */ | | /* Build parameters */ | |
| | | | |
| #define CACHEINCREMENT 250 /* cache growth increments */ | | #define CACHEINCREMENT 250 /* cache growth increments */ | |
| #define MAILTMPLEN 1024 /* size of a temporary buffer */ | | #define MAILTMPLEN 1024 /* size of a temporary buffer */ | |
| #define MAXMESSAGESIZE 65000 /* MS-DOS: maximum text buffer size | | #define MAXMESSAGESIZE 65000 /* MS-DOS: maximum text buffer size | |
| * other: initial text buffer size */ | | * other: initial text buffer size */ | |
| #define MAXUSERFLAG 64 /* maximum length of a user flag */ | | #define MAXUSERFLAG 64 /* maximum length of a user flag */ | |
| #define MAXAUTHENTICATORS 8 /* maximum number of SASL authenticators */ | | #define MAXAUTHENTICATORS 8 /* maximum number of SASL authenticators */ | |
|
| | | /* maximum number of messages */ | |
| | | #define MAXMESSAGES (unsigned long) 100000000 | |
| | | | |
| /* These can't be changed without changing code */ | | /* These can't be changed without changing code */ | |
| | | | |
| #define NUSERFLAGS 30 /* maximum number of user flags */ | | #define NUSERFLAGS 30 /* maximum number of user flags */ | |
| #define BASEYEAR 1970 /* the year time began on Unix DON'T CHANGE
*/ | | #define BASEYEAR 1970 /* the year time began on Unix DON'T CHANGE
*/ | |
| /* default for unqualified addresses */ | | /* default for unqualified addresses */ | |
| #define BADHOST ".MISSING-HOST-NAME." | | #define BADHOST ".MISSING-HOST-NAME." | |
| /* default for syntax errors in addresses */ | | /* default for syntax errors in addresses */ | |
| #define ERRHOST ".SYNTAX-ERROR." | | #define ERRHOST ".SYNTAX-ERROR." | |
| | | | |
| | | | |
| skipping to change at line 207 | | skipping to change at line 209 | |
| #define GET_MYRIGHTS (long) 436 | | #define GET_MYRIGHTS (long) 436 | |
| #define SET_MYRIGHTS (long) 437 | | #define SET_MYRIGHTS (long) 437 | |
| #define GET_QUOTA (long) 438 | | #define GET_QUOTA (long) 438 | |
| #define SET_QUOTA (long) 439 | | #define SET_QUOTA (long) 439 | |
| #define GET_QUOTAROOT (long) 440 | | #define GET_QUOTAROOT (long) 440 | |
| #define SET_QUOTAROOT (long) 441 | | #define SET_QUOTAROOT (long) 441 | |
| #define GET_IMAPTRYSSL (long) 442 | | #define GET_IMAPTRYSSL (long) 442 | |
| #define SET_IMAPTRYSSL (long) 443 | | #define SET_IMAPTRYSSL (long) 443 | |
| #define GET_FETCHLOOKAHEAD (long) 444 | | #define GET_FETCHLOOKAHEAD (long) 444 | |
| #define SET_FETCHLOOKAHEAD (long) 445 | | #define SET_FETCHLOOKAHEAD (long) 445 | |
|
| | | #define GET_NNTPRANGE (long) 446 | |
| | | #define SET_NNTPRANGE (long) 447 | |
| /* 5xx: local file drivers */ | | /* 5xx: local file drivers */ | |
| #define GET_MBXPROTECTION (long) 500 | | #define GET_MBXPROTECTION (long) 500 | |
| #define SET_MBXPROTECTION (long) 501 | | #define SET_MBXPROTECTION (long) 501 | |
| #define GET_DIRPROTECTION (long) 502 | | #define GET_DIRPROTECTION (long) 502 | |
| #define SET_DIRPROTECTION (long) 503 | | #define SET_DIRPROTECTION (long) 503 | |
| #define GET_LOCKPROTECTION (long) 504 | | #define GET_LOCKPROTECTION (long) 504 | |
| #define SET_LOCKPROTECTION (long) 505 | | #define SET_LOCKPROTECTION (long) 505 | |
| #define GET_FROMWIDGET (long) 506 | | #define GET_FROMWIDGET (long) 506 | |
| #define SET_FROMWIDGET (long) 507 | | #define SET_FROMWIDGET (long) 507 | |
| #define GET_NEWSACTIVE (long) 508 | | #define GET_NEWSACTIVE (long) 508 | |
| | | | |
| skipping to change at line 270 | | skipping to change at line 274 | |
| #define GET_PUBLICDIRPROTECTION (long) 552 | | #define GET_PUBLICDIRPROTECTION (long) 552 | |
| #define SET_PUBLICDIRPROTECTION (long) 553 | | #define SET_PUBLICDIRPROTECTION (long) 553 | |
| #define GET_SHAREDDIRPROTECTION (long) 554 | | #define GET_SHAREDDIRPROTECTION (long) 554 | |
| #define SET_SHAREDDIRPROTECTION (long) 555 | | #define SET_SHAREDDIRPROTECTION (long) 555 | |
| #define GET_TRUSTDNS (long) 556 | | #define GET_TRUSTDNS (long) 556 | |
| #define SET_TRUSTDNS (long) 557 | | #define SET_TRUSTDNS (long) 557 | |
| #define GET_SASLUSESPTRNAME (long) 558 | | #define GET_SASLUSESPTRNAME (long) 558 | |
| #define SET_SASLUSESPTRNAME (long) 559 | | #define SET_SASLUSESPTRNAME (long) 559 | |
| #define GET_NETFSSTATBUG (long) 560 | | #define GET_NETFSSTATBUG (long) 560 | |
| #define SET_NETFSSTATBUG (long) 561 | | #define SET_NETFSSTATBUG (long) 561 | |
|
| | | #define GET_SNARFMAILBOXNAME (long) 562 | |
| | | #define SET_SNARFMAILBOXNAME (long) 563 | |
| | | #define GET_SNARFINTERVAL (long) 564 | |
| | | #define SET_SNARFINTERVAL (long) 565 | |
| /* Driver flags */ | | /* Driver flags */ | |
| | | | |
| #define DR_DISABLE (long) 0x1 /* driver is disabled */ | | #define DR_DISABLE (long) 0x1 /* driver is disabled */ | |
| #define DR_LOCAL (long) 0x2 /* local file driver */ | | #define DR_LOCAL (long) 0x2 /* local file driver */ | |
| #define DR_MAIL (long) 0x4 /* supports mail */ | | #define DR_MAIL (long) 0x4 /* supports mail */ | |
| #define DR_NEWS (long) 0x8 /* supports news */ | | #define DR_NEWS (long) 0x8 /* supports news */ | |
| #define DR_READONLY (long) 0x10 /* driver only allows readonly acces
s */ | | #define DR_READONLY (long) 0x10 /* driver only allows readonly acces
s */ | |
| #define DR_NOFAST (long) 0x20 /* "fast" data is slow (whole msg fetch) */ | | #define DR_NOFAST (long) 0x20 /* "fast" data is slow (whole msg fetch) */ | |
| #define DR_NAMESPACE (long) 0x40/* driver has a special namespace */ | | #define DR_NAMESPACE (long) 0x40/* driver has a special namespace */ | |
| #define DR_LOWMEM (long) 0x80 /* low amounts of memory available */ | | #define DR_LOWMEM (long) 0x80 /* low amounts of memory available */ | |
| | | | |
| skipping to change at line 531 | | skipping to change at line 539 | |
| /* Item in an address list */ | | /* Item in an address list */ | |
| | | | |
| #define ADDRESS struct mail_address | | #define ADDRESS struct mail_address | |
| | | | |
| ADDRESS { | | ADDRESS { | |
| char *personal; /* personal name phrase */ | | char *personal; /* personal name phrase */ | |
| char *adl; /* at-domain-list source route */ | | char *adl; /* at-domain-list source route */ | |
| char *mailbox; /* mailbox name */ | | char *mailbox; /* mailbox name */ | |
| char *host; /* domain name of mailbox's host */ | | char *host; /* domain name of mailbox's host */ | |
| char *error; /* error in address from SMTP module */ | | char *error; /* error in address from SMTP module */ | |
|
| | | struct { | |
| | | char *type; /* address type (default "rfc822") * | |
| | | / | |
| | | char *addr; /* address as xtext */ | |
| | | } orcpt; | |
| ADDRESS *next; /* pointer to next address in list */ | | ADDRESS *next; /* pointer to next address in list */ | |
| }; | | }; | |
| | | | |
| /* Message envelope */ | | /* Message envelope */ | |
| | | | |
| typedef struct mail_envelope { | | typedef struct mail_envelope { | |
| unsigned int ngbogus : 1; /* newsgroups may be bogus */ | | unsigned int ngbogus : 1; /* newsgroups may be bogus */ | |
| unsigned int incomplete : 1; /* envelope may be incomplete */ | | unsigned int incomplete : 1; /* envelope may be incomplete */ | |
| char *remail; /* remail header if any */ | | char *remail; /* remail header if any */ | |
| ADDRESS *return_path; /* error return address */ | | ADDRESS *return_path; /* error return address */ | |
| | | | |
| skipping to change at line 927 | | skipping to change at line 939 | |
| unsigned long uid_validity; /* UID validity sequence */ | | unsigned long uid_validity; /* UID validity sequence */ | |
| unsigned long uid_last; /* last assigned UID */ | | unsigned long uid_last; /* last assigned UID */ | |
| char *user_flags[NUSERFLAGS]; /* pointers to user flags in bit ord
er */ | | char *user_flags[NUSERFLAGS]; /* pointers to user flags in bit ord
er */ | |
| unsigned long cachesize; /* size of message cache */ | | unsigned long cachesize; /* size of message cache */ | |
| MESSAGECACHE **cache; /* message cache array */ | | MESSAGECACHE **cache; /* message cache array */ | |
| SORTCACHE **sc; /* sort cache array */ | | SORTCACHE **sc; /* sort cache array */ | |
| unsigned long msgno; /* message number of `current' message */ | | unsigned long msgno; /* message number of `current' message */ | |
| ENVELOPE *env; /* scratch buffer for envelope */ | | ENVELOPE *env; /* scratch buffer for envelope */ | |
| BODY *body; /* scratch buffer for body */ | | BODY *body; /* scratch buffer for body */ | |
| SIZEDTEXT text; /* scratch buffer for text */ | | SIZEDTEXT text; /* scratch buffer for text */ | |
|
| | | struct { | |
| | | char *name; /* mailbox name to snarf from */ | |
| | | unsigned long time; /* last snarf time */ | |
| | | long options; /* snarf open options */ | |
| | | } snarf; | |
| union { /* internal use only */ | | union { /* internal use only */ | |
| struct { /* search temporaries */ | | struct { /* search temporaries */ | |
| STRINGLIST *string; /* string(s) to search */ | | STRINGLIST *string; /* string(s) to search */ | |
| long result; /* search result */ | | long result; /* search result */ | |
| char *text; /* cache of fetched text */ | | char *text; /* cache of fetched text */ | |
| } search; | | } search; | |
| } private; | | } private; | |
| /* reserved for use by main program */ | | /* reserved for use by main program */ | |
| unsigned int spare : 1; /* first spare bit */ | | unsigned int spare : 1; /* first spare bit */ | |
| unsigned int spare2 : 1; /* second spare bit */ | | unsigned int spare2 : 1; /* second spare bit */ | |
| | | | |
| skipping to change at line 1018 | | skipping to change at line 1035 | |
| md.stl = NIL, md.flags = NIL; | | md.stl = NIL, md.flags = NIL; | |
| /* Mail delivery I/O stream */ | | /* Mail delivery I/O stream */ | |
| | | | |
| typedef struct send_stream { | | typedef struct send_stream { | |
| NETSTREAM *netstream; /* network I/O stream */ | | NETSTREAM *netstream; /* network I/O stream */ | |
| char *host; /* SMTP service host */ | | char *host; /* SMTP service host */ | |
| char *reply; /* last reply string */ | | char *reply; /* last reply string */ | |
| long replycode; /* last reply code */ | | long replycode; /* last reply code */ | |
| unsigned int debug : 1; /* stream debug flag */ | | unsigned int debug : 1; /* stream debug flag */ | |
| unsigned int sensitive : 1; /* sensitive data in progress */ | | unsigned int sensitive : 1; /* sensitive data in progress */ | |
|
| | | unsigned int loser : 1; /* server is a loser */ | |
| union { /* protocol specific */ | | union { /* protocol specific */ | |
| struct { /* SMTP specific */ | | struct { /* SMTP specific */ | |
| unsigned int ok : 1; /* supports ESMTP */ | | unsigned int ok : 1; /* supports ESMTP */ | |
| struct { /* service extensions */ | | struct { /* service extensions */ | |
| unsigned int send : 1; /* supports SEND */ | | unsigned int send : 1; /* supports SEND */ | |
| unsigned int soml : 1; /* supports SOML */ | | unsigned int soml : 1; /* supports SOML */ | |
| unsigned int saml : 1; /* supports SAML */ | | unsigned int saml : 1; /* supports SAML */ | |
| unsigned int expn : 1; /* supports EXPN */ | | unsigned int expn : 1; /* supports EXPN */ | |
| unsigned int help : 1; /* supports HELP */ | | unsigned int help : 1; /* supports HELP */ | |
| unsigned int turn : 1; /* supports TURN */ | | unsigned int turn : 1; /* supports TURN */ | |
| | | | |
| skipping to change at line 1050 | | skipping to change at line 1068 | |
| unsigned int want : 1; /* want DSN */ | | unsigned int want : 1; /* want DSN */ | |
| struct { /* notification options */ | | struct { /* notification options */ | |
| /* notify on failure */ | | /* notify on failure */ | |
| unsigned int failure : 1; | | unsigned int failure : 1; | |
| /* notify on delay */ | | /* notify on delay */ | |
| unsigned int delay : 1; | | unsigned int delay : 1; | |
| /* notify on success */ | | /* notify on success */ | |
| unsigned int success : 1; | | unsigned int success : 1; | |
| } notify; | | } notify; | |
| unsigned int full : 1; /* return full headers */ | | unsigned int full : 1; /* return full headers */ | |
|
| | | char *envid; /* envelope identifier as xtext */ | |
| } dsn; | | } dsn; | |
| struct { /* size declaration */ | | struct { /* size declaration */ | |
| unsigned int ok : 1; /* supports SIZE */ | | unsigned int ok : 1; /* supports SIZE */ | |
| unsigned long limit; /* maximum size supported */ | | unsigned long limit; /* maximum size supported */ | |
| } size; | | } size; | |
| /* supported SASL authenticators */ | | /* supported SASL authenticators */ | |
| unsigned int auth : MAXAUTHENTICATORS; | | unsigned int auth : MAXAUTHENTICATORS; | |
| } esmtp; | | } esmtp; | |
| struct { /* NNTP specific */ | | struct { /* NNTP specific */ | |
| unsigned int post : 1; /* supports POST */ | | unsigned int post : 1; /* supports POST */ | |
|
| | | struct { /* NNTP extensions */ | |
| | | unsigned int ok : 1; /* supports extensions */ | |
| | | /* supports LISTGROUP */ | |
| | | unsigned int listgroup : 1; | |
| | | unsigned int over : 1; /* supports OVER */ | |
| | | unsigned int hdr : 1; /* supports HDR */ | |
| | | unsigned int pat : 1; /* supports PAT */ | |
| | | /* server has MULTIDOMAIN */ | |
| | | unsigned int multidomain : 1; | |
| | | /* supports AUTHINFO USER */ | |
| | | unsigned int authuser : 1; | |
| | | } ext; | |
| } nntp; | | } nntp; | |
| } protocol; | | } protocol; | |
| } SENDSTREAM; | | } SENDSTREAM; | |
| /* Jacket into external interfaces */ | | /* Jacket into external interfaces */ | |
| | | | |
| typedef long (*readfn_t) (void *stream,unsigned long size,char *buffer); | | typedef long (*readfn_t) (void *stream,unsigned long size,char *buffer); | |
| typedef char *(*mailgets_t) (readfn_t f,void *stream,unsigned long size, | | typedef char *(*mailgets_t) (readfn_t f,void *stream,unsigned long size, | |
| GETS_DATA *md); | | GETS_DATA *md); | |
| typedef char *(*readprogress_t) (GETS_DATA *md,unsigned long octets); | | typedef char *(*readprogress_t) (GETS_DATA *md,unsigned long octets); | |
| typedef void *(*mailcache_t) (MAILSTREAM *stream,unsigned long msgno,long o
p); | | typedef void *(*mailcache_t) (MAILSTREAM *stream,unsigned long msgno,long o
p); | |
| | | | |
| skipping to change at line 1349 | | skipping to change at line 1380 | |
| long mm_diskerror (MAILSTREAM *stream,long errcode,long serious); | | long mm_diskerror (MAILSTREAM *stream,long errcode,long serious); | |
| void mm_fatal (char *string); | | void mm_fatal (char *string); | |
| void *mm_cache (MAILSTREAM *stream,unsigned long msgno,long op); | | void *mm_cache (MAILSTREAM *stream,unsigned long msgno,long op); | |
| | | | |
| extern STRINGDRIVER mail_string; | | extern STRINGDRIVER mail_string; | |
| void mail_link (DRIVER *driver); | | void mail_link (DRIVER *driver); | |
| void *mail_parameters (MAILSTREAM *stream,long function,void *value); | | void *mail_parameters (MAILSTREAM *stream,long function,void *value); | |
| DRIVER *mail_valid (MAILSTREAM *stream,char *mailbox,char *purpose); | | DRIVER *mail_valid (MAILSTREAM *stream,char *mailbox,char *purpose); | |
| DRIVER *mail_valid_net (char *name,DRIVER *drv,char *host,char *mailbox); | | DRIVER *mail_valid_net (char *name,DRIVER *drv,char *host,char *mailbox); | |
| long mail_valid_net_parse (char *name,NETMBX *mb); | | long mail_valid_net_parse (char *name,NETMBX *mb); | |
|
| | | long mail_valid_net_parse_work (char *name,NETMBX *mb,char *service); | |
| void mail_scan (MAILSTREAM *stream,char *ref,char *pat,char *contents); | | void mail_scan (MAILSTREAM *stream,char *ref,char *pat,char *contents); | |
| void mail_list (MAILSTREAM *stream,char *ref,char *pat); | | void mail_list (MAILSTREAM *stream,char *ref,char *pat); | |
| void mail_lsub (MAILSTREAM *stream,char *ref,char *pat); | | void mail_lsub (MAILSTREAM *stream,char *ref,char *pat); | |
| long mail_subscribe (MAILSTREAM *stream,char *mailbox); | | long mail_subscribe (MAILSTREAM *stream,char *mailbox); | |
| long mail_unsubscribe (MAILSTREAM *stream,char *mailbox); | | long mail_unsubscribe (MAILSTREAM *stream,char *mailbox); | |
| long mail_create (MAILSTREAM *stream,char *mailbox); | | long mail_create (MAILSTREAM *stream,char *mailbox); | |
| long mail_delete (MAILSTREAM *stream,char *mailbox); | | long mail_delete (MAILSTREAM *stream,char *mailbox); | |
| long mail_rename (MAILSTREAM *stream,char *old,char *newname); | | long mail_rename (MAILSTREAM *stream,char *old,char *newname); | |
| long mail_status (MAILSTREAM *stream,char *mbx,long flags); | | long mail_status (MAILSTREAM *stream,char *mbx,long flags); | |
| long mail_status_default (MAILSTREAM *stream,char *mbx,long flags); | | long mail_status_default (MAILSTREAM *stream,char *mbx,long flags); | |
| | | | |
| skipping to change at line 1452 | | skipping to change at line 1484 | |
| unsigned short mail_shortdate (unsigned int year,unsigned int month, | | unsigned short mail_shortdate (unsigned int year,unsigned int month, | |
| unsigned int day); | | unsigned int day); | |
| unsigned long *mail_sort (MAILSTREAM *stream,char *charset,SEARCHPGM *spg, | | unsigned long *mail_sort (MAILSTREAM *stream,char *charset,SEARCHPGM *spg, | |
| SORTPGM *pgm,long flags); | | SORTPGM *pgm,long flags); | |
| unsigned long *mail_sort_cache (MAILSTREAM *stream,SORTPGM *pgm,SORTCACHE *
*sc, | | unsigned long *mail_sort_cache (MAILSTREAM *stream,SORTPGM *pgm,SORTCACHE *
*sc, | |
| long flags); | | long flags); | |
| unsigned long *mail_sort_msgs (MAILSTREAM *stream,char *charset,SEARCHPGM *
spg, | | unsigned long *mail_sort_msgs (MAILSTREAM *stream,char *charset,SEARCHPGM *
spg, | |
| SORTPGM *pgm,long flags); | | SORTPGM *pgm,long flags); | |
| SORTCACHE **mail_sort_loadcache (MAILSTREAM *stream,SORTPGM *pgm); | | SORTCACHE **mail_sort_loadcache (MAILSTREAM *stream,SORTPGM *pgm); | |
| unsigned int mail_strip_subject (char *t,char **ret); | | unsigned int mail_strip_subject (char *t,char **ret); | |
|
| unsigned int mail_strip_subject_aux (char *t,char **ret); | | char *mail_strip_subject_wsp (char *s); | |
| | | char *mail_strip_subject_blob (char *s); | |
| int mail_sort_compare (const void *a1,const void *a2); | | int mail_sort_compare (const void *a1,const void *a2); | |
| unsigned long mail_longdate (MESSAGECACHE *elt); | | unsigned long mail_longdate (MESSAGECACHE *elt); | |
| THREADNODE *mail_thread (MAILSTREAM *stream,char *type,char *charset, | | THREADNODE *mail_thread (MAILSTREAM *stream,char *type,char *charset, | |
| SEARCHPGM *spg,long flags); | | SEARCHPGM *spg,long flags); | |
| THREADNODE *mail_thread_msgs (MAILSTREAM *stream,char *type,char *charset, | | THREADNODE *mail_thread_msgs (MAILSTREAM *stream,char *type,char *charset, | |
| SEARCHPGM *spg,long flags,sorter_t sorter); | | SEARCHPGM *spg,long flags,sorter_t sorter); | |
| THREADNODE *mail_thread_orderedsubject (MAILSTREAM *stream,char *charset, | | THREADNODE *mail_thread_orderedsubject (MAILSTREAM *stream,char *charset, | |
| SEARCHPGM *spg,long flags, | | SEARCHPGM *spg,long flags, | |
| sorter_t sorter); | | sorter_t sorter); | |
| THREADNODE *mail_thread_references (MAILSTREAM *stream,char *charset, | | THREADNODE *mail_thread_references (MAILSTREAM *stream,char *charset, | |
| | | | |
End of changes. 11 change blocks. |
| 2 lines changed or deleted | | 36 lines changed or added | |
|
| nntp.h | | nntp.h | |
| | | | |
| skipping to change at line 13 | | skipping to change at line 13 | |
| * | | * | |
| * Author: Mark Crispin | | * Author: Mark Crispin | |
| * Networks and Distributed Computing | | * Networks and Distributed Computing | |
| * Computing & Communications | | * Computing & Communications | |
| * University of Washington | | * University of Washington | |
| * Administration Building, AG-44 | | * Administration Building, AG-44 | |
| * Seattle, WA 98195 | | * Seattle, WA 98195 | |
| * Internet: MRC@CAC.Washington.EDU | | * Internet: MRC@CAC.Washington.EDU | |
| * | | * | |
| * Date: 10 February 1992 | | * Date: 10 February 1992 | |
|
| * Last Edited: 5 April 2002 | | * Last Edited: 3 March 2003 | |
| * | | * | |
| * The IMAP toolkit provided in this Distribution is | | * The IMAP toolkit provided in this Distribution is | |
|
| * Copyright 2002 University of Washington. | | * Copyright 1988-2003 University of Washington. | |
| * The full text of our legal notices is contained in the file called | | * The full text of our legal notices is contained in the file called | |
| * CPYRIGHT, included with this Distribution. | | * CPYRIGHT, included with this Distribution. | |
| */ | | */ | |
| /* Constants */ | | /* Constants */ | |
| | | | |
| #define MAXLOGINTRIALS 3 /* maximum number of login trials */ | | #define MAXLOGINTRIALS 3 /* maximum number of login trials */ | |
| #define NNTPTCPPORT (long) 119 /* assigned TCP contact port */ | | #define NNTPTCPPORT (long) 119 /* assigned TCP contact port */ | |
| #define NNTPSSLPORT (long) 563 /* assigned(?) SSL TCP contact port */ | | #define NNTPSSLPORT (long) 563 /* assigned(?) SSL TCP contact port */ | |
| #define NNTPGREET (long) 200 /* NNTP successful greeting */ | | #define NNTPGREET (long) 200 /* NNTP successful greeting */ | |
| #define NNTPGREETNOPOST (long) 201 | | #define NNTPGREETNOPOST (long) 201 | |
|
| | | #define NNTPEXTOK (long) 202 /* NNTP extensions OK */ | |
| #define NNTPGOK (long) 211 /* NNTP group selection OK */ | | #define NNTPGOK (long) 211 /* NNTP group selection OK */ | |
| #define NNTPGLIST (long) 215 /* NNTP group list being returned */ | | #define NNTPGLIST (long) 215 /* NNTP group list being returned */ | |
| #define NNTPARTICLE (long) 220 /* NNTP article file */ | | #define NNTPARTICLE (long) 220 /* NNTP article file */ | |
| #define NNTPHEAD (long) 221 /* NNTP header text */ | | #define NNTPHEAD (long) 221 /* NNTP header text */ | |
| #define NNTPBODY (long) 222 /* NNTP body text */ | | #define NNTPBODY (long) 222 /* NNTP body text */ | |
| #define NNTPOVER (long) 224 /* NNTP overview text */ | | #define NNTPOVER (long) 224 /* NNTP overview text */ | |
| #define NNTPOK (long) 240 /* NNTP OK code */ | | #define NNTPOK (long) 240 /* NNTP OK code */ | |
|
| | | #define NNTPSASLED (long) 250 /* NNTP successful SASL authentication */ | |
| #define NNTPAUTHED (long) 281 /* NNTP successful authentication */ | | #define NNTPAUTHED (long) 281 /* NNTP successful authentication */ | |
| #define NNTPREADY (long) 340 /* NNTP ready for data */ | | #define NNTPREADY (long) 340 /* NNTP ready for data */ | |
|
| | | #define NNTPCHALLENGE (long) 351/* NNTP challenge, want response */ | |
| #define NNTPWANTAUTH (long) 380 /* NNTP authentication needed */ | | #define NNTPWANTAUTH (long) 380 /* NNTP authentication needed */ | |
| #define NNTPWANTPASS (long) 381 /* NNTP password needed */ | | #define NNTPWANTPASS (long) 381 /* NNTP password needed */ | |
| #define NNTPSOFTFATAL (long) 400/* NNTP soft fatal code */ | | #define NNTPSOFTFATAL (long) 400/* NNTP soft fatal code */ | |
| #define NNTPWANTAUTH2 (long) 480/* NNTP authentication needed (alternate) *
/ | | #define NNTPWANTAUTH2 (long) 480/* NNTP authentication needed (alternate) *
/ | |
|
| | | #define NNTPBADCMD (long) 500 /* NNTP unrecognized command */ | |
| | | | |
| /* NNTP I/O stream local data */ | | /* NNTP I/O stream local data */ | |
| | | | |
| typedef struct nntp_local { | | typedef struct nntp_local { | |
| SENDSTREAM *nntpstream; /* NNTP stream for I/O */ | | SENDSTREAM *nntpstream; /* NNTP stream for I/O */ | |
| unsigned int dirty : 1; /* disk copy of .newsrc needs updating */ | | unsigned int dirty : 1; /* disk copy of .newsrc needs updating */ | |
|
| unsigned int tlsflag : 1; /* TLS session */ | | | |
| unsigned int notlsflag : 1; /* TLS not used in session */ | | | |
| unsigned int sslflag : 1; /* SSL session */ | | unsigned int sslflag : 1; /* SSL session */ | |
| unsigned int novalidate : 1; /* certificate not validated */ | | unsigned int novalidate : 1; /* certificate not validated */ | |
|
| | | unsigned int xover : 1; /* supports XOVER */ | |
| char *name; /* remote newsgroup name */ | | char *name; /* remote newsgroup name */ | |
| char *user; /* mailbox user */ | | char *user; /* mailbox user */ | |
| char *newsrc; /* newsrc file */ | | char *newsrc; /* newsrc file */ | |
|
| | | char *over_fmt; /* overview format */ | |
| unsigned long msgno; /* current text message number */ | | unsigned long msgno; /* current text message number */ | |
| FILE *txt; /* current text */ | | FILE *txt; /* current text */ | |
| unsigned long txtsize; /* current text size */ | | unsigned long txtsize; /* current text size */ | |
| } NNTPLOCAL; | | } NNTPLOCAL; | |
| | | | |
| /* Convenient access to local data */ | | /* Convenient access to local data */ | |
| | | | |
| #define LOCAL ((NNTPLOCAL *) stream->local) | | #define LOCAL ((NNTPLOCAL *) stream->local) | |
| | | | |
| /* Convenient access to protocol-specific data */ | | /* Convenient access to protocol-specific data */ | |
| | | | |
| #define NNTP stream->protocol.nntp | | #define NNTP stream->protocol.nntp | |
|
| | | | |
| | | /* Convenient access to extensions */ | |
| | | | |
| | | #define EXTENSION LOCAL->nntpstream->protocol.nntp.ext | |
| /* Compatibility support names */ | | /* Compatibility support names */ | |
| | | | |
| #define nntp_open(hostlist,options) \ | | #define nntp_open(hostlist,options) \ | |
| nntp_open_full (NIL,hostlist,"nntp",NNTPTCPPORT,options) | | nntp_open_full (NIL,hostlist,"nntp",NNTPTCPPORT,options) | |
| | | | |
| /* Function prototypes */ | | /* Function prototypes */ | |
| | | | |
| DRIVER *nntp_valid (char *name); | | DRIVER *nntp_valid (char *name); | |
| DRIVER *nntp_isvalid (char *name,char *mbx); | | DRIVER *nntp_isvalid (char *name,char *mbx); | |
| void *nntp_parameters (long function,void *value); | | void *nntp_parameters (long function,void *value); | |
| | | | |
| skipping to change at line 91 | | skipping to change at line 99 | |
| long nntp_create (MAILSTREAM *stream,char *mailbox); | | long nntp_create (MAILSTREAM *stream,char *mailbox); | |
| long nntp_delete (MAILSTREAM *stream,char *mailbox); | | long nntp_delete (MAILSTREAM *stream,char *mailbox); | |
| long nntp_rename (MAILSTREAM *stream,char *old,char *newname); | | long nntp_rename (MAILSTREAM *stream,char *old,char *newname); | |
| long nntp_status (MAILSTREAM *stream,char *mbx,long flags); | | long nntp_status (MAILSTREAM *stream,char *mbx,long flags); | |
| MAILSTREAM *nntp_mopen (MAILSTREAM *stream); | | MAILSTREAM *nntp_mopen (MAILSTREAM *stream); | |
| void nntp_mclose (MAILSTREAM *stream,long options); | | void nntp_mclose (MAILSTREAM *stream,long options); | |
| void nntp_fetchfast (MAILSTREAM *stream,char *sequence,long flags); | | void nntp_fetchfast (MAILSTREAM *stream,char *sequence,long flags); | |
| void nntp_flags (MAILSTREAM *stream,char *sequence,long flags); | | void nntp_flags (MAILSTREAM *stream,char *sequence,long flags); | |
| long nntp_overview (MAILSTREAM *stream,overview_t ofn); | | long nntp_overview (MAILSTREAM *stream,overview_t ofn); | |
| long nntp_parse_overview (OVERVIEW *ov,char *text,MESSAGECACHE *elt); | | long nntp_parse_overview (OVERVIEW *ov,char *text,MESSAGECACHE *elt); | |
|
| | | long nntp_over (MAILSTREAM *stream,char *sequence); | |
| char *nntp_header (MAILSTREAM *stream,unsigned long msgno,unsigned long *si
ze, | | char *nntp_header (MAILSTREAM *stream,unsigned long msgno,unsigned long *si
ze, | |
| long flags); | | long flags); | |
| long nntp_text (MAILSTREAM *stream,unsigned long msgno,STRING *bs,long flag
s); | | long nntp_text (MAILSTREAM *stream,unsigned long msgno,STRING *bs,long flag
s); | |
| FILE *nntp_article (MAILSTREAM *stream,char *msgid,unsigned long *size, | | FILE *nntp_article (MAILSTREAM *stream,char *msgid,unsigned long *size, | |
| unsigned long *hsiz); | | unsigned long *hsiz); | |
| void nntp_flagmsg (MAILSTREAM *stream,MESSAGECACHE *elt); | | void nntp_flagmsg (MAILSTREAM *stream,MESSAGECACHE *elt); | |
| long nntp_search (MAILSTREAM *stream,char *charset,SEARCHPGM *pgm,long flag
s); | | long nntp_search (MAILSTREAM *stream,char *charset,SEARCHPGM *pgm,long flag
s); | |
| long nntp_search_msg (MAILSTREAM *stream,unsigned long msgno,SEARCHPGM *pgm
, | | long nntp_search_msg (MAILSTREAM *stream,unsigned long msgno,SEARCHPGM *pgm
, | |
| OVERVIEW *ov); | | OVERVIEW *ov); | |
| unsigned long *nntp_sort (MAILSTREAM *stream,char *charset,SEARCHPGM *spg, | | unsigned long *nntp_sort (MAILSTREAM *stream,char *charset,SEARCHPGM *spg, | |
| | | | |
| skipping to change at line 115 | | skipping to change at line 124 | |
| THREADNODE *nntp_thread (MAILSTREAM *stream,char *type,char *charset, | | THREADNODE *nntp_thread (MAILSTREAM *stream,char *type,char *charset, | |
| SEARCHPGM *spg,long flags); | | SEARCHPGM *spg,long flags); | |
| long nntp_ping (MAILSTREAM *stream); | | long nntp_ping (MAILSTREAM *stream); | |
| void nntp_check (MAILSTREAM *stream); | | void nntp_check (MAILSTREAM *stream); | |
| void nntp_expunge (MAILSTREAM *stream); | | void nntp_expunge (MAILSTREAM *stream); | |
| long nntp_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long option
s); | | long nntp_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long option
s); | |
| long nntp_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data); | | long nntp_append (MAILSTREAM *stream,char *mailbox,append_t af,void *data); | |
| | | | |
| SENDSTREAM *nntp_open_full (NETDRIVER *dv,char **hostlist,char *service, | | SENDSTREAM *nntp_open_full (NETDRIVER *dv,char **hostlist,char *service, | |
| unsigned long port,long options); | | unsigned long port,long options); | |
|
| | | SENDSTREAM *nntp_greet (SENDSTREAM *stream,long options); | |
| | | long nntp_extensions (SENDSTREAM *stream,long flags); | |
| SENDSTREAM *nntp_close (SENDSTREAM *stream); | | SENDSTREAM *nntp_close (SENDSTREAM *stream); | |
| long nntp_mail (SENDSTREAM *stream,ENVELOPE *msg,BODY *body); | | long nntp_mail (SENDSTREAM *stream,ENVELOPE *msg,BODY *body); | |
| long nntp_send (SENDSTREAM *stream,char *command,char *args); | | long nntp_send (SENDSTREAM *stream,char *command,char *args); | |
| long nntp_send_work (SENDSTREAM *stream,char *command,char *args); | | long nntp_send_work (SENDSTREAM *stream,char *command,char *args); | |
| long nntp_send_auth (SENDSTREAM *stream); | | long nntp_send_auth (SENDSTREAM *stream); | |
| long nntp_send_auth_work (SENDSTREAM *stream,NETMBX *mb,char *pwd); | | long nntp_send_auth_work (SENDSTREAM *stream,NETMBX *mb,char *pwd); | |
| long nntp_reply (SENDSTREAM *stream); | | long nntp_reply (SENDSTREAM *stream); | |
| long nntp_fake (SENDSTREAM *stream,char *text); | | long nntp_fake (SENDSTREAM *stream,char *text); | |
| long nntp_soutr (void *stream,char *s); | | long nntp_soutr (void *stream,char *s); | |
| | | | |
End of changes. 12 change blocks. |
| 4 lines changed or deleted | | 15 lines changed or added | |
|
| pop3.h | | pop3.h | |
| | | | |
| skipping to change at line 13 | | skipping to change at line 13 | |
| * | | * | |
| * Author: Mark Crispin | | * Author: Mark Crispin | |
| * Networks and Distributed Computing | | * Networks and Distributed Computing | |
| * Computing & Communications | | * Computing & Communications | |
| * University of Washington | | * University of Washington | |
| * Administration Building, AG-44 | | * Administration Building, AG-44 | |
| * Seattle, WA 98195 | | * Seattle, WA 98195 | |
| * Internet: MRC@CAC.Washington.EDU | | * Internet: MRC@CAC.Washington.EDU | |
| * | | * | |
| * Date: 6 June 1994 | | * Date: 6 June 1994 | |
|
| * Last Edited: 5 October 2001 | | * Last Edited: 18 February 2003 | |
| * | | * | |
| * The IMAP toolkit provided in this Distribution is | | * The IMAP toolkit provided in this Distribution is | |
|
| * Copyright 2001 University of Washington. | | * Copyright 1988-2003 University of Washington. | |
| * The full text of our legal notices is contained in the file called | | * The full text of our legal notices is contained in the file called | |
| * CPYRIGHT, included with this Distribution. | | * CPYRIGHT, included with this Distribution. | |
| */ | | */ | |
| /* POP3 specific definitions */ | | /* POP3 specific definitions */ | |
| | | | |
| /* Parameters */ | | /* Parameters */ | |
| | | | |
| #define MAXLOGINTRIALS 3 /* maximum number of login trials */ | | #define MAXLOGINTRIALS 3 /* maximum number of login trials */ | |
| #define POP3TCPPORT (long) 110 /* assigned TCP contact port */ | | #define POP3TCPPORT (long) 110 /* assigned TCP contact port */ | |
| #define POP3SSLPORT (long) 995 /* assigned SSL TCP contact port */ | | #define POP3SSLPORT (long) 995 /* assigned SSL TCP contact port */ | |
| | | | |
| /* POP3 I/O stream local data */ | | /* POP3 I/O stream local data */ | |
| | | | |
| typedef struct pop3_local { | | typedef struct pop3_local { | |
| NETSTREAM *netstream; /* TCP I/O stream */ | | NETSTREAM *netstream; /* TCP I/O stream */ | |
| char *response; /* last server reply */ | | char *response; /* last server reply */ | |
| char *reply; /* text of last server reply */ | | char *reply; /* text of last server reply */ | |
|
| unsigned long msgno; /* current text message number */ | | unsigned long cached; /* current cached message uid */ | |
| unsigned long hdrsize; /* current text header size */ | | unsigned long hdrsize; /* current cached header size */ | |
| FILE *txt; /* current text */ | | FILE *txt; /* current cached file descriptor */ | |
| struct { | | struct { | |
|
| | | unsigned int capa : 1; /* server has CAPA, definitely new */ | |
| unsigned int expire : 1; /* server has EXPIRE */ | | unsigned int expire : 1; /* server has EXPIRE */ | |
| unsigned int logindelay : 1;/* server has LOGIN-DELAY */ | | unsigned int logindelay : 1;/* server has LOGIN-DELAY */ | |
| unsigned int stls : 1; /* server has STLS */ | | unsigned int stls : 1; /* server has STLS */ | |
| unsigned int pipelining : 1;/* server has PIPELINING */ | | unsigned int pipelining : 1;/* server has PIPELINING */ | |
| unsigned int respcodes : 1; /* server has RESP-CODES */ | | unsigned int respcodes : 1; /* server has RESP-CODES */ | |
| unsigned int top : 1; /* server has TOP */ | | unsigned int top : 1; /* server has TOP */ | |
| unsigned int uidl : 1; /* server has UIDL */ | | unsigned int uidl : 1; /* server has UIDL */ | |
| unsigned int user : 1; /* server has USER */ | | unsigned int user : 1; /* server has USER */ | |
| char *implementation; /* server implementation string */ | | char *implementation; /* server implementation string */ | |
| long delaysecs; /* minimum time between login (neg variable)
*/ | | long delaysecs; /* minimum time between login (neg variable)
*/ | |
| long expiredays; /* server-guaranteed minimum retention days
*/ | | long expiredays; /* server-guaranteed minimum retention days
*/ | |
| /* supported authenticators */ | | /* supported authenticators */ | |
| unsigned int sasl : MAXAUTHENTICATORS; | | unsigned int sasl : MAXAUTHENTICATORS; | |
| } cap; | | } cap; | |
| unsigned int sensitive : 1; /* sensitive data in progress */ | | unsigned int sensitive : 1; /* sensitive data in progress */ | |
|
| | | unsigned int loser : 1; /* server is a loser */ | |
| } POP3LOCAL; | | } POP3LOCAL; | |
| | | | |
| /* Convenient access to local data */ | | /* Convenient access to local data */ | |
| | | | |
| #define LOCAL ((POP3LOCAL *) stream->local) | | #define LOCAL ((POP3LOCAL *) stream->local) | |
| /* Function prototypes */ | | /* Function prototypes */ | |
| | | | |
| DRIVER *pop3_valid (char *name); | | DRIVER *pop3_valid (char *name); | |
| void *pop3_parameters (long function,void *value); | | void *pop3_parameters (long function,void *value); | |
| void pop3_scan (MAILSTREAM *stream,char *ref,char *pat,char *contents); | | void pop3_scan (MAILSTREAM *stream,char *ref,char *pat,char *contents); | |
| | | | |
End of changes. 5 change blocks. |
| 5 lines changed or deleted | | 7 lines changed or added | |
|