Patrick Welche <prlw1@cam.ac.uk>
[netbsd-mini2440.git] / external / ibm-public / postfix / dist / src / global / mail_queue.h
blobc213b2ab6ace17c039e5e4596f3d38cb70c12b9b
1 /* $NetBSD$ */
3 #ifndef _MAIL_QUEUE_H_INCLUDED_
4 #define _MAIL_QUEUE_H_INCLUDED_
6 /*++
7 /* NAME
8 /* mail_queue 3h
9 /* SUMMARY
10 /* mail queue access
11 /* SYNOPSIS
12 /* #include <mail_queue.h>
13 /* DESCRIPTION
14 /* .nf
17 * System library.
19 #include <sys/time.h>
22 * Utility library.
24 #include <vstring.h>
25 #include <vstream.h>
28 * Mail queue names.
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"
42 * Queue file modes.
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.
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
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 *);
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 /*--*/
76 #endif