summaryrefslogtreecommitdiff
path: root/mail/postfix-current/patches/patch-be
blob: 4dc1c4cc711574b9083ba47f5e5682f4603b8eae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
$NetBSD: patch-be,v 1.3 2004/03/06 15:08:32 grant Exp $

--- src/cleanup/cleanup_message.c.orig	2004-01-21 12:25:27.000000000 +1100
+++ src/cleanup/cleanup_message.c
@@ -177,15 +177,17 @@ static void cleanup_rewrite_sender(CLEAN
     for (tpp = addr_list; *tpp; tpp++) {
 	cleanup_rewrite_tree(*tpp);
 	if (state->flags & CLEANUP_FLAG_MAP_OK) {
-	    if (cleanup_send_canon_maps)
-		cleanup_map11_tree(state, *tpp, cleanup_send_canon_maps,
-				cleanup_ext_prop_mask & EXT_PROP_CANONICAL);
-	    if (cleanup_comm_canon_maps)
-		cleanup_map11_tree(state, *tpp, cleanup_comm_canon_maps,
-				cleanup_ext_prop_mask & EXT_PROP_CANONICAL);
-	    if (cleanup_masq_domains
-		&& (cleanup_masq_flags & CLEANUP_MASQ_FLAG_HDR_FROM))
+	    if (var_canon_env_rcpt) {
+		if (cleanup_send_canon_maps)
+		    cleanup_map11_tree(state, *tpp, cleanup_send_canon_maps,
+			cleanup_ext_prop_mask & EXT_PROP_CANONICAL);
+		if (cleanup_comm_canon_maps)
+		    cleanup_map11_tree(state, *tpp, cleanup_comm_canon_maps,
+			cleanup_ext_prop_mask & EXT_PROP_CANONICAL);
+		if (cleanup_masq_domains
+		    && (cleanup_masq_flags & CLEANUP_MASQ_FLAG_HDR_FROM))
 		cleanup_masquerade_tree(*tpp, cleanup_masq_domains);
+	    }
 	}
 	if (hdr_opts->type == HDR_FROM && state->from == 0)
 	    state->from = cleanup_extract_internal(header_buf, *tpp);