1 /* $NetBSD: bounce.h,v 1.2 2017/02/14 01:16:45 christos Exp $ */ 2 3 #ifndef _BOUNCE_H_INCLUDED_ 4 #define _BOUNCE_H_INCLUDED_ 5 6 /*++ 7 /* NAME 8 /* bounce 3h 9 /* SUMMARY 10 /* bounce service client 11 /* SYNOPSIS 12 /* #include <bounce.h> 13 /* DESCRIPTION 14 /* .nf 15 16 /* 17 * System library. 18 */ 19 #include <time.h> 20 21 /* 22 * Global library. 23 */ 24 #include <deliver_request.h> 25 #include <dsn_buf.h> 26 27 /* 28 * Client interface. 29 */ 30 extern int bounce_append(int, const char *, MSG_STATS *, RECIPIENT *, 31 const char *, DSN *); 32 extern int bounce_flush(int, const char *, const char *, const char *, int, 33 const char *, const char *, int); 34 extern int bounce_flush_verp(int, const char *, const char *, const char *, int, 35 const char *, const char *, int, const char *); 36 extern int bounce_one(int, const char *, const char *, const char *, int, 37 const char *, const char *, 38 int, MSG_STATS *, RECIPIENT *, 39 const char *, DSN *); 40 extern void bounce_client_init(const char *, const char *); 41 42 /* 43 * Bounce/defer protocol commands. 44 */ 45 #define BOUNCE_CMD_APPEND 0 /* append log */ 46 #define BOUNCE_CMD_FLUSH 1 /* send log */ 47 #define BOUNCE_CMD_WARN 2 /* send warning, don't delete log */ 48 #define BOUNCE_CMD_VERP 3 /* send log, verp style */ 49 #define BOUNCE_CMD_ONE 4 /* send one recipient notice */ 50 #define BOUNCE_CMD_TRACE 5 /* send delivery record */ 51 52 /* 53 * Macros to make obscure code more readable. 54 */ 55 #define NO_DSN_DCODE ((char *) 0) 56 #define NO_RELAY_AGENT "none" 57 #define NO_DSN_RMTA ((char *) 0) 58 59 /* 60 * Flags. 61 */ 62 #define BOUNCE_FLAG_NONE 0 /* no flags up */ 63 #define BOUNCE_FLAG_CLEAN (1<<0) /* remove log on error */ 64 #define BOUNCE_FLAG_DELRCPT (1<<1) /* delete recipient from queue file */ 65 66 /* 67 * Backwards compatibility. 68 */ 69 #define BOUNCE_FLAG_KEEP BOUNCE_FLAG_NONE 70 71 /* 72 * Start of private API. 73 */ 74 75 #ifdef DSN_INTERN 76 77 #include <dsn_filter.h> 78 79 extern DSN_FILTER *delivery_status_filter; 80 81 extern int bounce_append_intern(int, const char *, MSG_STATS *, RECIPIENT *, 82 const char *, DSN *); 83 extern int bounce_one_intern(int, const char *, const char *, const char *, 84 int, const char *, const char *, 85 int, MSG_STATS *, RECIPIENT *, 86 const char *, DSN *); 87 88 #endif 89 90 /* LICENSE 91 /* .ad 92 /* .fi 93 /* The Secure Mailer license must be distributed with this software. 94 /* AUTHOR(S) 95 /* Wietse Venema 96 /* IBM T.J. Watson Research 97 /* P.O. Box 704 98 /* Yorktown Heights, NY 10598, USA 99 /*--*/ 100 101 #endif 102