1 /* $NetBSD: unknown.c,v 1.1.1.1 2009/06/23 10:09:02 tron Exp $ */ 2 3 /*++ 4 /* NAME 5 /* unknown 3 6 /* SUMMARY 7 /* delivery of unknown recipients 8 /* SYNOPSIS 9 /* #include "virtual.h" 10 /* 11 /* int deliver_unknown(state) 12 /* LOCAL_STATE state; 13 /* DESCRIPTION 14 /* deliver_unknown() delivers a message for unknown recipients. 15 /* .PP 16 /* Arguments: 17 /* .IP state 18 /* Message delivery attributes (sender, recipient etc.). 19 /* .IP usr_attr 20 /* Attributes describing user rights and mailbox location. 21 /* DIAGNOSTICS 22 /* The result status is non-zero when delivery should be tried again. 23 /* LICENSE 24 /* .ad 25 /* .fi 26 /* The Secure Mailer license must be distributed with this software. 27 /* AUTHOR(S) 28 /* Wietse Venema 29 /* IBM T.J. Watson Research 30 /* P.O. Box 704 31 /* Yorktown Heights, NY 10598, USA 32 /*--*/ 33 34 /* System library. */ 35 36 #include <sys_defs.h> 37 38 /* Utility library. */ 39 40 #include <msg.h> 41 42 /* Global library. */ 43 44 #include <bounce.h> 45 46 /* Application-specific. */ 47 48 #include "virtual.h" 49 50 /* deliver_unknown - delivery for unknown recipients */ 51 52 int deliver_unknown(LOCAL_STATE state) 53 { 54 const char *myname = "deliver_unknown"; 55 56 /* 57 * Make verbose logging easier to understand. 58 */ 59 state.level++; 60 if (msg_verbose) 61 MSG_LOG_STATE(myname, state); 62 63 dsb_simple(state.msg_attr.why, "5.1.1", 64 "unknown user: \"%s\"", state.msg_attr.user); 65 return (bounce_append(BOUNCE_FLAGS(state.request), 66 BOUNCE_ATTR(state.msg_attr))); 67 } 68