1 /* $NetBSD: pipe_command.h,v 1.1.1.1 2009/06/23 10:08:47 tron Exp $ */ 2 3 #ifndef _PIPE_COMMAND_H_INCLUDED_ 4 #define _PIPE_COMMAND_H_INCLUDED_ 5 6 /*++ 7 /* NAME 8 /* pipe_command 3h 9 /* SUMMARY 10 /* deliver message to external command 11 /* SYNOPSIS 12 /* #include <pipe_command.h> 13 /* DESCRIPTION 14 /* .nf 15 16 /* 17 * Utility library. 18 */ 19 #include <vstream.h> 20 #include <vstring.h> 21 22 /* 23 * Global library. 24 */ 25 #include <mail_copy.h> 26 #include <dsn_buf.h> 27 28 /* 29 * Request arguments. 30 */ 31 #define PIPE_CMD_END 0 /* terminator */ 32 #define PIPE_CMD_COMMAND 1 /* command is string */ 33 #define PIPE_CMD_ARGV 2 /* command is array */ 34 #define PIPE_CMD_COPY_FLAGS 3 /* mail_copy() flags */ 35 #define PIPE_CMD_SENDER 4 /* mail_copy() sender */ 36 #define PIPE_CMD_DELIVERED 5 /* mail_copy() recipient */ 37 #define PIPE_CMD_UID 6 /* privileges */ 38 #define PIPE_CMD_GID 7 /* privileges */ 39 #define PIPE_CMD_TIME_LIMIT 8 /* time limit */ 40 #define PIPE_CMD_ENV 9 /* extra environment */ 41 #define PIPE_CMD_SHELL 10 /* alternative shell */ 42 #define PIPE_CMD_EOL 11 /* record delimiter */ 43 #define PIPE_CMD_EXPORT 12 /* exportable environment */ 44 #define PIPE_CMD_ORIG_RCPT 13 /* mail_copy() original recipient */ 45 #define PIPE_CMD_CWD 14 /* working directory */ 46 #define PIPE_CMD_CHROOT 15 /* chroot() before exec() */ 47 48 /* 49 * Command completion status. 50 */ 51 #define PIPE_STAT_OK 0 /* success */ 52 #define PIPE_STAT_DEFER 1 /* try again */ 53 #define PIPE_STAT_BOUNCE 2 /* failed */ 54 #define PIPE_STAT_CORRUPT 3 /* corrupted file */ 55 56 extern int pipe_command(VSTREAM *, DSN_BUF *,...); 57 58 /* LICENSE 59 /* .ad 60 /* .fi 61 /* The Secure Mailer license must be distributed with this software. 62 /* AUTHOR(S) 63 /* Wietse Venema 64 /* IBM T.J. Watson Research 65 /* P.O. Box 704 66 /* Yorktown Heights, NY 10598, USA 67 /*--*/ 68 69 #endif 70