Skip to content
Permalink
Browse files Browse the repository at this point in the history
Fix host_name_lookup (Close 2747)
Thanks to Nico R for providing a reproducing configuration.

        host_lookup             = *
        message_size_limit      = ${if def:sender_host_name {32M}{32M}}
        acl_smtp_connect        = acl_smtp_connect
        acl_smtp_rcpt           = acl_smtp_rcpt

        begin acl
          acl_smtp_connect:
                warn ratelimit = 256 / 1m / per_conn
                accept

          acl_smtp_rcpt:
                accept hosts = 127.0.0.*

        begin routers
        null:
          driver          = accept
          transport       = null

        begin transports
        null:
          driver          = appendfile
          file            = /dev/null

Tested with

        swaks -f mailbox@example.org -t mailbox@example.org --pipe 'exim -bh 127.0.0.1 -C /opt/exim/etc/exim-bug.conf'

The IP must have a PTR to "localhost." to reproduce it.

(cherry picked from commit 2081272)
  • Loading branch information
HeikoSchlittermann committed May 17, 2021
1 parent 159cf20 commit d4bc023
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/src/host.c
Expand Up @@ -1582,7 +1582,7 @@ Put it in permanent memory. */

if (hosts->h_aliases)
{
int count = 1;
int count = 1; /* need 1 more for terminating NULL */
uschar **ptr;

for (uschar ** aliases = USS hosts->h_aliases; *aliases; aliases++) count++;
Expand Down Expand Up @@ -1691,7 +1691,7 @@ while ((ordername = string_nextinlist(&list, &sep, NULL, 0)))
{
uschar **aptr = NULL;
int ssize = 264;
int count = 0;
int count = 1; /* need 1 more for terminating NULL */
int old_pool = store_pool;

sender_host_dnssec = dns_is_secure(dnsa);
Expand Down

0 comments on commit d4bc023

Please sign in to comment.