[exim-dev] slight debug output change

Top Page
Delete this message
Reply to this message
Author: Todd Lyons
Date:  
To: exim-dev
Subject: [exim-dev] slight debug output change
[exim-build@tlyons ~/projects/exim/src (master)]$ git diff
--unified=12 src/match.c
diff --git a/src/src/match.c b/src/src/match.c
index 7925817..66ae3dd 100644
A user came into IRC with the complaint that a test that was matching
was not working:

check senders = ${if
exists{/etc/exim4/local_sender_blacklist}{/etc/exim4/local_sender_blacklist}{}}
address match: subject=noreply.fisk@??? pattern=noreply.*@???
noreply.fisk@??? in "/etc/exim4/local_sender_blacklist"? no
(end of list)

In the end, he figured out that "address match" doesn't mean that the
test matched, but that it was just testing it. I had him change the
regex to noreply\..*@example.net and it started working.

I wanted to make the following change below to make it more clearly
indicate that it's performing a test, not that it's the result of a
test. Does anybody have a complaint about this proposed simple
change? It doesn't affect any of the test logs, stdout, or stderr.


--- a/src/src/match.c
+++ b/src/src/match.c
@@ -1001,25 +1001,25 @@ check_address(void *arg, uschar *pattern,
uschar **valueptr, uschar **error)
{
check_address_block *cb = (check_address_block *)arg;
check_string_block csb;
int rc;
int expand_inc = 0;
unsigned int *null = NULL;
uschar *listptr;
uschar *subject = cb->address;
uschar *s, *pdomain, *sdomain;

error = error; /* Keep clever compilers from complaining */

-DEBUG(D_lists) debug_printf("address match: subject=%s pattern=%s\n",
+DEBUG(D_lists) debug_printf("address match test: subject=%s pattern=%s\n",
subject, pattern);

/* Find the subject's domain */

sdomain = Ustrrchr(subject, '@');

/* The only case where a subject may not have a domain is if the subject is
empty. Otherwise, a subject with no domain is a serious configuration error. */

if (sdomain == NULL && *subject != 0)
{
log_write(0, LOG_MAIN|LOG_PANIC, "no @ found in the subject of an "


...Todd
--
The total budget at all receivers for solving senders' problems is $0.
If you want them to accept your mail and manage it the way you want,
send it the way the spec says to. --John Levine