--- postfix-1.1.11/conf/sample-smtpd.cf	2002/08/20 12:43:33	1.1.1.12
+++ postfix-1.1.11/conf/sample-smtpd.cf	2002/08/20 12:57:37	1.1.1.12.2.1
@@ -355,6 +381,10 @@
 #   reject: reject the request. Place this at the end of a restriction.
 #   permit: permit the request. Place this at the end of a restriction.
 #   warn_if_reject: next restriction logs a warning instead of rejecting.
+#   log_recipient: log "qid: helo(fqdn[a.d.d.r]) from=<mailbox> to=<mailbox>"
+#	This is useful only for its side-effect (logging). The "log_recipient"
+#	restriction does not "match", it neither permits, nor denies the
+#	recipient, that is up to any following restrictions.
 #
 # Restrictions are applied in the order as specified; the first
 # restriction that matches wins.
--- postfix-1.1.11/src/global/mail_params.h	2002/08/20 12:43:57	1.1.1.24
+++ postfix-1.1.11/src/global/mail_params.h	2002/08/20 12:57:42	1.1.1.24.2.1
@@ -1197,6 +1205,7 @@
 #define CHECK_ETRN_ACL		"check_etrn_access"
 
 #define WARN_IF_REJECT		"warn_if_reject"
+#define LOG_RECIPIENT		"log_recipient"
 
 #define REJECT_MAPS_RBL		"reject_maps_rbl"
 #define VAR_MAPS_RBL_CODE	"maps_rbl_reject_code"
--- postfix-1.1.11/src/smtpd/smtpd_check.c	2002/08/20 12:44:25	1.1.1.22
+++ postfix-1.1.11/src/smtpd/smtpd_check.c	2002/08/20 12:57:45	1.1.1.22.2.1
@@ -2072,6 +2083,13 @@
 	    if (cpp[1] != 0 && state->warn_if_reject == 0)
 		msg_warn("restriction `%s' after `%s' is ignored",
 			 cpp[1], REJECT_ALL);
+	} else if (strcasecmp(name, LOG_RECIPIENT) == 0) {
+	    if (state->queue_id && state->sender && state->recipient) {
+		msg_info("%s: %s(%s) from=<%s> to=<%s>", state->queue_id,
+			 state->helo_name ? state->helo_name : "",
+			 state->namaddr, state->sender, state->recipient);
+	    }
+	    status = SMTPD_CHECK_DUNNO;
 	} else if (strcasecmp(name, REJECT_UNAUTH_PIPE) == 0) {
 	    status = reject_unauth_pipelining(state);
 	}
