Home | History | Annotate | Line # | Download | only in global
      1 /*	$NetBSD: bounce.h,v 1.3 2026/05/09 18:49:15 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 #include <pol_stats.h>
     27 
     28  /*
     29   * Client interface.
     30   */
     31 extern int bounce_append(int, const char *, MSG_STATS *, RECIPIENT *,
     32 			         const char *, const POL_STATS *, DSN *);
     33 extern int bounce_flush(int, const char *, const char *, const char *, int,
     34 			        const char *, const char *, int);
     35 extern int bounce_flush_verp(int, const char *, const char *, const char *, int,
     36 		             const char *, const char *, int, const char *);
     37 extern int bounce_one(int, const char *, const char *, const char *, int,
     38 		              const char *, const char *,
     39 		              int, MSG_STATS *, RECIPIENT *,
     40 		              const char *, const POL_STATS *, DSN *);
     41 extern void bounce_client_init(const char *, const char *);
     42 
     43  /*
     44   * Bounce/defer protocol commands.
     45   */
     46 #define BOUNCE_CMD_APPEND	0	/* append log */
     47 #define BOUNCE_CMD_FLUSH	1	/* send log */
     48 #define BOUNCE_CMD_WARN		2	/* send warning, don't delete log */
     49 #define BOUNCE_CMD_VERP		3	/* send log, verp style */
     50 #define BOUNCE_CMD_ONE		4	/* send one recipient notice */
     51 #define BOUNCE_CMD_TRACE	5	/* send delivery record */
     52 
     53  /*
     54   * Macros to make obscure code more readable.
     55   */
     56 #define NO_DSN_DCODE		((char *) 0)
     57 #define NO_RELAY_AGENT		"none"
     58 #define NO_DSN_RMTA		((char *) 0)
     59 
     60  /*
     61   * Flags.
     62   */
     63 #define BOUNCE_FLAG_NONE	0	/* no flags up */
     64 #define BOUNCE_FLAG_CLEAN	(1<<0)	/* remove log on error */
     65 #define BOUNCE_FLAG_DELRCPT	(1<<1)	/* delete recipient from queue file */
     66 
     67  /*
     68   * Backwards compatibility.
     69   */
     70 #define BOUNCE_FLAG_KEEP	BOUNCE_FLAG_NONE
     71 
     72  /*
     73   * Start of private API.
     74   */
     75 
     76 #ifdef DSN_INTERN
     77 
     78 #include <dsn_filter.h>
     79 
     80 extern DSN_FILTER *delivery_status_filter;
     81 
     82 extern int bounce_append_intern(int, const char *, MSG_STATS *, RECIPIENT *,
     83 			            const char *, const POL_STATS *, DSN *);
     84 extern int bounce_one_intern(int, const char *, const char *, const char *,
     85 			             int, const char *, const char *,
     86 			             int, MSG_STATS *, RECIPIENT *,
     87 			             const char *, const POL_STATS *, DSN *);
     88 
     89 #endif
     90 
     91 /* LICENSE
     92 /* .ad
     93 /* .fi
     94 /*	The Secure Mailer license must be distributed with this software.
     95 /* AUTHOR(S)
     96 /*	Wietse Venema
     97 /*	IBM T.J. Watson Research
     98 /*	P.O. Box 704
     99 /*	Yorktown Heights, NY 10598, USA
    100 /*
    101 /*	Wietse Venema
    102 /*	porcupine.org
    103 /*--*/
    104 
    105 #endif
    106