X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/04644f4ca7c85d5e4dff1bd9e48b3429130e4fdd..2484a8253df7795a45fb5b4aff6df0bf0e4d56e5:/src/src/acl.c diff --git a/src/src/acl.c b/src/src/acl.c index 1e7d28a90..8e1d92457 100644 --- a/src/src/acl.c +++ b/src/src/acl.c @@ -5,6 +5,7 @@ /* Copyright (c) The Exim Maintainers 2020 - 2022 */ /* Copyright (c) University of Cambridge 1995 - 2018 */ /* See the file NOTICE for conditions of use and distribution. */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ /* Code for handling Access Control Lists (ACLs) */ @@ -1642,6 +1643,30 @@ return period; +static BOOL +sender_helo_verified_internal(void) +{ +/* We can test the result of optional HELO verification that might have +occurred earlier. If not, we can attempt the verification now. */ + +if (!f.helo_verified && !f.helo_verify_failed) smtp_verify_helo(); +return f.helo_verified; +} + +static int +sender_helo_verified_cond(void) +{ +return sender_helo_verified_internal() ? OK : FAIL; +} + +uschar * +sender_helo_verified_boolstr(void) +{ +return sender_helo_verified_internal() ? US"yes" : US"no"; +} + + + /* This function implements the "verify" condition. It is called when encountered in any ACL, because some tests are almost always permitted. Some just don't make sense, and always fail (for example, an attempt to test a host @@ -1738,11 +1763,7 @@ switch(vp->value) return FAIL; case VERIFY_HELO: - /* We can test the result of optional HELO verification that might have - occurred earlier. If not, we can attempt the verification now. */ - - if (!f.helo_verified && !f.helo_verify_failed) smtp_verify_helo(); - return f.helo_verified ? OK : FAIL; + return sender_helo_verified_cond(); case VERIFY_CSA: /* Do Client SMTP Authorization checks in a separate function, and turn the