summaryrefslogtreecommitdiff
path: root/mail/postfix
diff options
context:
space:
mode:
authorchristos <christos@pkgsrc.org>2003-03-20 22:04:47 +0000
committerchristos <christos@pkgsrc.org>2003-03-20 22:04:47 +0000
commit3acb24b2bfd653d5da6bc9d542eae8c74cfef828 (patch)
tree26ff05ec64b9ff93daea52373e02d3606309acf7 /mail/postfix
parent763f3c698b694f6f28638daa2ebe0377736175d0 (diff)
downloadpkgsrc-3acb24b2bfd653d5da6bc9d542eae8c74cfef828.tar.gz
Add kim's recipient canocalization patch
Diffstat (limited to 'mail/postfix')
-rw-r--r--mail/postfix/patches/patch-ag106
1 files changed, 106 insertions, 0 deletions
diff --git a/mail/postfix/patches/patch-ag b/mail/postfix/patches/patch-ag
new file mode 100644
index 00000000000..919ea2f99bb
--- /dev/null
+++ b/mail/postfix/patches/patch-ag
@@ -0,0 +1,106 @@
+$NetBSD: patch-ag,v 1.6 2003/03/20 22:04:47 christos Exp $
+
+--- src/cleanup/cleanup.c Mon Nov 5 11:25:58 2001
++++ src/cleanup/cleanup.c Thu Jan 17 21:50:18 2002
+@@ -281,6 +281,7 @@
+ * Pass control to the single-threaded service skeleton.
+ */
+ single_server_main(argc, argv, cleanup_service,
++ MAIL_SERVER_BOOL_TABLE, cleanup_bool_table,
+ MAIL_SERVER_INT_TABLE, cleanup_int_table,
+ MAIL_SERVER_STR_TABLE, cleanup_str_table,
+ MAIL_SERVER_TIME_TABLE, cleanup_time_table,
+--- src/cleanup/cleanup.h Tue Oct 30 19:39:06 2001
++++ src/cleanup/cleanup.h Thu Jan 17 21:50:18 2002
+@@ -109,6 +109,7 @@
+ extern void cleanup_all(void);
+ extern void cleanup_pre_jail(char *, char **);
+ extern void cleanup_post_jail(char *, char **);
++extern CONFIG_BOOL_TABLE cleanup_bool_table[];
+ extern CONFIG_INT_TABLE cleanup_int_table[];
+ extern CONFIG_STR_TABLE cleanup_str_table[];
+ extern CONFIG_TIME_TABLE cleanup_time_table[];
+--- src/cleanup/cleanup_envelope.c Fri Dec 21 20:11:40 2001
++++ src/cleanup/cleanup_envelope.c Thu Jan 17 21:50:18 2002
+@@ -166,15 +166,19 @@
+ return;
+ }
+ cleanup_rewrite_internal(clean_addr, *buf ? buf : var_empty_addr);
+- if (cleanup_rcpt_canon_maps)
+- cleanup_map11_internal(state, clean_addr, cleanup_rcpt_canon_maps,
+- cleanup_ext_prop_mask & EXT_PROP_CANONICAL);
+- if (cleanup_comm_canon_maps)
+- cleanup_map11_internal(state, clean_addr, cleanup_comm_canon_maps,
+- cleanup_ext_prop_mask & EXT_PROP_CANONICAL);
+- if (cleanup_masq_domains
+- && (cleanup_masq_flags & CLEANUP_MASQ_FLAG_ENV_RCPT))
+- cleanup_masquerade_internal(clean_addr, cleanup_masq_domains);
++ if (var_canon_env_rcpt) {
++ if (cleanup_rcpt_canon_maps)
++ cleanup_map11_internal(state, clean_addr,
++ cleanup_rcpt_canon_maps,
++ cleanup_ext_prop_mask & EXT_PROP_CANONICAL);
++ if (cleanup_comm_canon_maps)
++ cleanup_map11_internal(state, clean_addr,
++ cleanup_comm_canon_maps,
++ cleanup_ext_prop_mask & EXT_PROP_CANONICAL);
++ if (cleanup_masq_domains
++ && (cleanup_masq_flags & CLEANUP_MASQ_FLAG_ENV_RCPT))
++ cleanup_masquerade_internal(clean_addr, cleanup_masq_domains);
++ }
+ cleanup_out_recipient(state, STR(clean_addr));
+ if (state->recip == 0)
+ state->recip = mystrdup(STR(clean_addr));
+--- src/cleanup/cleanup_init.c Fri Aug 3 18:39:18 2001
++++ src/cleanup/cleanup_init.c Thu Jan 17 21:50:18 2002
+@@ -6,6 +6,8 @@
+ /* SYNOPSIS
+ /* #include "cleanup.h"
+ /*
++/* CONFIG_BOOL_TABLE cleanup_bool_table[];
++/*
+ /* CONFIG_INT_TABLE cleanup_int_table[];
+ /*
+ /* CONFIG_STR_TABLE cleanup_str_table[];
+@@ -28,7 +30,7 @@
+ /* for one-time initializations that must be done before any message
+ /* processing can take place.
+ /*
+-/* cleanup_{int,str,time}_table[] specify configuration
++/* cleanup_{bool,int,str,time}_table[] specify configuration
+ /* parameters that must be initialized before calling any functions
+ /* in this module. These tables satisfy the interface as specified in
+ /* single_service(3).
+@@ -107,6 +109,7 @@
+ char *var_always_bcc; /* big brother */
+ int var_extra_rcpt_limit; /* recipient extract limit */
+ char *var_rcpt_witheld; /* recipients not disclosed */
++bool var_canon_env_rcpt; /* canonicalize envelope recipient */
+ char *var_masq_classes; /* what to masquerade */
+
+ CONFIG_INT_TABLE cleanup_int_table[] = {
+@@ -136,6 +139,11 @@
+ VAR_ALWAYS_BCC, DEF_ALWAYS_BCC, &var_always_bcc, 0, 0,
+ VAR_RCPT_WITHELD, DEF_RCPT_WITHELD, &var_rcpt_witheld, 1, 0,
+ VAR_MASQ_CLASSES, DEF_MASQ_CLASSES, &var_masq_classes, 0, 0,
++ 0,
++};
++
++CONFIG_BOOL_TABLE cleanup_bool_table[] = {
++ VAR_CANON_ENV_RCPT, DEF_CANON_ENV_RCPT, &var_canon_env_rcpt,
+ 0,
+ };
+
+--- src/global/mail_params.h Tue Jan 15 10:24:34 2002
++++ src/global/mail_params.h Thu Jan 17 21:50:19 2002
+@@ -295,6 +295,10 @@
+ #define DEF_RCPT_CANON_MAPS ""
+ extern char *var_rcpt_canon_maps;
+
++#define VAR_CANON_ENV_RCPT "canonicalize_envelope_recipient"
++#define DEF_CANON_ENV_RCPT 1
++extern bool var_canon_env_rcpt;
++
+ #define VAR_TRANSPORT_MAPS "transport_maps"
+ #define DEF_TRANSPORT_MAPS ""
+ extern char *var_transport_maps;