base.m4, exchange.m4: Improve key/value syntax in warnings.
[exim-config] / base.m4
diff --git a/base.m4 b/base.m4
index ac6b95c..90fcca6 100644 (file)
--- a/base.m4
+++ b/base.m4
@@ -60,9 +60,7 @@ gecos_pattern = ([^,:]*)
 SECTION(global, incoming)m4_dnl
 received_header_text = Received: \
        ${if def:sender_rcvhost \
-            {from $sender_rcvhost\
-             ${if def:sender_helo_name \
-                  { (helo=$sender_helo_name)}}\n\t} \
+            {from $sender_rcvhost\n\t} \
             {${if def:sender_ident \
                   {from ${quote_local_part:$sender_ident} }}}}\
        by $primary_hostname \
@@ -107,6 +105,11 @@ helo:
        ## and we should only care about the most recent one.
        warn     set acl_c_helo_warning = false
                !condition = \
+                       ${if and {{match_ip {$sender_host_address} \
+                                           {<; 127.0.0.0/8 ; ::1}} \
+                                 {match_domain {$sender_helo_name} \
+                                               {localhost : +thishost}}}}
+               !condition = \
                        ${if exists {CONF_sysconf_dir/helo.conf} \
                             {${lookup {$sender_helo_name} \
                                       partial0-lsearch \
@@ -140,7 +143,7 @@ mail:
                 add_header = :after_received:X-Distorted-Warning: \
                        BADHELO \
                        Client's HELO doesn't match its IP address.\n\t\
-                       HELO name=$sender_helo_name, \
+                       helo-name=$sender_helo_name \
                        address=$sender_host_address
 
        ## Always allow the empty sender, so that we can receive bounces.
@@ -182,7 +185,7 @@ SECTION(acl, connect-tail)m4_dnl
 
 check_submission:
        ## See whether this message needs hacking on.
-       accept  !hosts = +localnet
+       accept  !hosts = +thishost
                !condition = ${if ={$received_port}{CONF_submission_port}}
                 set acl_c_mode = relay
 
@@ -243,13 +246,13 @@ mail_check_auth:
        ## loopback connection, then we can trust identd to tell us the right
        ## answer.  So we should stash the right name somewhere consistent.
        warn     set acl_c_user = $authenticated_id
-                hosts = +localnet
+                hosts = +thishost
                !authenticated = *
                 set acl_c_user = $sender_ident
 
        ## User must be authenticated.
        deny     message = Sender not authenticated
-               !hosts = +localnet
+               !hosts = +thishost
                !authenticated = *
 
        ## Make sure that the local part is one that the authenticated sender