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