From: Philip Hazel Date: Wed, 22 Dec 2004 12:05:45 +0000 (+0000) Subject: Added $smtp_active_hostname as a variable, and used it in smtp_banner X-Git-Tag: exim-4_50~61 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=1f5b4c3d3200be53a3a6f2bf6791b70fc543b32f;p=exim.git Added $smtp_active_hostname as a variable, and used it in smtp_banner default value instead of $primary_hostname. --- diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index cdc3a636c..349296817 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -1,4 +1,4 @@ -$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.56 2004/12/21 16:26:31 ph10 Exp $ +$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.57 2004/12/22 12:05:45 ph10 Exp $ Change log file for Exim from version 4.21 ------------------------------------------- @@ -247,6 +247,12 @@ Exim version 4.50 58. The exicyclog utility now does better if the number of log files to keep exceeds 99. In this case, it numbers them 001, 002 ... instead of 01, 02... +59. Two changes related to the smtp_active_hostname option: + + (1) $smtp_active_hostname is now available as a variable. + (2) The default for smtp_banner uses $smtp_active_hostname instead + of $primary_hostname. + Exim version 4.43 ----------------- diff --git a/doc/doc-txt/NewStuff b/doc/doc-txt/NewStuff index 11d7b3cc3..bf9890bb3 100644 --- a/doc/doc-txt/NewStuff +++ b/doc/doc-txt/NewStuff @@ -1,4 +1,4 @@ -$Cambridge: exim/doc/doc-txt/NewStuff,v 1.22 2004/12/21 12:21:46 ph10 Exp $ +$Cambridge: exim/doc/doc-txt/NewStuff,v 1.23 2004/12/22 12:05:45 ph10 Exp $ New Features in Exim -------------------- @@ -238,6 +238,15 @@ Version 4.50 without component reversal and without the addition of in-addr.arpa or ip6.arpa. +21. Two changes related to the smtp_active_hostname option: + + (1) $smtp_active_hostname is now available as a variable. Its value + sticks with the message and is therefore available in routers and + transports at delivery time. + + (2) The default for smtp_banner uses $smtp_active_hostname instead + of $primary_hostname. + Version 4.43 ------------ diff --git a/src/exim_monitor/em_globals.c b/src/exim_monitor/em_globals.c index d9f92d8be..07c8023a0 100644 --- a/src/exim_monitor/em_globals.c +++ b/src/exim_monitor/em_globals.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/exim_monitor/em_globals.c,v 1.2 2004/12/16 15:11:47 tom Exp $ */ +/* $Cambridge: exim/src/exim_monitor/em_globals.c,v 1.3 2004/12/22 12:05:45 ph10 Exp $ */ /************************************************* * Exim Monitor * @@ -189,6 +189,7 @@ int sender_host_port = 0; uschar *sender_ident = NULL; BOOL sender_local = FALSE; BOOL sender_set_untrusted = FALSE; +uschar *smtp_active_hostname = NULL; BOOL split_spool_directory = FALSE; uschar *spool_directory = US SPOOL_DIRECTORY; diff --git a/src/src/expand.c b/src/src/expand.c index 79d1c1f3a..1ffa88cde 100644 --- a/src/src/expand.c +++ b/src/src/expand.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/expand.c,v 1.8 2004/12/16 15:11:47 tom Exp $ */ +/* $Cambridge: exim/src/src/expand.c,v 1.9 2004/12/22 12:05:46 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -450,6 +450,7 @@ static var_entry var_table[] = { { "sender_ident", vtype_stringptr, &sender_ident }, { "sender_rcvhost", vtype_stringptr, &sender_rcvhost }, { "sender_verify_failure",vtype_stringptr, &sender_verify_failure }, + { "smtp_active_hostname", vtype_stringptr, &smtp_active_hostname }, { "smtp_command_argument", vtype_stringptr, &smtp_command_argument }, { "sn0", vtype_filter_int, &filter_sn[0] }, { "sn1", vtype_filter_int, &filter_sn[1] }, diff --git a/src/src/globals.c b/src/src/globals.c index f94678fee..bc9484fd9 100644 --- a/src/src/globals.c +++ b/src/src/globals.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/globals.c,v 1.10 2004/12/17 14:52:44 ph10 Exp $ */ +/* $Cambridge: exim/src/src/globals.c,v 1.11 2004/12/22 12:05:46 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -974,7 +974,7 @@ int smtp_accept_queue_per_connection = 10; int smtp_accept_reserve = 0; uschar *smtp_active_hostname = NULL; BOOL smtp_authenticated = FALSE; -uschar *smtp_banner = US"$primary_hostname ESMTP " +uschar *smtp_banner = US"$smtp_active_hostname ESMTP " "Exim $version_number $tod_full" "\0<---------------Space to patch smtp_banner->"; BOOL smtp_batched_input = FALSE; diff --git a/src/src/spool_in.c b/src/src/spool_in.c index 55d78b957..5dd3d19dc 100644 --- a/src/src/spool_in.c +++ b/src/src/spool_in.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/spool_in.c,v 1.2 2004/12/16 15:11:47 tom Exp $ */ +/* $Cambridge: exim/src/src/spool_in.c,v 1.3 2004/12/22 12:05:46 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -269,6 +269,7 @@ sender_host_authenticated = NULL; sender_ident = NULL; sender_local = FALSE; sender_set_untrusted = FALSE; +smtp_active_hostname = primary_hostname; tree_nonrecipients = NULL; #ifdef EXPERIMENTAL_BRIGHTMAIL @@ -438,6 +439,8 @@ for (;;) interface_address = string_copy(big_buffer + 19); } + else if (Ustrncmp(big_buffer, "-active_hostname", 16) == 0) + smtp_active_hostname = string_copy(big_buffer + 17); else if (Ustrncmp(big_buffer, "-host_auth", 10) == 0) sender_host_authenticated = string_copy(big_buffer + 11); else if (Ustrncmp(big_buffer, "-host_name", 10) == 0) diff --git a/src/src/spool_out.c b/src/src/spool_out.c index 577d0f68c..7ce844b73 100644 --- a/src/src/spool_out.c +++ b/src/src/spool_out.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/spool_out.c,v 1.2 2004/12/16 15:11:47 tom Exp $ */ +/* $Cambridge: exim/src/src/spool_out.c,v 1.3 2004/12/22 12:05:46 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -175,6 +175,9 @@ if (sender_host_address != NULL) if (interface_address != NULL) fprintf(f, "-interface_address %s.%d\n", interface_address, interface_port); + +if (smtp_active_hostname != primary_hostname) + fprintf(f, "-active_hostname %s\n", smtp_active_hostname); /* Likewise for any ident information; for local messages this is likely to be the same as originator_login, but will be different if