summaryrefslogtreecommitdiff
path: root/src/virtual/unknown.c
diff options
context:
space:
mode:
authorbeatrice <beatrice@dangofactory.net>2026-11-22 19:19:03 +0900
committerbeatrice <beatrice@dangofactory.net>2026-11-22 19:19:03 +0900
commitbd4611555e18fca7c66afaef0f094e15038b0459 (patch)
tree1b1a9109567b61ac259ead146f4bef21a0f886df /src/virtual/unknown.c
parent2324a9e97a727bf95690c9fb8fdca0f52301940e (diff)
downloadpostfix-master.tar.gz
postfix-master.zip
Release tarball postfix-3.11.7.tar.gz (dist-generated files / local differences from tag)HEADlocal/postfixmaster
Diffstat (limited to 'src/virtual/unknown.c')
-rw-r--r--src/virtual/unknown.c65
1 files changed, 65 insertions, 0 deletions
diff --git a/src/virtual/unknown.c b/src/virtual/unknown.c
new file mode 100644
index 000000000..ad8d64a3c
--- /dev/null
+++ b/src/virtual/unknown.c
@@ -0,0 +1,65 @@
+/*++
+/* NAME
+/* unknown 3
+/* SUMMARY
+/* delivery of unknown recipients
+/* SYNOPSIS
+/* #include "virtual.h"
+/*
+/* int deliver_unknown(state)
+/* LOCAL_STATE state;
+/* DESCRIPTION
+/* deliver_unknown() delivers a message for unknown recipients.
+/* .PP
+/* Arguments:
+/* .IP state
+/* Message delivery attributes (sender, recipient etc.).
+/* .IP usr_attr
+/* Attributes describing user rights and mailbox location.
+/* DIAGNOSTICS
+/* The result status is non-zero when delivery should be tried again.
+/* LICENSE
+/* .ad
+/* .fi
+/* The Secure Mailer license must be distributed with this software.
+/* AUTHOR(S)
+/* Wietse Venema
+/* IBM T.J. Watson Research
+/* P.O. Box 704
+/* Yorktown Heights, NY 10598, USA
+/*--*/
+
+/* System library. */
+
+#include <sys_defs.h>
+
+/* Utility library. */
+
+#include <msg.h>
+
+/* Global library. */
+
+#include <bounce.h>
+
+/* Application-specific. */
+
+#include "virtual.h"
+
+/* deliver_unknown - delivery for unknown recipients */
+
+int deliver_unknown(LOCAL_STATE state)
+{
+ const char *myname = "deliver_unknown";
+
+ /*
+ * Make verbose logging easier to understand.
+ */
+ state.level++;
+ if (msg_verbose)
+ MSG_LOG_STATE(myname, state);
+
+ dsb_simple(state.msg_attr.why, "5.1.1",
+ "unknown user: \"%s\"", state.msg_attr.user);
+ return (bounce_append(BOUNCE_FLAGS(state.request),
+ BOUNCE_ATTR(state.msg_attr)));
+}