From: Philip Hazel Date: Fri, 17 Jun 2005 10:20:30 +0000 (+0000) Subject: Verify recipient with use_postmaster and random was losing X-Git-Tag: exim-4_52~43 X-Git-Url: https://git.exim.org/users/heiko/exim.git/commitdiff_plain/90e9ce597d563d233e6623a8cb59b67d55a91d03 Verify recipient with use_postmaster and random was losing use_postmaster after the random test. --- diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index ffcb6e17b..e1992752f 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -1,4 +1,4 @@ -$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.160 2005/06/17 09:02:40 ph10 Exp $ +$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.161 2005/06/17 10:20:30 ph10 Exp $ Change log file for Exim from version 4.21 ------------------------------------------- @@ -143,6 +143,11 @@ TK/09 Added "prvs" and "prvscheck" expansion items. These help a lot with PH/17 Applied Michael Haardt's patch for HP-UX, affecting only the os.h and Makefile that are specific to HP-UX. +PH/18 If the "use_postmaster" option was set for a recipient callout together + with the "random" option, the postmaster address was used as the MAIL + FROM address for the random test, but not for the subsequent recipient + test. It is now used for both. + Exim version 4.51 ----------------- diff --git a/src/src/verify.c b/src/src/verify.c index e346cf986..2936e7cbd 100644 --- a/src/src/verify.c +++ b/src/src/verify.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/verify.c,v 1.18 2005/05/31 10:58:18 ph10 Exp $ */ +/* $Cambridge: exim/src/src/verify.c,v 1.19 2005/06/17 10:20:30 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -537,7 +537,8 @@ for (host = host_list; host != NULL && !done; host = host->next) smtp_read_response(&inblock, responsebuffer, sizeof(responsebuffer), '2', callout) && - smtp_write_command(&outblock, FALSE, "MAIL FROM:<>\r\n") >= 0 && + smtp_write_command(&outblock, FALSE, "MAIL FROM:<%s>\r\n", + from_address) >= 0 && smtp_read_response(&inblock, responsebuffer, sizeof(responsebuffer), '2', callout); } @@ -615,7 +616,7 @@ for (host = host_list; host != NULL && !done; host = host->next) } } } /* Random not accepted */ - } /* MAIL FROM:<> accepted */ + } /* MAIL FROM: accepted */ /* For any failure of the main check, other than a negative response, we just close the connection and carry on. We can identify a negative response by the @@ -671,7 +672,7 @@ Otherwise, we looped through the hosts but couldn't complete the business. However, there may be domain-specific information to cache in both cases. The value of the result field in the new_domain record is ccache_unknown if -there was an error before or with MAIL FROM:<>, and errno was not zero, +there was an error before or with MAIL FROM:, and errno was not zero, implying some kind of I/O error. We don't want to write the cache in that case. Otherwise the value is ccache_accept or ccache_reject. */