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

📄 mail.h

📁 广泛使用的邮件服务器!同时
💻 H
📖 第 1 页 / 共 5 页
字号:
#define AUTHENTICATOR struct mail_authenticatorAUTHENTICATOR {  long flags;			/* authenticator flags */  char *name;			/* name of this authenticator */  authcheck_t valid;		/* authenticator valid on this system */  authclient_t client;		/* client function that supports it */  authserver_t server;		/* server function that supports it */  AUTHENTICATOR *next;		/* next authenticator */};/* Mail driver dispatch */DRIVER {  char *name;			/* driver name */  unsigned long flags;		/* driver flags */  DRIVER *next;			/* next driver */				/* mailbox is valid for us */  DRIVER *(*valid) (char *mailbox);				/* manipulate driver parameters */  void *(*parameters) (long function,void *value);				/* scan mailboxes */  void (*scan) (MAILSTREAM *stream,char *ref,char *pat,char *contents);				/* list mailboxes */  void (*list) (MAILSTREAM *stream,char *ref,char *pat);				/* list subscribed mailboxes */  void (*lsub) (MAILSTREAM *stream,char *ref,char *pat);				/* subscribe to mailbox */  long (*subscribe) (MAILSTREAM *stream,char *mailbox);				/* unsubscribe from mailbox */  long (*unsubscribe) (MAILSTREAM *stream,char *mailbox);				/* create mailbox */  long (*create) (MAILSTREAM *stream,char *mailbox);				/* delete mailbox */  long (*mbxdel) (MAILSTREAM *stream,char *mailbox);				/* rename mailbox */  long (*mbxren) (MAILSTREAM *stream,char *old,char *newname);				/* status of mailbox */  long (*status) (MAILSTREAM *stream,char *mbx,long flags);				/* open mailbox */  MAILSTREAM *(*open) (MAILSTREAM *stream);				/* close mailbox */  void (*close) (MAILSTREAM *stream,long options);				/* fetch message "fast" attributes */  void (*fast) (MAILSTREAM *stream,char *sequence,long flags);				/* fetch message flags */  void (*msgflags) (MAILSTREAM *stream,char *sequence,long flags);				/* fetch message overview */  long (*overview) (MAILSTREAM *stream,overview_t ofn);				/* fetch message envelopes */  ENVELOPE *(*structure) (MAILSTREAM *stream,unsigned long msgno,BODY **body,			  long flags);				/* return RFC-822 header */  char *(*header) (MAILSTREAM *stream,unsigned long msgno,		   unsigned long *length,long flags);				/* return RFC-822 text */  long (*text) (MAILSTREAM *stream,unsigned long msgno,STRING *bs,long flags);				/* load cache */  long (*msgdata) (MAILSTREAM *stream,unsigned long msgno,char *section,		   unsigned long first,unsigned long last,STRINGLIST *lines,		   long flags);				/* return UID for message */  unsigned long (*uid) (MAILSTREAM *stream,unsigned long msgno);				/* return message number from UID */  unsigned long (*msgno) (MAILSTREAM *stream,unsigned long uid);				/* modify flags */  void (*flag) (MAILSTREAM *stream,char *sequence,char *flag,long flags);				/* per-message modify flags */  void (*flagmsg) (MAILSTREAM *stream,MESSAGECACHE *elt);				/* search for message based on criteria */  long (*search) (MAILSTREAM *stream,char *charset,SEARCHPGM *pgm,long flags);				/* sort messages */  unsigned long *(*sort) (MAILSTREAM *stream,char *charset,SEARCHPGM *spg,			  SORTPGM *pgm,long flags);				/* thread messages */  THREADNODE *(*thread) (MAILSTREAM *stream,char *type,char *charset,			 SEARCHPGM *spg,long flag);				/* ping mailbox to see if still alive */  long (*ping) (MAILSTREAM *stream);				/* check for new messages */  void (*check) (MAILSTREAM *stream);				/* expunge deleted messages */  long (*expunge) (MAILSTREAM *stream,char *sequence,long options);				/* copy messages to another mailbox */  long (*copy) (MAILSTREAM *stream,char *sequence,char *mailbox,long options);				/* append string message to mailbox */  long (*append) (MAILSTREAM *stream,char *mailbox,append_t af,void *data);				/* garbage collect stream */  void (*gc) (MAILSTREAM *stream,long gcflags);};#include "linkage.h"/* Compatibility support names for old interfaces */#define GET_TRYALTFIRST GET_TRYSSLFIRST#define SET_TRYALTFIRST SET_TRYSSLFIRST#define GET_IMAPTRYALT GET_IMAPTRYSSL#define SET_IMAPTRYALT SET_IMAPTRYSSL#define OP_TRYALT OP_TRYSSL#define altflag sslflag#define mail_close(stream) \  mail_close_full (stream,NIL)#define mail_fetchfast(stream,sequence) \  mail_fetch_fast (stream,sequence,NIL)#define mail_fetchfast_full mail_fetch_fast#define mail_fetchflags(stream,sequence) \  mail_fetch_flags (stream,sequence,NIL)#define mail_fetchflags_full mail_fetch_flags#define mail_fetchenvelope(stream,msgno) \  mail_fetch_structure (stream,msgno,NIL,NIL)#define mail_fetchstructure(stream,msgno,body) \  mail_fetch_structure (stream,msgno,body,NIL)#define mail_fetchstructure_full mail_fetch_structure#define mail_fetchheader(stream,msgno) \  mail_fetch_header (stream,msgno,NIL,NIL,NIL,FT_PEEK)#define mail_fetchheader_full(stream,msgno,lines,len,flags) \  mail_fetch_header (stream,msgno,NIL,lines,len,FT_PEEK | (flags))#define mail_fetchtext(stream,msgno) \  mail_fetch_text (stream,msgno,NIL,NIL,NIL)#define mail_fetchtext_full(stream,msgno,length,flags) \  mail_fetch_text (stream,msgno,NIL,length,flags)#define mail_fetchbody(stream,msgno,section,length) \  mail_fetch_body (stream,msgno,section,length,NIL)#define mail_fetchbody_full mail_fetch_body#define mail_setflag(stream,sequence,flag) \  mail_flag (stream,sequence,flag,ST_SET)#define mail_setflag_full(stream,sequence,flag,flags) \  mail_flag (stream,sequence,flag,ST_SET | (flags))#define mail_clearflag(stream,sequence,flag) \  mail_flag (stream,sequence,flag,NIL)#define mail_clearflag_full mail_flag#define mail_search(stream,criteria) \  mail_search_full (stream,NIL,mail_criteria (criteria),SE_FREE);#define mail_expunge(stream) \  mail_expunge_full (stream,NIL,NIL)#define mail_copy(stream,sequence,mailbox) \  mail_copy_full (stream,sequence,mailbox,NIL)#define mail_move(stream,sequence,mailbox) \  mail_copy_full (stream,sequence,mailbox,CP_MOVE)#define mail_append(stream,mailbox,message) \  mail_append_full (stream,mailbox,NIL,NIL,message)/* Interfaces for SVR4 locking brain-damage workaround *//* Driver dispatching */#define SAFE_DELETE(dtb,stream,mailbox) (*dtb->mbxdel) (stream,mailbox)#define SAFE_RENAME(dtb,stream,old,newname) (*dtb->mbxren) (stream,old,newname)#define SAFE_STATUS(dtb,stream,mbx,flags) (*dtb->status) (stream,mbx,flags)#define SAFE_COPY(dtb,stream,sequence,mailbox,options) \  (*dtb->copy) (stream,sequence,mailbox,options)#define SAFE_APPEND(dtb,stream,mailbox,af,data) \  (*dtb->append) (stream,mailbox,af,data)#define SAFE_SCAN_CONTENTS(dtb,name,contents,csiz,fsiz) \  scan_contents (dtb,name,contents,csiz,fsiz)/* Driver callbacks */#define MM_EXISTS mm_exists#define MM_EXPUNGED mm_expunged#define MM_FLAGS mm_flags#define MM_NOTIFY mm_notify#define MM_STATUS mm_status#define MM_LOG mm_log#define MM_CRITICAL mm_critical#define MM_NOCRITICAL mm_nocritical#define MM_DISKERROR mm_diskerror#define MM_FATAL mm_fatal#define MM_APPEND(af) (*af)/* Function prototypes */void mm_searched (MAILSTREAM *stream,unsigned long number);void mm_exists (MAILSTREAM *stream,unsigned long number);void mm_expunged (MAILSTREAM *stream,unsigned long number);void mm_flags (MAILSTREAM *stream,unsigned long number);void mm_notify (MAILSTREAM *stream,char *string,long errflg);void mm_list (MAILSTREAM *stream,int delimiter,char *name,long attributes);void mm_lsub (MAILSTREAM *stream,int delimiter,char *name,long attributes);void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status);void mm_log (char *string,long errflg);void mm_dlog (char *string);void mm_login (NETMBX *mb,char *user,char *pwd,long trial);void mm_critical (MAILSTREAM *stream);void mm_nocritical (MAILSTREAM *stream);long mm_diskerror (MAILSTREAM *stream,long errcode,long serious);void mm_fatal (char *string);void *mm_cache (MAILSTREAM *stream,unsigned long msgno,long op);extern STRINGDRIVER mail_string;void mail_versioncheck (char *version);void mail_link (DRIVER *driver);void *mail_parameters (MAILSTREAM *stream,long function,void *value);DRIVER *mail_valid (MAILSTREAM *stream,char *mailbox,char *purpose);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_work (char *name,NETMBX *mb,char *service);void mail_scan (MAILSTREAM *stream,char *ref,char *pat,char *contents);void mail_list (MAILSTREAM *stream,char *ref,char *pat);void mail_lsub (MAILSTREAM *stream,char *ref,char *pat);long mail_subscribe (MAILSTREAM *stream,char *mailbox);long mail_unsubscribe (MAILSTREAM *stream,char *mailbox);long mail_create (MAILSTREAM *stream,char *mailbox);long mail_delete (MAILSTREAM *stream,char *mailbox);long mail_rename (MAILSTREAM *stream,char *old,char *newname);char *mail_utf7_valid (char *mailbox);long mail_status (MAILSTREAM *stream,char *mbx,long flags);long mail_status_default (MAILSTREAM *stream,char *mbx,long flags);MAILSTREAM *mail_open (MAILSTREAM *stream,char *name,long options);MAILSTREAM *mail_open_work (DRIVER *d,MAILSTREAM *stream,char *name,			    long options);MAILSTREAM *mail_close_full (MAILSTREAM *stream,long options);MAILHANDLE *mail_makehandle (MAILSTREAM *stream);void mail_free_handle (MAILHANDLE **handle);MAILSTREAM *mail_stream (MAILHANDLE *handle);void mail_fetch_fast (MAILSTREAM *stream,char *sequence,long flags);void mail_fetch_flags (MAILSTREAM *stream,char *sequence,long flags);void mail_fetch_overview (MAILSTREAM *stream,char *sequence,overview_t ofn);void mail_fetch_overview_sequence (MAILSTREAM *stream,char *sequence,				   overview_t ofn);void mail_fetch_overview_default (MAILSTREAM *stream,overview_t ofn);ENVELOPE *mail_fetch_structure (MAILSTREAM *stream,unsigned long msgno,				BODY **body,long flags);char *mail_fetch_message (MAILSTREAM *stream,unsigned long msgno,			  unsigned long *len,long flags);char *mail_fetch_header (MAILSTREAM *stream,unsigned long msgno,char *section,			 STRINGLIST *lines,unsigned long *len,long flags);char *mail_fetch_text (MAILSTREAM *stream,unsigned long msgno,char *section,		       unsigned long *len,long flags);char *mail_fetch_mime (MAILSTREAM *stream,unsigned long msgno,char *section,		       unsigned long *len,long flags);char *mail_fetch_body (MAILSTREAM *stream,unsigned long msgno,char *section,		       unsigned long *len,long flags);long mail_partial_text (MAILSTREAM *stream,unsigned long msgno,char *section,			unsigned long first,unsigned long last,long flags);long mail_partial_body (MAILSTREAM *stream,unsigned long msgno,char *section,			unsigned long first,unsigned long last,long flags);char *mail_fetch_text_return (GETS_DATA *md,SIZEDTEXT *t,unsigned long *len);char *mail_fetch_string_return (GETS_DATA *md,STRING *bs,unsigned long i,				unsigned long *len,long flags);long mail_read (void *stream,unsigned long size,char *buffer);unsigned long mail_uid (MAILSTREAM *stream,unsigned long msgno);unsigned long mail_msgno (MAILSTREAM *stream,unsigned long uid);void mail_fetchfrom (char *s,MAILSTREAM *stream,unsigned long msgno,		     long length);void mail_fetchsubject (char *s,MAILSTREAM *stream,unsigned long msgno,			long length);MESSAGECACHE *mail_elt (MAILSTREAM *stream,unsigned long msgno);void mail_flag (MAILSTREAM *stream,char *sequence,char *flag,long flags);long mail_search_full (MAILSTREAM *stream,char *charset,SEARCHPGM *pgm,		       long flags);long mail_search_default (MAILSTREAM *stream,char *charset,SEARCHPGM *pgm,			  long flags);long mail_ping (MAILSTREAM *stream);void mail_check (MAILSTREAM *stream);long mail_expunge_full (MAILSTREAM *stream,char *sequence,long options);long mail_copy_full (MAILSTREAM *stream,char *sequence,char *mailbox,		     long options);long mail_append_full (MAILSTREAM *stream,char *mailbox,char *flags,char *date,		       STRING *message);long mail_append_multiple (MAILSTREAM *stream,char *mailbox,append_t af,			   void *data);void mail_gc (MAILSTREAM *stream,long gcflags);void mail_gc_msg (MESSAGE *msg,long gcflags);void mail_gc_body (BODY *body);BODY *mail_body (MAILSTREAM *stream,unsigned long msgno,		 unsigned char *section);char *mail_date (char *string,MESSAGECACHE *elt);char *mail_cdate (char *string,MESSAGECACHE *elt);long mail_parse_date (MESSAGECACHE *elt,unsigned char *string);void mail_exists (MAILSTREAM *stream,unsigned long nmsgs);void mail_recent (MAILSTREAM *stream,unsigned long recent);void mail_expunged (MAILSTREAM *stream,unsigned long msgno);void mail_lock (MAILSTREAM *stream);void mail_unlock (MAILSTREAM *stream);void mail_debug (MAILSTREAM *stream);void mail_nodebug (MAILSTREAM *stream);void mail_dlog (char *string,long flag);long mail_match_lines (STRINGLIST *lines,STRINGLIST *msglines,long flags);unsigned long mail_filter (char *text,unsigned long len,STRINGLIST *lines,			   long flags);long mail_search_msg (MAILSTREAM *stream,unsigned long msgno,char *section,		      SEARCHPGM *pgm);long mail_search_header_text (char *s,STRINGLIST *st);long mail_search_header (SIZEDTEXT *hdr,STRINGLIST *st);long mail_search_text (MAILSTREAM *stream,unsigned long msgno,char *section,		       STRINGLIST *st,long flags);long mail_search_body (MAILSTREAM *stream,unsigned long msgno,BODY *body,		       char *prefix,unsigned long section,long flags);long mail_search_string (SIZEDTEXT *s,char *charset,STRINGLIST **st);long mail_search_string_work (SIZEDTEXT *s,STRINGLIST **st);long mail_search_keyword (MAILSTREAM *stream,MESSAGECACHE *elt,STRINGLIST *st,			  long flag);long mail_search_addr (ADDRESS *adr,STRINGLIST *st);char *mail_search_gets (readfn_t f,void *stream,unsigned long size,			GETS_DATA *md);SEARCHPGM *mail_criteria (char *criteria);int mail_criteria_date (unsigned short *date,char **r);int mail_criteria_string (STRINGLIST **s,char **r);unsigned short mail_shortdate (unsigned int year,unsigned int month,			       unsigned int day);SEARCHSET *mail_parse_set (char *s,char **ret);SEARCHSET *mail_append_set (SEARCHSET *set,unsigned long msgno);unsigned long *mail_sort (MAILSTREAM *stream,char *charset,SEARCHPGM *spg,			  SORTPGM *pgm,long flags);unsigned long *mail_sort_cache (MAILSTREAM *stream,SORTPGM *pgm,SORTCACHE **sc,				long flags);unsigned long *mail_sort_msgs (MAILSTREAM *stream,char *charset,SEARCHPGM *spg,			       SORTPGM *pgm,long flags);SORTCACHE **mail_sort_loadcache (MAILSTREAM *stream,SORTPGM *pgm);unsigned int mail_strip_subject (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);unsigned long mail_longdate (MESSAGECACHE *elt);THREADNODE *mail_thread (MAILSTREAM *stream,char *type,char *charset,			 SEARCHPGM *spg,long flags);THREADNODE *mail_thread_msgs (MAILSTREAM *stream,char *type,char *charset,			      SEARCHPGM *spg,long flags,sorter_t sorter);THREADNODE *mail_thread_orderedsubject (MAILSTREAM *stream,char *charset,					SEARCHPGM *spg,long flags,					sorter_t sorter);THREADNODE *mail_thread_references (MAILSTREAM *stream,char *charset,				    SEARCHPGM *spg,long flags,				    sorter_t sorter);void mail_thread_loadcache (MAILSTREAM *stream,unsigned long uid,OVERVIEW *ov,			    unsigned long msgno);char *mail_thread_parse_msgid (char *s,char **ss);STRINGLIST *mail_thread_parse_references (char *s,long flag);long mail_thread_check_child (container_t mother,container_t daughter);container_t mail_thread_prune_dummy (container_t msg,container_t ane);container_t mail_thread_prune_dummy_work (container_t msg,container_t ane);THREADNODE *mail_thread_c2node (MAILSTREAM *stream,container_t con,long flags);THREADNODE *mail_thread_sort (THREADNODE *thr,THREADNODE **tc);int mail_thread_compare_date (const void *a1,const void *a2);long mail_sequence (MAILSTREAM *stream,unsigned char *sequence);long mail_uid_sequence (MAILSTREAM *stream,unsigned char *sequence);long mail_parse_flags (MAILSTREAM *stream,char *flag,unsigned long *uf);long mail_usable_network_stream (MAILSTREAM *stream,char *name);MESSAGECACHE *mail_new_cache_elt (unsigned long msgno);ENVELOPE *mail_newenvelope (void);ADDRESS *mail_newaddr (vo

⌨️ 快捷键说明

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