modules present in the modules directory were loaded; this now applies
only to those supporting multiple types.
+JH/12 Bug 3112: Fix logging of config-file position for "obsolete lookup
+ syntax". Previously, the end of the top-level file was reported.
+
Exim version 4.98
-----------------
*log_msgptr = *user_msgptr = NULL;
f.acl_temp_details = FALSE;
+ config_filename = acl->srcfile;
+ config_lineno = acl->srcline;
+
HDEBUG(D_acl) debug_printf_indent("processing \"%s\" (%s %d)\n",
- verbs[acl->verb], acl->srcfile, acl->srcline);
+ verbs[acl->verb], config_filename, config_lineno);
/* Clear out any search error message from a previous check before testing
this condition. */
acl_level++;
ret = acl_check_internal(where, addr, name, user_msgptr, log_msgptr);
acl_level--;
+config_lineno = 0;
acl_narg = sav_narg;
for (i = 0; i < 9; i++) acl_arg[i] = sav_arg[i];
acl_level++;
rc = acl_check_internal(where, addr, s, user_msgptr, log_msgptr);
acl_level--;
+config_lineno = 0;
return rc;
}
DEFER can't tell at the moment
ERROR disaster
*/
-int acl_where = ACL_WHERE_UNKNOWN;
int
acl_check(int where, const uschar * recipient, uschar * s,
rc = acl_check_internal(where, addr, s, user_msgptr, log_msgptr);
acl_level = 0;
acl_where = ACL_WHERE_UNKNOWN;
+config_lineno = 0;
/* Cutthrough - if requested,
and WHERE_RCPT and not yet opened conn as result of recipient-verify,
/* Expand command line items */
if (recipients_arg < argc)
- while (recipients_arg < argc)
- expansion_test_line(exim_str_fail_toolong(argv[recipients_arg++], EXIM_EMAILADDR_MAX, "recipient"));
+ {
+ config_filename = US"-be args";
+ for (config_lineno = 1; recipients_arg < argc; config_lineno++)
+ expansion_test_line(exim_str_fail_toolong(argv[recipients_arg++],
+ EXIM_EMAILADDR_MAX, "-be arg"));
+ }
/* Read stdin */
void *dlhandle = set_readline(&fn_readline, &fn_addhist);
#endif
- while (s = get_stdinput(fn_readline, fn_addhist))
+ config_filename = US"-be stdin";
+ for (config_lineno = 1; s = get_stdinput(fn_readline, fn_addhist);
+ config_lineno++)
expansion_test_line(s);
#ifdef USE_READLINE
tree_node *acl_var_m = NULL;
uschar *acl_verify_message = NULL;
string_item *acl_warn_logged = NULL;
+int acl_where = ACL_WHERE_UNKNOWN;
/* Names of SMTP places for use in ACL error messages, and corresponding SMTP
error codes (only those used) */
uschar *clmacros[MAX_CLMACROS];
FILE *config_file = NULL;
const uschar *config_filename = NULL;
-int config_lineno = 0;
+unsigned config_lineno = 0;
#ifdef CONFIGURE_GROUP
gid_t config_gid = CONFIGURE_GROUP;
#else
extern tree_node *acl_var_m; /* ACL message variables */
extern uschar *acl_verify_message; /* User message for verify failure */
extern string_item *acl_warn_logged; /* Logged lines */
+extern int acl_where; /* Current running ACL */
extern uschar *acl_wherecodes[]; /* Response codes for ACL fails */
extern uschar *acl_wherenames[]; /* Names for messages */
extern address_item *addr_duplicate; /* Duplicate address list */
extern FILE *config_file; /* Configuration file */
extern const uschar *config_filename; /* Configuration file name */
extern gid_t config_gid; /* Additional group owner */
-extern int config_lineno; /* Line number */
+extern unsigned config_lineno; /* Line number */
extern const uschar *config_main_filelist; /* List of possible config files */
extern uschar *config_main_filename; /* File name actually used */
extern uschar *config_main_directory; /* Directory where the main config file was found */
else
{
if (flags & (LOG_CONFIG_IN & ~LOG_CONFIG))
- string_fmt_append_noextend(g, " in line %d of %s",
+ if (config_lineno > 0)
+ {
+ if (acl_where != ACL_WHERE_UNKNOWN)
+ string_fmt_append_noextend(g, " in ACL verb at");
+ else
+ string_fmt_append_noextend(g, " in");
+
+ string_fmt_append_noextend(g, " line %d of %s",
config_lineno, config_filename);
+ }
+ else if (router_name)
+ string_fmt_append_noextend(g, " in %s router", router_name);
+ else if (transport_name)
+ string_fmt_append_noextend(g, " in %s transport", transport_name);
string_fmt_append_noextend(g, ":\n ");
}
}
(void)fclose(config_file);
+config_lineno = 0; /* Ensure we don't log a spurious position */
}
/* Init the storage for the pre-parsed config lines */
database lookup required for servers=x:127.0.0.1::PORT_N; select name from them where id='ph10';
MySQL query: "servers=x:127.0.0.1::PORT_N; select name from them where id='ph10';" opts 'NULL'
LOG: MAIN
- Exim configuration error in line 89 of TESTSUITE/test-config:
+ Exim configuration error in line 11 of -be stdin:
WARNING: obsolete syntax used for lookup
lookup deferred: MySQL server "x" not found in mysql_servers
search_open: mysql "NULL"
database lookup required for servers=127.0.0.1::PORT_N:x; select name from them where id='ph10';
MySQL query: "servers=127.0.0.1::PORT_N:x; select name from them where id='ph10';" opts 'NULL'
LOG: MAIN
- Exim configuration error in line 89 of TESTSUITE/test-config:
+ Exim configuration error in line 12 of -be stdin:
WARNING: obsolete syntax used for lookup
MYSQL using cached connection for 127.0.0.1:PORT_N/test/root
creating new cache entry
database lookup required for servers=127.0.0.1::PORT_N/test/root/:x; select name from them where id='ph10';
MySQL query: "servers=127.0.0.1::PORT_N/test/root/:x; select name from them where id='ph10';" opts 'NULL'
LOG: MAIN
- Exim configuration error in line 89 of TESTSUITE/test-config:
+ Exim configuration error in line 13 of -be stdin:
WARNING: obsolete syntax used for lookup
MYSQL using cached connection for 127.0.0.1:PORT_N/test/root
creating new cache entry
database lookup required for servers=ip4.ip4.ip4.ip4::1223/test/root/:127.0.0.1::PORT_N; select name from them where id='ph10';
MySQL query: "servers=ip4.ip4.ip4.ip4::1223/test/root/:127.0.0.1::PORT_N; select name from them where id='ph10';" opts 'NULL'
LOG: MAIN
- Exim configuration error in line 89 of TESTSUITE/test-config:
+ Exim configuration error in line 14 of -be stdin:
WARNING: obsolete syntax used for lookup
MYSQL new connection: host=ip4.ip4.ip4.ip4 port=PORT_N socket=NULL database=test user=root
creating new cache entry
database lookup required for servers=localhost(TESTSUITE/mysql/sock)/test/root/pass; select name from them where id='ph10';
MySQL query: "servers=localhost(TESTSUITE/mysql/sock)/test/root/pass; select name from them where id='ph10';" opts 'NULL'
LOG: MAIN
- Exim configuration error in line 89 of TESTSUITE/test-config:
+ Exim configuration error in line 15 of -be stdin:
WARNING: obsolete syntax used for lookup
MYSQL new connection: host=localhost port=0 socket=TESTSUITE/mysql/sock database=test user=root
creating new cache entry
01:01:01 p1235 (tainted, quoted:mysql)
01:01:01 p1235 MySQL query: "servers=127.0.0.1::PORT_N/test/root/pass; select name from them where id = 'c'" opts 'NULL'
01:01:01 p1235 LOG: MAIN
-01:01:01 p1235 Exim configuration error in line 89 of TESTSUITE/test-config:
+01:01:01 p1235 Exim configuration error in ACL verb at line 31 of TESTSUITE/test-config:
01:01:01 p1235 WARNING: obsolete syntax used for lookup
01:01:01 p1235 lookup deferred: MySQL server "127.0.0.1:PORT_N/test" is tainted
01:01:01 p1235 ├failed to expand: FAIL2: ${lookup mysql {servers=127.0.0.1::PORT_N/test/root/pass; select name from them where id = '${quote_mysql:$local_part}'}}
01:01:01 p1235 required_quoter_id (mysql) quoting -1 (NULL)
01:01:01 p1235 MySQL query: "servers=127.0.0.1::PORT_N; select name from them where id = 'c'" opts 'NULL'
01:01:01 p1235 LOG: MAIN
-01:01:01 p1235 Exim configuration error in line 89 of TESTSUITE/test-config:
+01:01:01 p1235 Exim configuration error in ACL verb at line 39 of TESTSUITE/test-config:
01:01:01 p1235 WARNING: obsolete syntax used for lookup
01:01:01 p1235 MYSQL using cached connection for 127.0.0.1:PORT_N/test/root
01:01:01 p1235 MYSQL: no data found
01:01:01 p1235 (tainted, quoted:mysql)
01:01:01 p1235 MySQL query: "servers=127.0.0.1::PORT_N/test/root/pass; select * from them where id='c'" opts 'NULL'
01:01:01 p1235 LOG: MAIN
-01:01:01 p1235 Exim configuration error in line 89 of TESTSUITE/test-config:
+01:01:01 p1235 Exim configuration error in ACL verb at line 45 of TESTSUITE/test-config:
01:01:01 p1235 WARNING: obsolete syntax used for lookup
01:01:01 p1235 lookup deferred: MySQL server "127.0.0.1:PORT_N/test" is tainted
01:01:01 p1235 host in "<& net-mysql;servers=127.0.0.1::PORT_N/test/root/pass; select * from them where id='c'"? list match deferred for net-mysql;servers=127.0.0.1::1223/test/root/pass; select * from them where id='c'
database lookup required for servers=x:localhost; select name from them where id='ph10';
PostgreSQL query: "servers=x:localhost; select name from them where id='ph10';" opts 'NULL'
LOG: MAIN
- Exim configuration error in line 78 of TESTSUITE/test-config:
+ Exim configuration error in line 11 of -be stdin:
WARNING: obsolete syntax used for lookup
lookup deferred: PostgreSQL server "x" not found in pgsql_servers
search_open: pgsql "NULL"
database lookup required for servers=localhost::PORT_N:x; select name from them where id='ph10';
PostgreSQL query: "servers=localhost::PORT_N:x; select name from them where id='ph10';" opts 'NULL'
LOG: MAIN
- Exim configuration error in line 78 of TESTSUITE/test-config:
+ Exim configuration error in line 12 of -be stdin:
WARNING: obsolete syntax used for lookup
PGSQL using cached connection for localhost:PORT_N/test/CALLER
creating new cache entry
database lookup required for servers=localhost::PORT_N/test/CALLER/:x; select name from them where id='ph10';
PostgreSQL query: "servers=localhost::PORT_N/test/CALLER/:x; select name from them where id='ph10';" opts 'NULL'
LOG: MAIN
- Exim configuration error in line 78 of TESTSUITE/test-config:
+ Exim configuration error in line 13 of -be stdin:
WARNING: obsolete syntax used for lookup
PGSQL using cached connection for localhost:PORT_N/test/CALLER
creating new cache entry
database lookup required for servers=(TESTSUITE/pgsql/.s.PGSQL.1223)/test/CALLER/:x; select name from them where id='ph10';
PostgreSQL query: "servers=(TESTSUITE/pgsql/.s.PGSQL.1223)/test/CALLER/:x; select name from them where id='ph10';" opts 'NULL'
LOG: MAIN
- Exim configuration error in line 78 of TESTSUITE/test-config:
+ Exim configuration error in line 14 of -be stdin:
WARNING: obsolete syntax used for lookup
PGSQL new connection: socket=TESTSUITE/pgsql/.s.PGSQL.1223 database=test user=CALLER
creating new cache entry
(tainted, quoted:pgsql)
PostgreSQL query: "servers=localhost::PORT_N/test/CALLER/; select name from them where id = 'c'" opts 'NULL'
LOG: MAIN
- Exim configuration error in line 78 of TESTSUITE/test-config:
+ Exim configuration error in ACL verb at line 32 of TESTSUITE/test-config:
WARNING: obsolete syntax used for lookup
lookup deferred: PostgreSQL server "localhost:PORT_N/test" is tainted
warn: condition test deferred in ACL "check_recipient"
(tainted, quoted:pgsql)
PostgreSQL query: "servers=localhost::PORT_N/test/CALLER/; select * from them where id='c'" opts 'NULL'
LOG: MAIN
- Exim configuration error in line 78 of TESTSUITE/test-config:
+ Exim configuration error in ACL verb at line 44 of TESTSUITE/test-config:
WARNING: obsolete syntax used for lookup
lookup deferred: PostgreSQL server "localhost:PORT_N/test" is tainted
host in "<& net-pgsql;servers=localhost::PORT_N/test/CALLER/; select * from them where id='c'"? list match deferred for net-pgsql;servers=localhost::1223/test/CALLER/; select * from them where id='c'
(tainted, quoted:pgsql)
PostgreSQL query: "servers=localhost::PORT_N/test/CALLER/; select name from them where id = 'c'" opts 'NULL'
LOG: MAIN
- Exim configuration error in line 78 of TESTSUITE/test-config:
+ Exim configuration error in ACL verb at line 32 of TESTSUITE/test-config:
WARNING: obsolete syntax used for lookup
lookup deferred: PostgreSQL server "localhost:PORT_N/test" is tainted
warn: condition test deferred in ACL "check_recipient"
(tainted, quoted:pgsql)
PostgreSQL query: "servers=localhost::PORT_N/test/CALLER/; select * from them where id='c'" opts 'NULL'
LOG: MAIN
- Exim configuration error in line 78 of TESTSUITE/test-config:
+ Exim configuration error in ACL verb at line 44 of TESTSUITE/test-config:
WARNING: obsolete syntax used for lookup
lookup deferred: PostgreSQL server "localhost:PORT_N/test" is tainted
host in "<& net-pgsql;servers=localhost::PORT_N/test/CALLER/; select * from them where id='c'"? list match deferred for net-pgsql;servers=localhost::1223/test/CALLER/; select * from them where id='c'