1 /* $NetBSD: mail_queue.h,v 1.1.1.1 2009/06/23 10:08:46 tron Exp $ */ 2 3 #ifndef _MAIL_QUEUE_H_INCLUDED_ 4 #define _MAIL_QUEUE_H_INCLUDED_ 5 6 /*++ 7 /* NAME 8 /* mail_queue 3h 9 /* SUMMARY 10 /* mail queue access 11 /* SYNOPSIS 12 /* #include <mail_queue.h> 13 /* DESCRIPTION 14 /* .nf 15 16 /* 17 * System library. 18 */ 19 #include <sys/time.h> 20 21 /* 22 * Utility library. 23 */ 24 #include <vstring.h> 25 #include <vstream.h> 26 27 /* 28 * Mail queue names. 29 */ 30 #define MAIL_QUEUE_MAILDROP "maildrop" 31 #define MAIL_QUEUE_HOLD "hold" 32 #define MAIL_QUEUE_INCOMING "incoming" 33 #define MAIL_QUEUE_ACTIVE "active" 34 #define MAIL_QUEUE_DEFERRED "deferred" 35 #define MAIL_QUEUE_TRACE "trace" 36 #define MAIL_QUEUE_DEFER "defer" 37 #define MAIL_QUEUE_BOUNCE "bounce" 38 #define MAIL_QUEUE_CORRUPT "corrupt" 39 #define MAIL_QUEUE_FLUSH "flush" 40 41 /* 42 * Queue file modes. 43 * 44 * 4.4BSD-like systems don't allow (sticky AND executable) together, so we use 45 * group read permission bits instead. These are more portable, but they 46 * also are more likely to be turned on by accident. It would not be the end 47 * of the world. 48 */ 49 #define MAIL_QUEUE_STAT_READY (S_IRUSR | S_IWUSR | S_IXUSR) 50 #define MAIL_QUEUE_STAT_CORRUPT (S_IRUSR) 51 #ifndef MAIL_QUEUE_STAT_UNTHROTTLE 52 #define MAIL_QUEUE_STAT_UNTHROTTLE (S_IRGRP) 53 #endif 54 55 extern struct VSTREAM *mail_queue_enter(const char *, mode_t, struct timeval *); 56 extern struct VSTREAM *mail_queue_open(const char *, const char *, int, mode_t); 57 extern int mail_queue_rename(const char *, const char *, const char *); 58 extern int mail_queue_remove(const char *, const char *); 59 extern const char *mail_queue_dir(VSTRING *, const char *, const char *); 60 extern const char *mail_queue_path(VSTRING *, const char *, const char *); 61 extern int mail_queue_mkdirs(const char *); 62 extern int mail_queue_name_ok(const char *); 63 extern int mail_queue_id_ok(const char *); 64 65 /* LICENSE 66 /* .ad 67 /* .fi 68 /* The Secure Mailer license must be distributed with this software. 69 /* AUTHOR(S) 70 /* Wietse Venema 71 /* IBM T.J. Watson Research 72 /* P.O. Box 704 73 /* Yorktown Heights, NY 10598, USA 74 /*--*/ 75 76 #endif 77