⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mail.h

📁 广泛使用的邮件服务器!同时
💻 H
📖 第 1 页 / 共 5 页
字号:
};/* Mail Access I/O stream *//* Structure for mail driver dispatch */#define DRIVER struct driver	/* Mail I/O stream */	typedef struct mail_stream {  DRIVER *dtb;			/* dispatch table for this driver */  void *local;			/* pointer to driver local data */  char *mailbox;		/* mailbox name (canonicalized) */  char *original_mailbox;	/* mailbox name (non-canonicalized) */  unsigned short use;		/* stream use count */  unsigned short sequence;	/* stream sequence */  unsigned int inbox : 1;	/* stream open on an INBOX */  unsigned int lock : 1;	/* stream lock flag */  unsigned int debug : 1;	/* stream debug flag */  unsigned int silent : 1;	/* don't pass events to main program */  unsigned int rdonly : 1;	/* stream read-only flag */  unsigned int anonymous : 1;	/* stream anonymous access flag */  unsigned int scache : 1;	/* stream short cache flag */  unsigned int halfopen : 1;	/* stream half-open flag */  unsigned int secure : 1;	/* stream secure flag */  unsigned int tryssl : 1;	/* stream tryssl flag */  unsigned int mulnewsrc : 1;	/* stream use multiple newsrc files */  unsigned int perm_seen : 1;	/* permanent Seen flag */  unsigned int perm_deleted : 1;/* permanent Deleted flag */  unsigned int perm_flagged : 1;/* permanent Flagged flag */  unsigned int perm_answered :1;/* permanent Answered flag */  unsigned int perm_draft : 1;	/* permanent Draft flag */  unsigned int kwd_create : 1;	/* can create new keywords */  unsigned int uid_nosticky : 1;/* UIDs are not preserved */  unsigned int unhealthy : 1;	/* unhealthy protocol negotiations */  unsigned int nokod : 1;	/* suppress kiss-of-death */  unsigned int sniff : 1;	/* metadata only */  unsigned long perm_user_flags;/* mask of permanent user flags */  unsigned long gensym;		/* generated tag */  unsigned long nmsgs;		/* # of associated msgs */  unsigned long recent;		/* # of recent msgs */  unsigned long uid_validity;	/* UID validity sequence */  unsigned long uid_last;	/* last assigned UID */  char *user_flags[NUSERFLAGS];	/* pointers to user flags in bit order */  unsigned long cachesize;	/* size of message cache */  MESSAGECACHE **cache;		/* message cache array */  SORTCACHE **sc;		/* sort cache array */  unsigned long msgno;		/* message number of `current' message */  ENVELOPE *env;		/* scratch buffer for envelope */  BODY *body;			/* scratch buffer for body */  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;  struct {			/* internal use only */    struct {			/* search temporaries */      STRINGLIST *string;	/* string(s) to search */      long result;		/* search result */      char *text;		/* cache of fetched text */    } search;    STRING string;		/* stringstruct return hack */  } private;			/* reserved for use by main program */  void *sparep;			/* spare pointer */  unsigned int spare : 1;	/* first spare bit */  unsigned int spare2 : 1;	/* second spare bit */  unsigned int spare3 : 1;	/* third spare bit */  unsigned int spare4 : 1;	/* fourth spare bit */  unsigned int spare5 : 1;	/* fifth spare bit */  unsigned int spare6 : 1;	/* sixth spare bit */  unsigned int spare7 : 1;	/* seventh spare bit */  unsigned int spare8 : 1;	/* eighth spare bit */} MAILSTREAM;/* Mail I/O stream handle */typedef struct mail_stream_handle {  MAILSTREAM *stream;		/* pointer to mail stream */  unsigned short sequence;	/* sequence of what we expect stream to be */} MAILHANDLE;/* Message overview */typedef struct mail_overview {  char *subject;		/* message subject string */  ADDRESS *from;		/* originator address list */  char *date;			/* message composition date string */  char *message_id;		/* message ID */  char *references;		/* USENET references */  struct {			/* may be 0 or NUL if unknown/undefined */    unsigned long octets;	/* message octets (probably LF-newline form) */    unsigned long lines;	/* message lines */    char *xref;			/* cross references */  } optional;} OVERVIEW;/* Network access I/O stream *//* Structure for network driver dispatch */#define NETDRIVER struct net_driver/* Network transport I/O stream */typedef struct net_stream {  void *stream;			/* driver's I/O stream */  NETDRIVER *dtb;		/* network driver */} NETSTREAM;/* Network transport driver dispatch */NETDRIVER {  void *(*open) (char *host,char *service,unsigned long port);  void *(*aopen) (NETMBX *mb,char *service,char *usrbuf);  char *(*getline) (void *stream);  long (*getbuffer) (void *stream,unsigned long size,char *buffer);  long (*soutr) (void *stream,char *string);  long (*sout) (void *stream,char *string,unsigned long size);  void (*close) (void *stream);  char *(*host) (void *stream);  char *(*remotehost) (void *stream);  unsigned long (*port) (void *stream);  char *(*localhost) (void *stream);};/* Mailgets data identifier */typedef struct getsdata {  MAILSTREAM *stream;  unsigned long msgno;  char *what;  STRINGLIST *stl;  unsigned long first;  unsigned long last;  long flags;} GETS_DATA;#define INIT_GETS(md,s,m,w,f,l) \  md.stream = s, md.msgno = m, md.what = w, md.first = f, md.last = l, \  md.stl = NIL, md.flags = NIL;/* Mail delivery I/O stream */typedef struct send_stream {  NETSTREAM *netstream;		/* network I/O stream */  char *host;			/* SMTP service host */  char *reply;			/* last reply string */  long replycode;		/* last reply code */  unsigned int debug : 1;	/* stream debug flag */  unsigned int sensitive : 1;	/* sensitive data in progress */  unsigned int loser : 1;	/* server is a loser */  unsigned int saslcancel : 1;	/* SASL cancelled by protocol */  union {			/* protocol specific */    struct {			/* SMTP specific */      unsigned int ok : 1;	/* supports ESMTP */      struct {			/* service extensions */	unsigned int send : 1;	/* supports SEND */	unsigned int soml : 1;	/* supports SOML */	unsigned int saml : 1;	/* supports SAML */	unsigned int expn : 1;	/* supports EXPN */	unsigned int help : 1;	/* supports HELP */	unsigned int turn : 1;	/* supports TURN */	unsigned int etrn : 1;	/* supports ETRN */	unsigned int starttls:1;/* supports STARTTLS */	unsigned int relay : 1;	/* supports relaying */	unsigned int pipe : 1;	/* supports pipelining */	unsigned int ensc : 1;	/* supports enhanced status codes */	unsigned int bmime : 1;	/* supports BINARYMIME */	unsigned int chunk : 1;	/* supports CHUNKING */      } service;      struct {			/* 8-bit MIME transport */	unsigned int ok : 1;	/* supports 8-bit MIME */	unsigned int want : 1;	/* want 8-bit MIME */      } eightbit;      struct {			/* delivery status notification */	unsigned int ok : 1;	/* supports DSN */	unsigned int want : 1;	/* want DSN */	struct {		/* notification options */				/* notify on failure */	  unsigned int failure : 1;				/* notify on delay */	  unsigned int delay : 1;				/* notify on success */	  unsigned int success : 1;	} notify;	unsigned int full : 1;	/* return full headers */	char *envid;		/* envelope identifier as xtext */      } dsn;      struct {			/* size declaration */	unsigned int ok : 1;	/* supports SIZE */	unsigned long limit;	/* maximum size supported */      } size;      struct {			/* deliverby declaration */	unsigned int ok : 1;	/* supports DELIVERBY */	unsigned long minby;	/* minimum by-time */      } deliverby;      struct {			/* authenticated turn */	unsigned int ok : 1;	/* supports ATRN */	char *domains;		/* domains */      } atrn;				/* supported SASL authenticators */      unsigned int auth : MAXAUTHENTICATORS;    } esmtp;    struct {			/* NNTP specific */      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 */				/* supports STARTTLS */	unsigned int starttls : 1;				/* server has MULTIDOMAIN */	unsigned int multidomain : 1;				/* supports AUTHINFO USER */	unsigned int authuser : 1;				/* supported authenticators */	unsigned int sasl : MAXAUTHENTICATORS;      } ext;    } nntp;  } protocol;} SENDSTREAM;/* Jacket into external interfaces */typedef long (*readfn_t) (void *stream,unsigned long size,char *buffer);typedef char *(*mailgets_t) (readfn_t f,void *stream,unsigned long size,			     GETS_DATA *md);typedef char *(*readprogress_t) (GETS_DATA *md,unsigned long octets);typedef void *(*mailcache_t) (MAILSTREAM *stream,unsigned long msgno,long op);typedef long (*mailproxycopy_t) (MAILSTREAM *stream,char *sequence,				 char *mailbox,long options);typedef long (*tcptimeout_t) (long overall,long last);typedef void *(*authchallenge_t) (void *stream,unsigned long *len);typedef long (*authrespond_t) (void *stream,char *s,unsigned long size);typedef long (*authcheck_t) (void);typedef long (*authclient_t) (authchallenge_t challenger,			      authrespond_t responder,char *service,NETMBX *mb,			      void *s,unsigned long *trial,char *user);typedef char *(*authresponse_t) (void *challenge,unsigned long clen,				 unsigned long *rlen);typedef char *(*authserver_t) (authresponse_t responder,int argc,char *argv[]);typedef void (*smtpverbose_t) (char *buffer);typedef void (*imapenvelope_t) (MAILSTREAM *stream,unsigned long msgno,				ENVELOPE *env);typedef char *(*imapreferral_t) (MAILSTREAM *stream,char *url,long code);typedef void (*overview_t) (MAILSTREAM *stream,unsigned long uid,OVERVIEW *ov,			    unsigned long msgno);typedef unsigned long *(*sorter_t) (MAILSTREAM *stream,char *charset,				    SEARCHPGM *spg,SORTPGM *pgm,long flags);typedef void (*parseline_t) (ENVELOPE *env,char *hdr,char *data,char *host);typedef ADDRESS *(*parsephrase_t) (char *phrase,char *end,char *host);typedef void *(*blocknotify_t) (int reason,void *data);typedef long (*kinit_t) (char *host,char *reason);typedef void (*sendcommand_t) (MAILSTREAM *stream,char *cmd,long flags);typedef char *(*newsrcquery_t) (MAILSTREAM *stream,char *mulname,char *name);typedef void (*getacl_t) (MAILSTREAM *stream,char *mailbox,ACLLIST *acl);typedef void (*listrights_t) (MAILSTREAM *stream,char *mailbox,char *id,			      char *alwaysrights,STRINGLIST *possiblerights);typedef void (*myrights_t) (MAILSTREAM *stream,char *mailbox,char *rights);typedef void (*quota_t) (MAILSTREAM *stream,char *qroot,QUOTALIST *qlist);typedef void (*quotaroot_t) (MAILSTREAM *stream,char *mbx,STRINGLIST *qroot);typedef void (*sortresults_t) (MAILSTREAM *stream,unsigned long *list,			       unsigned long size);typedef char *(*userprompt_t) (void);typedef long (*append_t) (MAILSTREAM *stream,void *data,char **flags,			  char **date,STRING **message);typedef void (*copyuid_t) (MAILSTREAM *stream,char *mailbox,			   unsigned long uidvalidity,SEARCHSET *sourceset,			   SEARCHSET *destset);typedef void (*appenduid_t) (char *mailbox,unsigned long uidvalidity,			     SEARCHSET *set);typedef long (*dirfmttest_t) (char *name);typedef long (*scancontents_t) (char *name,char *contents,unsigned long csiz,				unsigned long fsiz);typedef void (*freeeltsparep_t) (void **sparep);typedef void (*freeenvelopesparep_t) (void **sparep);typedef void (*freebodysparep_t) (void **sparep);typedef void (*freestreamsparep_t) (void **sparep);typedef void *(*sslstart_t) (void *stream,char *host,unsigned long flags);typedef long (*sslcertificatequery_t) (char *reason,char *host,char *cert);typedef void (*sslfailure_t) (char *host,char *reason,unsigned long flags);typedef void (*logouthook_t) (void *data);typedef char *(*sslclientcert_t) (void);typedef char *(*sslclientkey_t) (void);/* Globals */extern char *body_types[];	/* defined body type strings */extern char *body_encodings[];	/* defined body encoding strings */extern const char *days[];	/* day name strings */extern const char *months[];	/* month name strings *//* Threading *//* Thread node */#define THREADNODE struct thread_nodeTHREADNODE {  unsigned long num;		/* message number */  SORTCACHE *sc;		/* (internal use) sortcache entry */  THREADNODE *branch;		/* branch at this point in tree */  THREADNODE *next;		/* next node */};typedef void (*threadresults_t) (MAILSTREAM *stream,THREADNODE *tree);/* Thread dispatch */#define THREADER struct threader_listTHREADER {  char *name;			/* name of threader */  THREADNODE *(*dispatch) (MAILSTREAM *stream,char *charset,SEARCHPGM *spg,			   long flags,sorter_t sorter);  THREADER *next;};/* Container for references threading */typedef void ** container_t;/* Namespaces */#define NAMESPACE struct mail_namespaceNAMESPACE {  char *name;			/* name of this namespace */  int delimiter;		/* hierarchy delimiter */  PARAMETER *param;		/* namespace parameters */  NAMESPACE *next;		/* next namespace */};/* Authentication */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -