From 3ae891bbbaa3f96365f4c9fbe49e5cee26183fbc Mon Sep 17 00:00:00 2001 From: rhatto Date: Mon, 31 Jul 2006 20:45:44 +0000 Subject: initial import git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@1 370017ae-e619-0410-ac65-c121f96126d4 --- postfix/postfix-anon-2.2.10.diff | 66 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 postfix/postfix-anon-2.2.10.diff (limited to 'postfix/postfix-anon-2.2.10.diff') diff --git a/postfix/postfix-anon-2.2.10.diff b/postfix/postfix-anon-2.2.10.diff new file mode 100644 index 00000000..056c2200 --- /dev/null +++ b/postfix/postfix-anon-2.2.10.diff @@ -0,0 +1,66 @@ +diff -Naur no_alter/postfix-2.2.10/src/smtpd/smtpd.c postfix-2.2.10/src/smtpd/smtpd.c +--- no_alter/postfix-2.2.10/src/smtpd/smtpd.c 2005-11-28 20:32:41.000000000 -0200 ++++ postfix-2.2.10/src/smtpd/smtpd.c 2006-06-07 16:51:59.000000000 -0300 +@@ -858,6 +858,7 @@ + char *var_smtpd_sasl_appname; + char *var_smtpd_sasl_realm; + char *var_smtpd_sasl_exceptions_networks; ++int sasl_authenticated; + char *var_filter_xport; + bool var_broken_auth_clients; + char *var_perm_mx_networks; +@@ -1945,10 +1946,14 @@ + * intermediate proxy. + */ + if (!state->proxy || state->xforward.flags == 0) { ++ if (sasl_authenticated == 1) { ++ out_fprintf(out_stream, REC_TYPE_NORM, "Received: from localhost (localhost [127.0.0.1])"); ++ } else { + out_fprintf(out_stream, REC_TYPE_NORM, + "Received: from %s (%s [%s])", + state->helo_name ? state->helo_name : state->name, + state->name, state->rfc_addr); ++ } + #ifdef USE_TLS + if (var_smtpd_tls_received_header && state->tls_context) { + out_fprintf(out_stream, REC_TYPE_NORM, +diff -Naur no_alter/postfix-2.2.10/src/smtpd/smtpd_sasl_proto.c postfix-2.2.10/src/smtpd/smtpd_sasl_proto.c +--- no_alter/postfix-2.2.10/src/smtpd/smtpd_sasl_proto.c 2004-12-10 23:16:39.000000000 -0200 ++++ postfix-2.2.10/src/smtpd/smtpd_sasl_proto.c 2006-06-07 16:54:44.000000000 -0300 +@@ -118,6 +118,8 @@ + + #ifdef USE_SASL_AUTH + ++int sasl_authenticated; ++ + /* smtpd_sasl_auth_cmd - process AUTH command */ + + int smtpd_sasl_auth_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv) +@@ -126,6 +128,7 @@ + char *initial_response; + char *err; + ++ sasl_authenticated = 0; + if (var_helo_required && state->helo_name == 0) { + state->error_mask |= MAIL_ERROR_POLICY; + smtpd_chat_reply(state, "503 Error: send HELO/EHLO first"); +@@ -169,6 +172,7 @@ + return (-1); + } + smtpd_chat_reply(state, "235 Authentication successful"); ++ sasl_authenticated = 1; + return (0); + } + +diff -Naur no_alter/postfix-2.2.10/src/smtpd/smtpd_sasl_proto.h postfix-2.2.10/src/smtpd/smtpd_sasl_proto.h +--- no_alter/postfix-2.2.10/src/smtpd/smtpd_sasl_proto.h 2000-03-16 16:34:58.000000000 -0300 ++++ postfix-2.2.10/src/smtpd/smtpd_sasl_proto.h 2006-06-07 16:55:29.000000000 -0300 +@@ -17,6 +17,8 @@ + extern void smtpd_sasl_mail_log(SMTPD_STATE *); + extern void smtpd_sasl_mail_reset(SMTPD_STATE *); + ++extern int sasl_authenticated; ++ + /* LICENSE + /* .ad + /* .fi -- cgit v1.2.3