Expand PMF_FN_* macros.
[netbsd-mini2440.git] / external / ibm-public / postfix / dist / src / bounce / bounce_service.h
blob454b4a38a8d4e9859b2c596d3f3e88d49a26380a
1 /* $NetBSD$ */
3 /*++
4 /* NAME
5 /* bounce_service 3h
6 /* SUMMARY
7 /* bounce message service
8 /* SYNOPSIS
9 /* #include <bounce_service.h>
10 /* DESCRIPTION
11 /* .nf
14 * Utility library.
16 #include <vstring.h>
19 * Global library.
21 #include <bounce_log.h>
24 * Application-specific.
26 #include <bounce_template.h>
29 * bounce_append_service.c
31 extern int bounce_append_service(int, char *, char *, RECIPIENT *, DSN *);
34 * bounce_notify_service.c
36 extern int bounce_notify_service(int, char *, char *, char *, char *, char *, char *, int, BOUNCE_TEMPLATES *);
39 * bounce_warn_service.c
41 extern int bounce_warn_service(int, char *, char *, char *, char *, char *, char *, int, BOUNCE_TEMPLATES *);
44 * bounce_trace_service.c
46 extern int bounce_trace_service(int, char *, char *, char *, char *, char *, char *, int, BOUNCE_TEMPLATES *);
49 * bounce_notify_verp.c
51 extern int bounce_notify_verp(int, char *, char *, char *, char *, char *, char *, int, char *, BOUNCE_TEMPLATES *);
54 * bounce_one_service.c
56 extern int bounce_one_service(int, char *, char *, char *, char *, char *, int, RCPT_BUF *, DSN_BUF *, BOUNCE_TEMPLATES *);
59 * bounce_cleanup.c
61 extern VSTRING *bounce_cleanup_path;
62 extern void bounce_cleanup_register(char *, char *);
63 extern void bounce_cleanup_log(void);
64 extern void bounce_cleanup_unregister(void);
66 #define bounce_cleanup_registered() (bounce_cleanup_path != 0)
69 * bounce_notify_util.c
71 typedef struct {
72 const char *service; /* bounce or defer */
73 const char *queue_name; /* incoming, etc. */
74 const char *queue_id; /* base name */
75 const char *mime_encoding; /* null or encoding */
76 const char *dsn_envid; /* DSN envelope ID */
77 const char *mime_boundary; /* for MIME */
78 BOUNCE_TEMPLATE *template; /* bounce message template */
79 VSTRING *buf; /* scratch pad */
80 VSTRING *sender; /* envelope sender */
81 VSTREAM *orig_fp; /* open queue file */
82 long orig_offs; /* start of content */
83 time_t arrival_time; /* time of arrival */
84 long message_size; /* size of content */
85 RCPT_BUF *rcpt_buf; /* recipient info */
86 DSN_BUF *dsn_buf; /* delivery status info */
87 BOUNCE_LOG *log_handle; /* open logfile */
88 char *mail_name; /* $mail_name, cooked */
89 } BOUNCE_INFO;
91 /* */
93 extern BOUNCE_INFO *bounce_mail_init(const char *, const char *, const char *, const char *, const char *, BOUNCE_TEMPLATE *);
94 extern BOUNCE_INFO *bounce_mail_one_init(const char *, const char *, const char *, const char *, RCPT_BUF *, DSN_BUF *, BOUNCE_TEMPLATE *);
95 extern void bounce_mail_free(BOUNCE_INFO *);
96 extern int bounce_header(VSTREAM *, BOUNCE_INFO *, const char *, int);
97 extern int bounce_boilerplate(VSTREAM *, BOUNCE_INFO *);
98 extern int bounce_recipient_log(VSTREAM *, BOUNCE_INFO *);
99 extern int bounce_diagnostic_log(VSTREAM *, BOUNCE_INFO *, int);
100 extern int bounce_header_dsn(VSTREAM *, BOUNCE_INFO *);
101 extern int bounce_recipient_dsn(VSTREAM *, BOUNCE_INFO *);
102 extern int bounce_diagnostic_dsn(VSTREAM *, BOUNCE_INFO *, int);
103 extern int bounce_original(VSTREAM *, BOUNCE_INFO *, int);
104 extern void bounce_delrcpt(BOUNCE_INFO *);
105 extern void bounce_delrcpt_one(BOUNCE_INFO *);
107 /* LICENSE
108 /* .ad
109 /* .fi
110 /* The Secure Mailer license must be distributed with this software.
111 /* AUTHOR(S)
112 /* Wietse Venema
113 /* IBM T.J. Watson Research
114 /* P.O. Box 704
115 /* Yorktown Heights, NY 10598, USA
116 /*--*/